Readonly Cells

Hi, I have a grouping control that shows a table and an embedded table. When I create the control I set for example groupingControl.TableDescriptor.Columns["TBOYEAR"].ReadOnly = true; I cannot enter any text so far, what''s good, anyway, I can enter the cell using mouse or F2 key and there using the backspace and delete key to erase the text. When I leave the cell the original text will be restored. How can I prevent that the content of the cells can be erased? We use SF Suite 3.0.1.0. Thanks, Christian

2 Replies

AD Administrator Syncfusion Team January 30, 2006 09:33 AM UTC

Hi Christian, This issue has been fixed in the latest version 4.1. Please use this work-around in version 3.0.1.0 for resolving this issue. private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlKeyEventArgs e) { GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell; if(cc.Renderer.StyleInfo.ReadOnly == true) if(e.Inner.KeyCode == Keys.Delete || e.Inner.KeyCode == Keys.Back) e.Inner.Handled = true; } Let us know if you need any further assistance. Regards, Madhan.

WindowsApplication120.zip


CR Christian Rattat January 31, 2006 07:45 AM UTC

Hi Madhan, exactly what I was looking for! Thanks a lot! Christian >Hi Christian, > >This issue has been fixed in the latest version 4.1. Please use this work-around in version 3.0.1.0 for resolving this issue. > > private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlKeyEventArgs e) > { > GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell; > if(cc.Renderer.StyleInfo.ReadOnly == true) > if(e.Inner.KeyCode == Keys.Delete || e.Inner.KeyCode == Keys.Back) > e.Inner.Handled = true; > } > >Let us know if you need any further assistance. > >Regards, >Madhan.

WindowsApplication120.zip

Loader.
Up arrow icon