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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDBD, CellTipText and SelectedIndex

Thread ID:





38933 Dec 21,2005 02:14 PM UTC Dec 21,2005 07:15 PM UTC WinForms 2
Tags: GridControl
Najmeh Joze-khajavi
Asked On December 21, 2005 02:14 PM UTC

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 03:04 PM UTC

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 07:15 PM UTC

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.

Please sign in to access our forum

or the page will be automatically redirected to 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