hi,
I am using dropdownlist in webgrid.for loading the combo i am using this source code.
[CODE=vbnet]Dim vallist As New Infragistics.We bUI.UltraWebGri d.ValueList
Dim ds As New DataSet
ds = _Utility.runsql ("select " + IDField + "," + TextField + " from " + TableName + " where Deleted=0")
Dim dt As New DataTable
dt.Columns.Add( "unit_id")
dt.Columns.Add( "unit_name" )
If ds.Tables(0).Ro ws.Count > 0 Then
dt.Rows.Add("", "")
End If
For i As Integer = 0 To ds.Tables(0).Ro ws.Count - 1
dt.Rows.Add(ds. Tables(0).Rows( i).Item(0).ToSt ring, ds.Tables(0).Ro ws(i).Item(1).T oString)
Next
vallist.DataSou rce = dt
vallist.Display Member = TextField
vallist.DataMem ber = IDField
vallist.ValueMe mber = IDField
vallist.DataBin d()
Column.Type = Infragistics.We bUI.UltraWebGri d.ColumnType.Dr opDownList
Column.ValueLis t = vallist[/CODE]
After loading the combo ,i am selected the item.If i click the submit button automatically the selected value will be changed as number.In webgrid the number only shows not the selected value.
How to solve this problem.Give solution for this.
Thanks in advance.
I am using dropdownlist in webgrid.for loading the combo i am using this source code.
[CODE=vbnet]Dim vallist As New Infragistics.We bUI.UltraWebGri d.ValueList
Dim ds As New DataSet
ds = _Utility.runsql ("select " + IDField + "," + TextField + " from " + TableName + " where Deleted=0")
Dim dt As New DataTable
dt.Columns.Add( "unit_id")
dt.Columns.Add( "unit_name" )
If ds.Tables(0).Ro ws.Count > 0 Then
dt.Rows.Add("", "")
End If
For i As Integer = 0 To ds.Tables(0).Ro ws.Count - 1
dt.Rows.Add(ds. Tables(0).Rows( i).Item(0).ToSt ring, ds.Tables(0).Ro ws(i).Item(1).T oString)
Next
vallist.DataSou rce = dt
vallist.Display Member = TextField
vallist.DataMem ber = IDField
vallist.ValueMe mber = IDField
vallist.DataBin d()
Column.Type = Infragistics.We bUI.UltraWebGri d.ColumnType.Dr opDownList
Column.ValueLis t = vallist[/CODE]
After loading the combo ,i am selected the item.If i click the submit button automatically the selected value will be changed as number.In webgrid the number only shows not the selected value.
How to solve this problem.Give solution for this.
Thanks in advance.
Comment