Welcome Guest Search | Active Topics | Sign In | Register

Using DropDown in Eo.Gris Options
Hemant
Posted: Thursday, February 9, 2012 9:07:06 AM
Rank: Newbie
Groups: Member

Joined: 2/9/2012
Posts: 1
Sir/Ma'am,

I am using Dropdown In Eo.grid but i can not get dropdown id at button_click event in codebehind.

Could you Please explain how can we get dropdown's item id and value, As we are providing the facility to edit the dropdown in Eo .grid's edit event,there i am not able to fetch which value has been set in dropdown list so can save in DB.
Could you please suggest how can i edit the dropdown list and save in DB while editing the EO.GRID through traditional style.

Hemant soni
Dotsquares
Jaipur
eo_support
Posted: Thursday, February 9, 2012 9:46:11 AM
Rank: Administration
Groups: Administration

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

You can use server side code to set the drop down items. You would get the drop down with code like this:

Code: C#
//Get the custom column. This code assumes the first column is custom column
EO.Web.CustomColumn column = (EO.Web.CustomColumn)Grid1.Columns[0];

//Get the drop down control
DropDownList dropDown =
    (DropDownList)column.EditorInstance.FindControl("DropDown1");

//Now you can fill in the drop down items
....


You can NOT use server side code to get the drop down's selected value. This is because all cells in the column shares a single drop down, so drop down's selected value has no meaning. Instead when you select an item from the drop down, the selected value is passed to the grid and associated to the grid cell that you were editing. You would then get the value from the grid cell. See here for more information about how a CustomColumn interacts with controls inside its editor template:

http://www.essentialobjects.com/doc/1/grid/custom_column.aspx

Hope this helps. Please feel free to let us know if you have any more questions.

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.