Welcome Guest Search | Active Topics | Sign In | Register

Grid with Excel style Options
lliu
Posted: Tuesday, January 26, 2010 10:15:28 AM
Rank: Newbie
Groups: Member

Joined: 3/31/2008
Posts: 4
Hi,

How do I add a dropdown box to the grid (with Excel Style) for update purpose? When you load the excel grid with data, the user can modify the cell value based on the predefined data from the dropdown box.

Thanks a lot for help.

Li Liu
713-627-4327
eo_support
Posted: Tuesday, January 26, 2010 10:53:51 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You can do it either on the server side or client side. If you do it on the server side, you will need to use a CustomColumn and the list will be the same for every cell in the column. See here for a working example:

http://demo.essentialobjects.com/Default.aspx?path=Grid\_i1\grid_custom_column_adv2

Note the drop down in this sample is a DropDownList control, so it raises server event when an item is selected. This may not be what you wanted. In that case you will can in a client side <select> element. In either case you will need to work with CustomColumn so that the Grid knows how to load/save data from/to your list box.

If you always want the drop down box to appear for all rows (not just the current editing row), then you would just put raw HTLM inside each cell. For example, instead of having value "item" in your cell, you would have raw HTML such as "<select><option value='1'>item 1</option><option value='2'>item 2</option></select>" in your cell.

Hope this helps.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.