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
close icon

Few Queries related with Edit functionality

Hi Clay, I''m using a GDBG grid. This grid is initially in Readonly mode. When the user clicks on edit button after selecting a particular row, then that selected row will become editable. I was able to make the grid Readonly and the selected row editable, but when the user leaves the curren row and comes back to the same row, that row is turning back to Readonly mode. How do I retain the row in the Edit mode until the User Commits the Changes he made. And the second thing, I''m having a Checkbox column bounded to a Database field in the Grid. But I couldn''t enable that Column when the User clicks on Edit. The user was unable to Check/Uncheck the Column. Please help me out in solving these problems. Thanks, Thiagu.

5 Replies

SH Stefan Hoenig September 20, 2004 12:40 PM UTC

Hi Thiagu, you need to provide some storage where you can specify which rows should be editable and which not. This could be a field in your DataRow or it could be Hashtable. You could then handle QueryCellInfo and set e.Style.ReadOnly = false for those rows that have been marked readonly and e.Style.ReadOnly = true otherwise. That should also work with the CheckBoxes. If for some reason ReadOnly settings are cached internally try calling also Model.ResetVolatileData(). This will ensure that QueryCellInfo gets triggered again adn then you should be able to click on the checkbox. Stefan


TH Thiyagu September 20, 2004 01:00 PM UTC

Hi Stefan, It will be of great help for me if you can send me some sample code. Thanx in advance, Thiagu. >Hi Thiagu, > >you need to provide some storage where you can specify which rows should be editable and which not. > >This could be a field in your DataRow or it could be Hashtable. > >You could then handle QueryCellInfo and set e.Style.ReadOnly = false for those rows that have been marked readonly and e.Style.ReadOnly = true otherwise. > >That should also work with the CheckBoxes. If for some reason ReadOnly settings are cached internally try calling also Model.ResetVolatileData(). This will ensure that QueryCellInfo gets triggered again adn then you should be able to click on the checkbox. > >Stefan >


AD Administrator Syncfusion Team September 20, 2004 01:51 PM UTC

Attached find an example. Stefan ToogleRowEditState_9495.zip


TH Thiyagu September 21, 2004 06:59 AM UTC

Stefan, Seems some problem in the application you ''ve send. It''s not fetching the data and not allow me to edit the row which is empty. Thiagu. >Attached find an example. > >Stefan > >ToogleRowEditState_9495.zip > >


AD Administrator Syncfusion Team September 21, 2004 10:11 AM UTC

Just set useMSDE = true or make place the sample under the Grid\Samples folder so that it can pick up the Xml file from the Suite\Data folder. Regarding the last row, you can compare e.RowIndex == Model.RowCount and then set the ReadOnly setting appropriately in QueryCellInfo. Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon