This is a migrated thread and some comments may be shown as answers.
gridclientslectcolumn
1 Answer 22 Views
This is a migrated thread and some comments may be shown as answers.
Ayesha
Top achievements
Rank 1
Ayesha asked on 30 Jul 2009, 02:18 PM
How do i always make my gridclient selct column checked by default??

I've a radgrid in my radpanel bar and I don't knnow even how do i get the item created evnet for that radgrid b'coz it's insisde a radpanel item and in design mode, i can see only the panel bar but not the radgrid.

 

How do i always make my gridclient selct column checked by default??


1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 31 Jul 2009, 08:06 AM
Hi Zaheka,

You can select all the rows in grid when th epage loads by using the following code snippet.

C#:
 
protected void RadGrid1_PreRender(object sender, EventArgs e) 
    RadGrid grid = (RadGrid) sender; 
    foreach (GridDataItem item in grid.MasterTableView.Items) 
    { 
        item.Selected = true
    } 

I guess you are not able to view the RadGrid which is placed in ItemTemplate of PanelBar in DesignView. If so use the SmartTag to choose Edit Templates so that you can view the radgrid in template and then add PreRender event to it. Checkout the following links to know more about working with template controls in PanelBar.
Template Design Surface
Adding Templates

Hope this helps,
Shinu.
Asked by
Ayesha
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or