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

Radgrid multiselect rows

5 Answers 215 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ambuj
Top achievements
Rank 1
Ambuj asked on 06 May 2011, 09:20 AM
Hi,

I am working with radgrid control, the problem description as below :-

I have a check box as a first column in the grid and I can select multiple rows, I need to get one cell value [Id] at the server side on when I select rows and click on the save button , on the save button click event.

Can you tell me how can i achive this??

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 06 May 2011, 12:52 PM
Hello Ambuj ,

Go through the link below:
http://www.telerik.com/community/forums/aspnet-ajax/grid/client-select-column-in-radgrid.aspx

Greetings,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Ambuj
Top achievements
Rank 1
answered on 09 May 2011, 09:21 AM
Hi Pavlina,

Thanks for the reply but I think I didn't explain my problem correctly to you

how to get selected rows cell value at the server side from the rad grid when I have multiselect row functionality in the grid.
like as per above I have checkbox in each row in the grid, when I select ( like 3 rows ) and click on the OK button which is on the page after the Grid , on the button click event I wanted to get all the three rows cell value?


0
Princy
Top achievements
Rank 2
answered on 09 May 2011, 09:42 AM
Hello Ambuj,

You can access the cell value by looping through all the selected items. Here is a sample code.
C#:
protected void Button1_Click(object sender, EventArgs e)
{
        foreach (GridDataItem item in RadGrid1.SelectedItems)
        {
            string s = item["ColumnUniqueName"].Text;
        }
  }


Thanks,
Princy.
0
Thomas
Top achievements
Rank 1
answered on 27 Jan 2016, 10:28 PM

All rows are selected but SelectedItems is nul/nothing, why?

0
Eyup
Telerik team
answered on 01 Feb 2016, 03:29 PM
Hi Thomas,

I am sending a sample RadGrid web site to demonstrate that the mentioned collection should keep the selected items. Please run the attached application and see about the result on your side.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Ambuj
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Ambuj
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Thomas
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or