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

[Solved] GridClientSelectColumn self handle problem

1 Answer 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Artware
Top achievements
Rank 1
Artware asked on 10 Mar 2008, 03:23 PM
Hi there,
I'm having troubles with the GridClientSelectColumn.
I'll expose you my problem so that you can easily understand:

I have a simple grid that has a GridClientSelectColumn as first column.
now, I put a button outside the grid that when is pressed needs to redirect to a certain URL by passing to it a list of the IDs corresponding to each row.
so:

------------------
MyGrid structure |
--------------+-------+-----+-----+-----+
checkColumn | DocID | Stuff |Stuff | Stuff  |
--------------+-------+-----+-----+-----+

outside of this as I said before I have an an
"asp:LinkButton"

so the main goal for me should be When I check / uncheck a checkbox I need to collect in a List of strings the "DocID", so that I can pass it to my url in a second time.

hope I made myself clear.

thanks in advance
cheerz

-k-

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 12 Mar 2008, 08:04 AM
Hi Artware,

In LinkButton's Click event handler you can retrieve MyGrid.SelectedItems collection. Then you can loop through it and get DocID for each item. Here is an example:

foreach (GridDataItem item in MyGrid.SelectedItems) 
        { 
            Response.Write(item.GetDataKeyValue("DocID").ToString() + "<br/>"); 
        } 

Hope this helps.

Kind regards,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Artware
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or