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

Set Related GridBoundColumn Value In Insert Mode Based Upon RadComboBox Value

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
GokuJim
Top achievements
Rank 1
GokuJim asked on 04 Sep 2014, 04:44 PM
I am having issues referencing a related GridBoundColumn to set its value based upon the selection of a RadComboBox inside the Insert Mode row.

Picture this:

A RadComboBox, followed by 6 GridBoundColumns in InPlace Insert Mode on a RadGrid.

When the value of the RadComboBox has changed, the OnSelectedIndexChanged event fires off, and I retrieve the values for placing into the 6 GridBoundColumns based upon the value of the RadComboBox in code behind. In that same event handler, I would like to take the values from the data retrieval and set the GridBoundColumns text values prior to the user selecting the Insert button control on the grid.

I am struggling with the proper sequence of code to access and set these 6 GridBoundColumns text values from within the handler for the OnSelectedIndexChanged event.

Can anyone give me a example snippet of code to perform this action? The Accessing cells and rows page (www.telerik.com/help/aspnet-ajax/grid-accessing-cells-and-rows.html) does not go enough into detail with the proper sequence of code to do this. It is too broken up to follow and it is mostly based upon grid handlers (i.e. ItemCreated, ItemDataBound, ItemCommand, UpdateCommand, InsertCommand or DeleteCommand) and not on a specific control's handler (i.e. OnSelectedIndexChanged of a RadComboBox).
 
Whoever replies to this thread, I thank you in advance for your help.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 09 Sep 2014, 12:50 PM
Hello James,

I'm sending a sample RadGrid web site to demonstrate a similar implementation. In your case instead of toggling the visibility of the textboxes, you will set their values. Please run the attached application and let me know if it helps you.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
GokuJim
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or