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

CellRenderer's OnInitialize is not getting called allways.

Thread ID:





7188 Sep 15,2003 07:58 PM UTC Sep 16,2003 07:18 AM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On September 15, 2003 07:58 PM UTC

Hi, I have derived MyCellRenderer from GridTextBoxCellRenderer and added a button. In my databoundgrid( 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 08:07 PM UTC

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 07:18 AM UTC

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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon