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

Grouping Grid event handlers are not being invoked

Hi all, I am running into a weird problem of my event handlers, such as QueryCellInfo not being called. I am using a grouping grid and the code looks as follows: this.grpctrlActivityList.TableModel.QueryCellInfo += new GridQueryCellInfoEventHandler(GridQueryCellInfo); At the same time I have not had problems calling other handlers, such as this: this.grpctrlActivityList.QueryCustomSummary += new GridQueryCustomSummaryEventHandler(grpctrlActivityList_QueryCustomSummary); Am I off track with the first event?

9 Replies

AD Administrator Syncfusion Team May 31, 2005 04:15 PM

In the GridGroupingControl, you need to use the grid.QueryCellStyleInfo event instead of the grid.TableModel.QueryCellInfo event.


IK Igor Kashtelyan May 31, 2005 04:27 PM

Thank you Clay, I noticed this event, but was not sure which one to use - looks like I picked the wrong one. On a separate note, What is the best way to dynamically modify a cell type. I have set all cells to be static across the grouping grid, but one column should be allowed to be edited. I was going to override this property in the QueryCellInfo (or the one you suggested) if the colIdx is of that editable column. Is there any better way to access cell type info for each column within the grouping grid? Thanks.


AD Administrator Syncfusion Team May 31, 2005 05:58 PM

If you want to dynamically set a celltype, then QueryCellStyleInfo is the prope place.


IK Igor Kashtelyan June 1, 2005 08:30 AM

Thanks Clay, I have set in the designer view default values for all cell to be static. For one particular column, I modify the column cell type to text box and readonly to false. But the cells are still static. Is it allowed to override the static cell property in the QueryCellStyleInfo? - it''s not working... Also, If I modify the value in the cell, what is the right way to save the value in the DataSource (I have it set to a single-dimentional array and the data display works just fine). Thanks >If you want to dynamically set a celltype, then QueryCellStyleInfo is the prope place.


AD Administrator Syncfusion Team June 1, 2005 09:19 AM

In your QueyCeliInfo handler where you are trying to change the Static to TextBox also set a visible property like BackColor just so you can identify the cells that are being affected. Sometimes, depending upon what you have set up, you need to check for either RecordFieldCell or AlternaterecordField cell. Here is a little sample. http://www.syncfusion.com/Support/user/uploads/GGC_problem_7a020d8b.zip


IK Igor Kashtelyan June 1, 2005 09:38 AM

Right, Seems like we are thinking the same way (except that you know how to resolve the problem, but myself only how to identify...). I did set the back color to other - this is how I identified that the CellType change is not working...It seems that somehow it gets changed back to static upon rendering, just before exiting from the block I checked the property of the cell and the CellType was text block, but when rendered it still was static. I am going to check the example that you have sent me... Tnx >In your QueyCeliInfo handler where you are trying to change the Static to TextBox also set a visible property like BackColor just so you can identify the cells that are being affected. Sometimes, depending upon what you have set up, you need to check for either RecordFieldCell or AlternaterecordField cell. Here is a little sample. > >http://www.syncfusion.com/Support/user/uploads/GGC_problem_7a020d8b.zip > >


IK Igor Kashtelyan June 1, 2005 11:03 AM

Clay, I modify a field, but when I move a cursor the field is redrawn and old value is displayed. I try to handle the saving of a new value with TableModel.SaveCellInfo, but its handler is not called. Could you please advise why myGGC.TableModel.SaveCellInfo event handler is not being called. This is a simmilar problem as I have had in the beginning with TableModel.QueryCellInfo not being called, which arreared to be not the right place (see my original question).


IK Igor Kashtelyan June 1, 2005 12:27 PM

Clay, I modify a field, but when I move a cursor the field is redrawn and old value is displayed. I try to handle the saving of a new value with TableModel.SaveCellInfo, but its handler is not called. Could you please advise why myGGC.TableModel.SaveCellInfo event handler is not being called. This is a simmilar problem as I have had in the beginning with TableModel.QueryCellInfo not being called, which arreared to be not the right place (see my original question). >In your QueyCeliInfo handler where you are trying to change the Static to TextBox also set a visible property like BackColor just so you can identify the cells that are being affected. Sometimes, depending upon what you have set up, you need to check for either RecordFieldCell or AlternaterecordField cell. Here is a little sample. > >http://www.syncfusion.com/Support/user/uploads/GGC_problem_7a020d8b.zip > >


AD Administrator Syncfusion Team June 1, 2005 02:56 PM

Instead of grid.TableModel.SaveCellInfo, try using either grid.SaveCellText or grid.SaveCellFormattedText.

Loader.
Live Chat Icon For mobile
Up arrow icon