Seeking solutions for particular issues

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

2 Replies

HA haneefm Syncfusion Team 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


RH Rahul Hans 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

Loader.
Up arrow icon