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.

GDBD, CellTipText and SelectedIndex

Thread ID:





38933 Dec 21,2005 09:14 AM Dec 21,2005 02:15 PM Windows Forms 2
Tags: GridControl
Najmeh Joze-khajavi
Asked On December 21, 2005 09:14 AM

I have a GridDataBoundGrid that last column of this grid has cell type comboBox. I want to have tooltip (use CellTipText) for this column. The text for ToolTip is not static. That means depends to selectedIndex of comboBox it contains different text. As you know it is hard to get SelectedIndex for comboBox in GDBG. As far as I know I can only have that in three events CurrentCellCloseDropDown, CurrentCellShowingDropDown and CurrentCellShowedDropDown. I used CurrentCellCloseDropDown as follow. But the problem is I can''t set CellTipText in CurrentCellCloseDropDown event because it is GDBD. I have to do it in QueryCellInfo event for example but in QueryCellInfo I don''t have the SelectedIndex for comboBox. What can I do to achieve this goal? Thanks. I am using Syncfusion 3.3. private void gridTimer_CurrentCellCloseDropDown(object sender, Syncfusion.Windows.Forms.PopupClosedEventArgs e) { GridDataBoundGrid grid = sender as GridDataBoundGrid; int index; if(grid != null) { GridCurrentCell cc = grid.CurrentCell; GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer; if(cc != null) { index = cr.ListBoxPart.SelectedIndex; //Set the new Tooltip text Guid _id = _Test.LogicInputs[index].Id; // selected item in combobox LogicInputDetails liDetails = GetLogicInputDetails(_id); this.gridTimer[cc.RowIndex, cc.ColIndex].CellTipText = liDetails.LogicInputString; } } }

stanleyj [Syncfusion]
Replied On December 21, 2005 10:04 AM

Hi Najmeh, To set style for a GridDataBoundGrid PrepareViewStyleInfo or Model.QueryCellInfo handler is to be used. So to have a non static CellTipText, a hashtable is used in this sample to store the selected index and then the values in the hashtable are assigned to the grid cells through PrepareViewStyleInfo handler. Best regards, Stanley

Najmeh Joze-khajavi
Replied On December 21, 2005 02:15 PM

Thanks. It does the work.


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.