I'm trying to create a wrapped version of the RadGrid where I have properties provide my default values for certain properties. This is to reduce need to adjust the properties on each and every page that utilizes the control.
The issue I'm running into is that the values for AutoGenerateColumns, AllowSorting, and AllowPaging do not take effect when the control is rendered. In other words, even though I have AutoGenerateColumns set to false, all columns are rendered.
At what point in the Control LifeCycle can I specify values and not have them overridden?
The issue I'm running into is that the values for AutoGenerateColumns, AllowSorting, and AllowPaging do not take effect when the control is rendered. In other words, even though I have AutoGenerateColumns set to false, all columns are rendered.
At what point in the Control LifeCycle can I specify values and not have them overridden?
public class RadGrid : Telerik.Web.UI.RadGrid |
{ |
protected override void OnPreRender(EventArgs e) |
{ |
base.OnPreRender(e); |
AutoGenerateColumns = false; |
AllowSorting = true; |
AllowPaging = true; |
EnableEmbeddedSkins = false; |
Skin = "Cymetrix"; |
} |
} |