dhanyavnair
October 7th, 2005, 02:11 AM
Hi ,
I have a bounded column in my datagrid which is an arraylist.while saving to the grid on a button click ,i am getting system.collection.arraylist , instead of the actual values in the arraylist.Could anybody please tell me how to display the values in the arraylist in the datagrid.My code is as follows:
Dim dtb New DataTable
Dim arl As New ArrayList
Dim drow As DataRow
Dim intcount as Integer
dtb= Get_Datatable(mydatagrid)
drow = dtb.NewRow
For intCount = 0 To mylisbox.listbox.ListItems.Count - 1
arl.Add(mylistbox.ListItems(intCount).Value)
Next
drow("ArrayList") = arl
dtb.Rows.Add(drow)
dtb.AcceptChanges()
mydatagrid.DataSource = dtb
mydatagrid.DataBind()
Note :Get_Datatable() is a function that will return the datatable of the datagrid
Thanks and Regards
Dhanya
I have a bounded column in my datagrid which is an arraylist.while saving to the grid on a button click ,i am getting system.collection.arraylist , instead of the actual values in the arraylist.Could anybody please tell me how to display the values in the arraylist in the datagrid.My code is as follows:
Dim dtb New DataTable
Dim arl As New ArrayList
Dim drow As DataRow
Dim intcount as Integer
dtb= Get_Datatable(mydatagrid)
drow = dtb.NewRow
For intCount = 0 To mylisbox.listbox.ListItems.Count - 1
arl.Add(mylistbox.ListItems(intCount).Value)
Next
drow("ArrayList") = arl
dtb.Rows.Add(drow)
dtb.AcceptChanges()
mydatagrid.DataSource = dtb
mydatagrid.DataBind()
Note :Get_Datatable() is a function that will return the datatable of the datagrid
Thanks and Regards
Dhanya