I have derived MyCellRenderer from GridTextBoxCellRenderer and added a button. In my databoundgrid(126.96.36.199) 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?
ADAdministrator Syncfusion Team September 15, 2003 04:07 PM
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 ?
ADAdministrator Syncfusion Team 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.