Click here to Skip to main content
16,006,382 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Saving Datagrid(Urgent) Pin
_AK_20-Jun-06 3:16
_AK_20-Jun-06 3:16 
GeneralRe: Saving Datagrid(Urgent) Pin
varshavmane20-Jun-06 3:20
varshavmane20-Jun-06 3:20 
GeneralRe: Saving Datagrid(Urgent) Pin
_AK_20-Jun-06 3:28
_AK_20-Jun-06 3:28 
GeneralRe: Saving Datagrid(Urgent) Pin
Nagraj Naik20-Jun-06 0:26
Nagraj Naik20-Jun-06 0:26 
GeneralRe: Saving Datagrid(Urgent) [modified] Pin
varshavmane20-Jun-06 0:29
varshavmane20-Jun-06 0:29 
GeneralRe: Saving Datagrid(Urgent) Pin
Nagraj Naik20-Jun-06 0:47
Nagraj Naik20-Jun-06 0:47 
GeneralRe: Saving Datagrid(Urgent) Pin
varshavmane20-Jun-06 0:57
varshavmane20-Jun-06 0:57 
GeneralRe: Saving Datagrid(Urgent) Pin
Nagraj Naik20-Jun-06 2:20
Nagraj Naik20-Jun-06 2:20 
This is what I want you to specify.
Means You are using procedure to save in database which is located in some class and you want to send datagrid records to this procedure.

I hope I am clear now...

Now instead of using arraylist use one class having property within it.

ex.

public class class1
Private _id As Integer = 0
Private _degreeName As String = ""

Public Property ID() As Integer
Get
Return _id
End Get
Set(ByVal Value As Integer)
_id = Value
End Set
End Property
Public Property DegreeName() As String
Get
Return _degreeName
End Get
Set(ByVal Value As String)
_degreeName = Value
End Set
End Property
end class


Now in your webpage code

dim myclass as new class1
for i=0 datagrid1.items.count-1
// set attribute values
with myclass
.id=DataGrid1.Items(i).Cells(0).Text
.degreeName=DataGrid1.Items(i).Cells(1).Text
end with
saveclass.Save_record(myclass) //call saving routine from another class i.e saveclass
next

///saving procedure
public sub Save_record(byval _myclass as myclass)
sql="insert into tablename values (" + _myclass.id +","+_myclass.degreename +")"

///Execute sql code here
end sub

I added two new things

1)Add new class i.e. class1 for storing value
2)pass this class1's object as parameter to record saving procedure


Please check for syntax I just put idea for you.And I sure this will work

Thanks,
Nagraj



GeneralRe: Saving Datagrid(Urgent) Pin
varshavmane20-Jun-06 2:36
varshavmane20-Jun-06 2:36 
AnswerRe: Saving Datagrid(Urgent) Pin
varshavmane20-Jun-06 3:32
varshavmane20-Jun-06 3:32 
GeneralRe: Saving Datagrid(Urgent) Pin
_AK_20-Jun-06 3:34
_AK_20-Jun-06 3:34 
GeneralRe: Saving Datagrid(Urgent) Pin
varshavmane20-Jun-06 3:42
varshavmane20-Jun-06 3:42 
GeneralRe: Saving Datagrid(Urgent) Pin
_AK_20-Jun-06 19:55
_AK_20-Jun-06 19:55 
GeneralRe: Saving Datagrid(Urgent) Pin
varshavmane20-Jun-06 21:18
varshavmane20-Jun-06 21:18 
GeneralRe: Saving Datagrid(Urgent) Pin
_AK_20-Jun-06 23:13
_AK_20-Jun-06 23:13 
GeneralRe: Saving Datagrid(Urgent) Pin
varshavmane21-Jun-06 0:19
varshavmane21-Jun-06 0:19 
QuestionStored procedure problem.... Pin
Nagraj Naik19-Jun-06 23:33
Nagraj Naik19-Jun-06 23:33 
AnswerRe: Stored procedure problem.... Pin
albCode20-Jun-06 0:37
albCode20-Jun-06 0:37 
GeneralRe: Stored procedure problem.... Pin
Nagraj Naik20-Jun-06 0:51
Nagraj Naik20-Jun-06 0:51 
GeneralRe: Stored procedure problem.... Pin
Faisal Khatri20-Jun-06 2:31
Faisal Khatri20-Jun-06 2:31 
AnswerRe: Stored procedure problem.... [modified] Pin
surshbabuk20-Jun-06 4:33
surshbabuk20-Jun-06 4:33 
QuestionCrystalReport Pin
kuwl_mark19-Jun-06 23:24
kuwl_mark19-Jun-06 23:24 
AnswerRe: CrystalReport Pin
Nagraj Naik19-Jun-06 23:40
Nagraj Naik19-Jun-06 23:40 
GeneralRe: CrystalReport Pin
kuwl_mark21-Jun-06 23:32
kuwl_mark21-Jun-06 23:32 
QuestionWebsite Publishing Pin
kumar.adarsh19-Jun-06 23:20
kumar.adarsh19-Jun-06 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.