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

Seeking solutions for particular issues

Thread ID:

Created:

Updated:

Platform:

Replies:

59180 Apr 5,2007 08:33 PM UTC Apr 7,2007 01:48 PM UTC WinForms 2
loading
Tags: GridControl
Rahul Hans
Asked On April 5, 2007 08:33 PM UTC

Hi Guys

You live you learn they say. Well there are some issues (cant find a better word) that i am coming across with gridcontrol

I will be able to put into words just one at the moment. Rest will follow shortly.

I have a cell for which the celltype has been defined as GridListcontrol. The dropdown style has been set as AutoComplete.

There is an event CurrentCellCloseDropDown which has been defined for the grid.

In this event I am trapping whatever the user has selected from the grid and storing it temporarily until further required

Now if the user doesnt press f4 to dropdown the GridListcontrol then the event is not fired. AS it is the dropdown style is set to autocomplete so the user can just enter the value and move on to the next cell without having to actualy list the values

Now my questions are

1. Is there any way to force the dropdown when the cell receives the focus ?

2. Is there any other way out or any other elegant solution that you guys can suggest

Thanks & Regards
Rahul

haneefm [Syncfusion]
Replied On April 5, 2007 08:58 PM UTC

Hi RH,

Is there any way to force the dropdown when the cell receives the focus ?
>>>>>
Yes, One way you can do this by handling the TableControlCurrentCellActivated event and call the e.TableControl.CurrentCell.ShowDropDown() method to force to show the dropdown of the cell in a grid. Please try the suggestion and let me know if this helps.

private void gridGroupingControl1_TableControlCurrentCellActivated(object sender, GridTableControlEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.TableControl.CurrentCell.RowIndex,e.TableControl.CurrentCell.ColIndex);
if( style != null && style.CellType == "GridListControl" )
e.TableControl.CurrentCell.ShowDropDown();
}

Best regards,
Haneef

Rahul Hans
Replied On April 7, 2007 01:48 PM UTC

HI Haneef

Thanks for your help. This was just what I needed

RH

>Hi RH,

Is there any way to force the dropdown when the cell receives the focus ?
>>>>>
Yes, One way you can do this by handling the TableControlCurrentCellActivated event and call the e.TableControl.CurrentCell.ShowDropDown() method to force to show the dropdown of the cell in a grid. Please try the suggestion and let me know if this helps.

private void gridGroupingControl1_TableControlCurrentCellActivated(object sender, GridTableControlEventArgs e)
{
GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.TableControl.CurrentCell.RowIndex,e.TableControl.CurrentCell.ColIndex);
if( style != null && style.CellType == "GridListControl" )
e.TableControl.CurrentCell.ShowDropDown();
}

Best regards,
Haneef

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.

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

;