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.
Unfortunately, activation email could not send to your email. Please try again.

Grouping Grid event handlers are not being invoked

Thread ID:

Created:

Updated:

Platform:

Replies:

29684 May 31,2005 05:04 PM Jun 1,2005 03:56 PM Windows Forms 9
loading
Tags: GridControl
Igor Kashtelyan
Asked On May 31, 2005 05:04 PM

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?

Administrator [Syncfusion]
Replied On May 31, 2005 05:15 PM

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

Igor Kashtelyan
Replied On May 31, 2005 05: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.

Administrator [Syncfusion]
Replied On May 31, 2005 06:58 PM

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

Igor Kashtelyan
Replied On June 1, 2005 09: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.

Administrator [Syncfusion]
Replied On June 1, 2005 10: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

Igor Kashtelyan
Replied On June 1, 2005 10: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 > >

Igor Kashtelyan
Replied On June 1, 2005 12:03 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).

Igor Kashtelyan
Replied On June 1, 2005 01: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 > >

Administrator [Syncfusion]
Replied On June 1, 2005 03:56 PM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;