RadCheckedDropDownList in RadGridView - writing selections back to database

1 Answer 88 Views
CheckedDropDownList GridView
R.D. Henry and Co.
Top achievements
Rank 2
Iron
Iron
Iron
R.D. Henry and Co. asked on 12 Jun 2023, 08:57 PM

Are there coding samples somewhere to give me an idea of how to write selections made in a RadCheckedDropDownList, which is inside a RadGridView, back to a database?

Thank you.

 

 

 

R.D. Henry and Co.
Top achievements
Rank 2
Iron
Iron
Iron
commented on 14 Jun 2023, 07:46 PM

No one?   I assume you iterate through it like you would a regular list box, but for items checked.  I do not know how to access the list of checked items because it's in a grid.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 15 Jun 2023, 11:01 AM

Hi Curtis,

I am assuming that you are using the approach demonstrated in the Use as RadGridView editor help article. In your case, you can subscribe to the CellValueChanged event which will be called when the cell value is changed. In your case, when you close the editor of the cell, the event handler will be called.

private void RadGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
{          
    if (e.ColumnIndex == 0) // mu column with RadCheckDropDownList
    {
        var value = e.Value;
    }
}

For updating the database, you can check the Updating the Database with ADO.Net which describes a possible approach. In your case, you can check the last section in the article: Updating the database when a single cell value is changed

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
CheckedDropDownList GridView
Asked by
R.D. Henry and Co.
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or