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. Image for the cookie policy date
close icon

drop down help

hi,
i have added a colum with drop dowm cell type as.

dgSellingPrice.TableDescriptor.Columns[Constants.PRICE_VATRATE_GRIDCOLUMN].Appearance.AnyCell.ChoiceList = s;

The problem is i am able to type in any thing on the dropdown cell. I want that the user should be forced to pick up data from the drop down options only.

Please help.

3 Replies

HA haneefm Syncfusion Team May 16, 2007 08:17 PM UTC

Hi Dinesh,

You can try setting the DropDownStyle property to GridDropDownStyle.Exclusive.

dgSellingPrice.TableDescriptor.Columns[Constants.PRICE_VATRATE_GRIDCOLUMN].Appearance.AnyCell.DropDownStyle=GridDropDownStyle.Exclusive

Best regards,
Haneef


DU dinesh upreti May 17, 2007 10:36 AM UTC

Thanks, it worked,

but the problem now is that when i change the value in the drop down and try to tab out or click any where else in grid, the row remains in the edit mode. so it is not commiting the changes i have done to the cell.
what can be the solution for this.

Thanks

Dinesh

>hi,
i have added a colum with drop dowm cell type as.

dgSellingPrice.TableDescriptor.Columns[Constants.PRICE_VATRATE_GRIDCOLUMN].Appearance.AnyCell.ChoiceList = s;

The problem is i am able to type in any thing on the dropdown cell. I want that the user should be forced to pick up data from the drop down options only.

Please help.


HA haneefm Syncfusion Team May 17, 2007 11:47 PM UTC

Hi Dinesh,

To push all data to underlying datasource for every cell movement, you need to call in Table.EndEdit Method(before calling this , you need to call the CurrentCell''s Edit method) in the TableControlCurrentCellMoving event of the grid. Here is a code snippet.

e.TableControl.CurrentCell.EndEdit(); //saves the currentcell
e.TableControl.Table.EndEdit();

Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon