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

Deleting unnecessary columns upon Page load

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Raj Kamal
Top achievements
Rank 1
Raj Kamal asked on 06 Jan 2016, 06:55 AM

HI,

We have many columns to be displayed in UI, we are displaying static columns in UI using telerik on page load, which is taking a lot of time. Is there anyway where we can delete unnecessary columns before page load so that loading time will decrease. Please help me out here, Thanks in advance.

Thanks and Regards,

Raj Kamal Singh Rathore.

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 08 Jan 2016, 01:20 PM
Hi Raj,

A possible solution is to hide the column OnPreRender event handler by using Visible property of the columns. This way the columns will not be rendered on the page.
protected void Page_PreRender(object sender, EventArgs e)
{
    RadGrid1.MasterTableView.GetColumn("Column2").Visible = false;
    RadGrid1.MasterTableView.GetColumn("Column3").Visible = false;
}

Keep in mind you can loop through the columns collection and hide the one which you do not want to display.

Regards,
Kostadin
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
Raj Kamal
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or