We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Selection Changed event in Grid Cell Combo

Hi, In my Grid,I have a Column of cell type "ComboBox".I want to make next Column ReadOnly/ Read-write based on the SelectedValue of the Combo box.How to do that.How to register the SelectionChangeCommitted event for this Combo in the Grid.And also When I am trying to get CellValue of this combo box column its always giving null even there is an item selected in the Combo. Please help. Regards, Jitendra.

2 Replies

Administrator March 10, 2005 08:58 AM UTC

There are a couple of ways you can do this depending upon whether you are using a GridControl or GridDataBoundGrid. Here is a way that should work for either case. Subscribe to either gridControl1.QueryCellInfo or gridDataBoundGrid1.Model.QueryCellInfo. In your handler, if e.RowIndex > 0 and e.ColIndex points to the column that you might want to be readonly, then get the value of the test cell using grid[e.RowIndex, testCellColIndex].CellValue. Then depending on this test value, if you want to make the cell ReadOnly, set e.Style.ReadOnly = true. Here is a KB link discussing this idea. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=95&catId=11

JI Jitendra March 11, 2005 04:59 AM UTC

Hi Clay, ThanQ very much.I tried with one. >There are a couple of ways you can do this depending upon whether you are using a GridControl or GridDataBoundGrid. > >Here is a way that should work for either case. Subscribe to either gridControl1.QueryCellInfo or gridDataBoundGrid1.Model.QueryCellInfo. In your handler, if e.RowIndex > 0 and e.ColIndex points to the column that you might want to be readonly, then get the value of the test cell using grid[e.RowIndex, testCellColIndex].CellValue. Then depending on this test value, if you want to make the cell ReadOnly, set e.Style.ReadOnly = true. Here is a KB link discussing this idea. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=95&catId=11 >
Loader.
Live Chat Icon For mobile
Up arrow icon