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.

CellRenderer's OnInitialize is not getting called allways.

Thread ID:

Created:

Updated:

Platform:

Replies:

7188 Sep 15,2003 03:58 PM Sep 16,2003 03:18 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 15, 2003 03:58 PM

Hi, I have derived MyCellRenderer from GridTextBoxCellRenderer and added a button. In my databoundgrid(1.6.1.5) I have two of "MyCell" types along with some other Textboxes. If I click "MyCell" and then click the embedded button, then myCellRenderer.OnInitialize gets called before myCellRenderer.OnButtonClicked() method. But, if I click on the button, say in r2c2, while I am in r2c1, myCellRenderer. OnButtonClicked() is called and myCellRenderer.OnInitialize() is never called. So, my renderer state is all messed up. I have some initialization code in OnInitialize() that I need to execute, so I am calling OnInitialize in OnButtonClicked() by comparing this.ColIndex != colIndex that is passed to the OnButtonClicked() method. Is this right or is it a bug? thanks, - Reddy

Administrator [Syncfusion]
Replied On September 15, 2003 04:07 PM

Hi, I tried calling Oninitialize() if ColIndex != colIndex. It is initializing the renderer properly. But if I click OK in my popup window, the selected value is getting populated into old cell. In otherwords, the new cell in which the button is clicked is never getting Activated at all. Any Ideas ? thanks, - Reddy

Administrator [Syncfusion]
Replied On September 16, 2003 03:18 AM

In the Ellipsis button from the CellButtons sample, OnInitialize is hit after the OnButtonClicked. So, it seems to be always hit. You might take a look at the code in GridDropDownCellImp.OnButtonClicked to see how it handles making sure it has teh cell initialized properly before showing teh popup.

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.

;