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

[Solved] Gridclient select column

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ayesha
Top achievements
Rank 1
Ayesha asked on 31 Jul 2009, 02:16 AM
Hi,

My grid has 3 columns with first column being a gridclientselectolumn??
My grid gets populated with data from another grid in another page??

so, when i bind data to my grid in 1st page, I need to have the gridclient select columns to be checked for those rows( by default even the header should be checked).

How do i implement this???
Thanks,
ZR

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 Jul 2009, 05:56 AM
Hi Zaheka,

I suppose that you are trying to preselect the Grid rows when it loads for the first time. If so you may try the following approach to loop through the grid rows and select it. Once the entire Grid rows are selected the header checkbox for the GridClientSelectColumn will be automatically selected.

CS:
 
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        if (!IsPostBack) 
        { 
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items) 
            { 
                item.Selected = true
            } 
        } 
    } 
 


Thanks
Princy
Tags
Grid
Asked by
Ayesha
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or