Hi,
I need to enable some cells of Grid for editing and the remaining cells will be readonly. Kindly note that I neither need complete column editable nor complete row, just few cells in some columns.
I need all the blue shaded column should be editable (like displayed in TextBox) and remaining column readonly (like displayed in TextBlock).
Also note that All my columns will be creating dynamically based on my Datasource. However Number of rows are fixed in my Grid. I tried to create a TemplateColumn for only those column in which I need TextBox but then TextBox is coming in complete Column cells. I am not able to set ReadOnly (Non-Editable) TextBox for other cells in the column.
I am using Infragistic 2010.3. Any help please?
You would probably want to use the CellEnteringEditMode event and set the e.Cancel flag to true for cells that you do not want to enter edit mode.
Thank you for the quick response Darrell. Kindly note that there is no "e.Cancel" flag in "CellEnteringEditMode" event handler. Although I found one property in this handler
e.Editor.Visibility = System.Windows.Visibility.Collapsed
But when user double click on such cell (which will not go to edit mode) then its (display) text will also Hide. Although this cell text come back when you click on other cell but it looks weird.
Secondly I can get Row index using e.Cell.Row.Index but how can identify column index in this event handler so that I can exactly know which cell is this?
Thanks