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

Save value through grid contain drop down and immediate reterive in to Grid Column

1 Answer 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Samir Patel
Top achievements
Rank 1
Samir Patel asked on 26 Aug 2011, 09:28 AM
Hello,

I need help to retrieve and save into DB through grid.

Scenario:
I have one main grid , and this grid Contain three column , Menu name , Assigned school, and Select school ....

When User create a New menu and save, then Immediately Menu name Displayed in the grid , now The select school Column contain the Drop down for each grid row contain the School name with the Check box.

I want to implement feature here is "

When User check the check box of any school /s from this drop down , after out of focus from this Drop down , checked value (School) stored in to DB, and Refresh my grid / page , and Immediately shows the selected school in my "Assigned School" column of the Grid..

How can i do this, ?  Possible send me the example , that would great great help...

REgards
Samir

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 31 Aug 2011, 12:09 PM
Hi Samir,

To implement this scenario, you can use a GridTemplateColumn with a DropDownList or a RadComboBox in the ItemTemplate (as far as I understand, you need to be able to edit grid data without explicitly setting an item in edit mode). The combo can have AutoPostBack="true" and you can use its server-side SelectedIndexChanged event to get the selected value and insert it in your database. Finally, rebinding RadGrid will have the changes applied to your grid.

Here are a few help topics that may be useful:

RadGrid column types
RadGrid advanced databinding
RadGrid declarative data sources
RadComboBox databind overview
RadComboBox SelectedIndexChanged event

Veli
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Samir Patel
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or