Welcome Guest Search | Active Topics | Sign In | Register

Grid Custom Column -> need a dropdown to be Visible Options
Glen42
Posted: Monday, March 25, 2013 6:28:23 PM
Rank: Newbie
Groups: Member

Joined: 3/25/2013
Posts: 1
Hi

I have grid with a custom column and a dropdown in the column. Just like the advanced sample. And like the sample clicking on the column makes the dropdown to appear.

However I would like the dropdown to be visible to the user when the grid is rendered, so that the user can see the dropdown and its default selected item without clicking on the grid column.

I tried setting enable to true and visible to true for the column and the dropdown.

eo_support
Posted: Monday, March 25, 2013 6:36:55 PM
Rank: Administration
Groups: Administration

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

That won't work just with EditorTemplate. In the advanced sample, the drop down is inside the EditorTemplate. There is only one single EditorTemplate instance created for the whole column. So there is only one drop down. That drop down is then moved to any active cell when that cell enters edit mode.

However it is possible for you to create a drop down for every cell by handling the columns' ClientSideGetText client side event. You can return raw HTML from that handler that contains a select element. That select element will be placed as is inside the Grid cell. You will also want to attach some JavaScript event handler to that select element so that when user makes a selection, you would be able to update the cell value accordingly. Since HTML returned by ClientSideGetText is only displayed when the cell is NOT in edit mode, you may also need to handle ClientSideBeginEdit to return false so that it does not enter edit mode.

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.