cancel
Showing results for 
Search instead for 
Did you mean: 

Binding data to DropDownKey In table

Former Member
0 Kudos

Hi All,

I need to bind values(static) to the dropdownkey in the table through code ,can any one tell me how to perform this action in VB.Net..

if you have any code sample send it to me..

regards,

Vinoth

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi omri,

CType(Table1.Items(rowNumber.Cells(colNumber).TableCellContent, DropDownByKey).Items.Add(ddLI)

i tried it but it gives me error in braces..could u rectify the error in that code.

regards,

Vintoh

Former Member
0 Kudos

Try this

CType(Table1.Items(rowNumber.Cells(colNumber).TableCellContent<b>)</b>, DropDownByKey).Items.Add(ddLI)

Regards,

Ofer

former_member182374
Active Contributor
0 Kudos

Hi Vinoth,

Try using the following code:

CType(Table1.Items(rowNumber.Cells(colNumber).TableCellContent, DropDownByKey).Items.Add(ddLI)

where:

Table1 is your table

rowNumber is row

colNumber is column

ddLI is DropDownListItem

Also, notice that the column's number must refer to a "DropDownKey" column.

Omri