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

Telerik grid issue

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dhina
Top achievements
Rank 1
Dhina asked on 18 Sep 2008, 08:49 AM
If i check a client select checkbox inside a grid and after pressing the button that particular row should be inserted.can you give me the code for this.what event should i use?how will i select that particular crow and insert into database.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 18 Sep 2008, 01:20 PM
Hi Dhina,

You can do this in the event handler of the control that generates the postback. RadGrid's SelectedItems collection holds are the items that have been selected on the client. So if you have a button click event that needs to insert all the selected items to the database, here is some sample code:

protected void Button1_Click(object sender, EventArgs e) 
    foreach (GridDataItem item in RadGrid1.SelectedItems) 
    { 
        //your custom code for insertion into the 
    } 


Sincerely yours,
Veli
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Dhina
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or