This is a migrated thread and some comments may be shown as answers.

Using InPlace EditMode causes drop down lists to put DataTextField into DataValueField

1 Answer 20 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 08 Jul 2013, 02:00 AM
I have a grid that works great.

When I edit it I fill a combo box with data.  Everything works great until I change EditMode to InPlace.  When I do that the combo box has the DataTextField in its SelectedValue field.

Here is how I load the data into the RadComboBox.

ddlSecurityRole.DataSource = ocRoles
ddlSecurityRole.DataTextField = "Description"
ddlSecurityRole.DataValueField = "ID"
ddlSecurityRole.DataBind()

When I read the data I do this.
O.ID_SecurityRole = CLng(DirectCast(objEI("SecurityRole").Controls(0), RadComboBox).SelectedValue)

If I have EditMode="InPlace" in my MasterTableView tag then the .SelectedValue equals the Description instead of the ID.

If I remove EditMode="InPlace" then .SelectedValue equals the ID.

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 08 Jul 2013, 06:10 AM
Hello,

Please check below link, In this link i have provided sample code.

http://www.telerik.com/community/forums/aspnet-ajax/grid/griddropdowncolumn-first-row-does-not-show-value.aspx#2665600

Let me know if any concern.

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Ken
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or