Within a GridDataBoundGrid I have a textbox cell that I want to disable (or be ReadOnly) based on the value in a GridListControl within another cell. The value in the GridListControl is not the ValueMember or DataMember but is in one of the other columns of the GridListControl.
I''ve tried CurrentCellCloseDropDown to get the value but the setting the enable and readonly properties don''t have any effect in this event. Using QueryCellInfo I can disable the textbox cell if I use some other criteria such as a value in another cell of the grid. But, I want to use the value from one of the columns in the GridListControl to determine when the textbox cell is disabled.
If I could get a selected index value from the GridListControl during the QueryCellInfo event that would work, but I don''t see a way to do that. The datasource for the GridListControl does not have unique values for the ValueMember so I can''t use that either. How can I disable a textbox cell based on a value in a column from a GridListControl cell within a GridDataBoundGrid?
ADAdministrator Syncfusion Team July 13, 2004 04:15 PM
Unless there is some way to get at the value you want directly from the DataSource of the GridListControl knowing either the DisplayMember or the ValueMember, I think you will have to save the value you want in the CurrentCellShowingDropDown event.
So, you could maintain either a Hashtable or ArrayList of values saved in CurrentCellShowingDropDown. Then in QueryCellInfo, you could get the value you need to check from the Hashtable or ArrayList.