I have a DBG bound to a datset with mutiple columns. Before the grid is displayed to the user I would like to disable my checkbox column (col 5) based on the number values in columns 2 and 3 per row.
But I am not sure of the correct place to action this type of code. Would it be best to put it in PrepareViewStyleInfo with a call to the underlying datatable to retrieve the number values or in QueryCellInfo? Any ideas? (vb.net)
ADAdministrator Syncfusion Team June 14, 2004 06:44 AM
You should use either PrepareViewStyleInfo or Model.QueryCellInfo to do this.
If e.RowIndex > 0 And e.ColIndex = 5 Then
If me.Grid(e.RowIndex, 2).Text = "???" And me.Grid(e.RowIndex, 3).Text = "???" Then
e.Style.Enabled = False
I would try this code in PrepareViewStyleInfo to see if it works there. If not, then it shoul dwork in Mode.QueryCellInfo. Here is a thread on a similar request.