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

[Solved] Grid Columns Alignment/Performance Issue

1 Answer 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Taran
Top achievements
Rank 1
Taran asked on 16 Jun 2009, 04:11 PM
Hi Telerik Team,

We are having issues in Grid Columns and Items alignment. Actually, we are doing alignment of columns and items on Grid's PreRender Event but that is not getting aligned. If we do the above process in Grid's ItemDataBound Event then this event is getting fired for every record(Item) in the DataSource which is degrading the System's Performance.

Please suggest how to do the above process while keeping System's Performance up-to-date.

Thanks,
Rajesh

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 17 Jun 2009, 05:07 AM
Hi Rajesh,

I tried setting the Alignment of the Grid column in the PreRender event and is working properly. Here is the code which I tried.

CS:
 
 protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
 
        RadGrid1.MasterTableView.GetColumn("SupplierID").HeaderStyle.HorizontalAlign = HorizontalAlign.Right; 
        RadGrid1.MasterTableView.GetColumn("SupplierID").ItemStyle.HorizontalAlign = HorizontalAlign.Right; 
        RadGrid1.MasterTableView.Rebind(); 
     
    } 


Thanks
Shinu
Tags
Grid
Asked by
Taran
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or