从blog.org的我的原博客中迁入
发表时间:2006-9-13 10:49:54
Grid OptionsColumn
2 msg
Times read: 15 [devexpress.public.dotnet.xtragrid]
Add to your favorite threads (requires login) -- Thread on dev.newswhat.com (beta)
Grid OptionsColumn
Tarun Patel [Sep 1, 09:58]
Msg has 1 replies
Add Tarun Patel to favorite authors (login)
Hi,
I have a grid with several columns displayed. The user can enter data into
the grid which is bound to a datasource. But if certain criteria is met, I
want some of the columns to be readonly.
I know how to set the OptionsColumn properties, but i can't determine the
best possible event to put the code in. Can you please direct me to the
event best suited for this?
Other grids I have used previously, used to have an event like "CanEditCell"
or similar...
Thanks in advance
Re: Grid OptionsColumn
Holger Persch [Sep 1, 11:50]
Msg has 0 replies - Go to base msg by Tarun Patel
Add Holger Persch to favorite authors (login)
Hi,
You can use the ColumnView's "ShowingEditor" event to do this.
private void gridView1_ShowingEditor(object sender, CancelEventArgs e)
{
if (condition)
{
e.Cancel = true;
}
}
Regards
Holger