J
Joey Lee
Hi,
I am doing a simple custom datagrid inheriting from DataGrid class.
I would like to set some of the values to something else so that when a user
add the custom control, the properties would already be set.
Example. AllowPaging which is false by default. I want to set to true.
However if the user decided to change it back to none, he would be allowed
todo so thru the normal properties pane in Visual Studio.
Currently in my custom control I override the OnInit method
protected override void OnInit(EventArgs e)
{
base.AllowPaging = true;
base.OnInit (e);
}
By doing so I managed to change the properties pane value of AllowPaging to
true when the user drag the customdatagrid in.
But I faced a problem when the user which to change it back to false for
AllowPaging, it will automatically change it back when i compile it. How do
i set those settings and allow new setting to override it.
However, if i were to do codebehind CDG.AllowPaging = false;. this will
work. but I would like UI manipulation instead.
Thanks
Joey
I am doing a simple custom datagrid inheriting from DataGrid class.
I would like to set some of the values to something else so that when a user
add the custom control, the properties would already be set.
Example. AllowPaging which is false by default. I want to set to true.
However if the user decided to change it back to none, he would be allowed
todo so thru the normal properties pane in Visual Studio.
Currently in my custom control I override the OnInit method
protected override void OnInit(EventArgs e)
{
base.AllowPaging = true;
base.OnInit (e);
}
By doing so I managed to change the properties pane value of AllowPaging to
true when the user drag the customdatagrid in.
But I faced a problem when the user which to change it back to false for
AllowPaging, it will automatically change it back when i compile it. How do
i set those settings and allow new setting to override it.
However, if i were to do codebehind CDG.AllowPaging = false;. this will
work. but I would like UI manipulation instead.
Thanks
Joey