CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.

YesSoftware Forums -> CodeCharge Studio -> .NET

 value of dropdown in editable grid

Print topic Send  topic

Author Message

Posts: 2
Posted: 04/30/2004, 8:03 AM

I have an editable grid, which needs to do the following:

Each row needs a button, when executed it executes a stored proc.
The proc needs the selected value of a dropdown as a parameter.

So, I created a button, added the following code to the onclick event:

System.Web.HttpContext context=System.Web.HttpContext.Current;
DataAccessObject NewDao=Settings.SunriseDataAccessObject;
string Sql = "exec RoomAllElevations '{ListBox1}'";

The proc successfully executes, although it is accepting the string literal '{ListBox1}', and not the actual value of the current row's listbox value. Any idea what variable will return the variable of the currently selected item?

View profile  Send private message
Posted: 05/04/2004, 12:57 AM


Try the following trick

firstly obtain the rpeater item, which correspond to the pressed button

RepeaterItem item = e.Item;

then find the listbox in item collection

HtmlSelect ListBox1 = (HtmlSelect)(item.FindControl("<EditableGridName>ListBox1");

after this you can obtain the selected value from listbox

string Sql = "exec RoomAllElevations '"+ListBox1.Value+"'";


Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Web Database

Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.