Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Template Column data depending on form data

Reply
Thread Tools

Template Column data depending on form data

 
 
John Mackerras
Guest
Posts: n/a
 
      11-15-2004
Langauage C#

I have a webform containing a dropdown control and a datagrid. A different
query is fired depending on the value of the dropdown grid, i.e. if the
dropdown grid.value = "a" then SQL queryA is fired, if the dropdown
grid.value = "b" then SQL queryB is fired.

There is a column in the datagrid for which the results depend on the query
so I need to be able to detect which value the dropdownist is.

I have tried

<asp:TemplateColumn>
<ItemTemplate>
<%# GetSecondColumn(Container) %>
</ItemTemplate>
</asp:TemplateColumn>

and letting the procedure GetSecondColumn() find the value, but
DropDownList1.SelectedValue is not visible to the public procedure.

How can I tell GetSecondColumn() what the value is of the form control
DropDownList1.SelectedValue, so I can chose which data to return.

Thanks

John


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Column Depending on Screen Resolution thepelican@gmail.com Javascript 3 11-18-2005 01:48 PM
DataGrid loses view state if first column is a template column. Ken Varn ASP .Net 1 08-19-2005 02:54 PM
Resize datagrid column depending on text enter by user pramay ASP .Net Datagrid Control 0 07-15-2005 05:29 AM
how to know if a datagrid column is a template column? Dexter ASP .Net 1 01-18-2005 01:45 PM
Activa or not activate a button column depending if another data column has data or not carlos perez ASP .Net 0 06-08-2004 02:16 PM



Advertisments