asp.net - Databinding of RadioButtonList using SelectedValue...possible? -


I am dubbed an object data source in a gridweight. There is a list in the template field in Gridview, which includes a radio button list with list definitions inline.
I want to place the selected value of the radio button list in the other underlying table as the other grid column, but it does not work!

Do I have a wrong syntax, or is it impossible, and requires looping codes to separate individual items in each line?

  & lt; Llblgenpro: LLBLGenProDataSource ID = "LlbComputerApplication" Data Container Type = "Entity Collection" Runat = "Server" & gt; & Lt; / Llblgenpro: LLBGenGradasource & gt; & Lt; ASP: Gridview id = "Grid Computer APPS" datasource id = "LLB Computer Application" Runat = "Server" Autocontent Columns = "False" blankettext = "No application found for this computer." DataKeyNames = "ComputerID, ApplicationID" EnableViewState = "False" style = "border-style: dotted; border-width: thin" & gt; & Lt; Columns & gt; & Lt; Asp: BoundField DataField = "ApplicationID" HeaderText = "Application ID" Sorted Expression = "Application ID" view = "True" /> & Lt; ASP: Template Field HeaderText = "App Name" & gt; Item templates & gt; & Lt;% # Eval ("Application.ApplicationName")%> & Lt; / Itememplate & gt; & Lt; / Asp: TemplateField & gt; & Lt; ASP: TemplateField headerText = "normal name" & gt; Item items & gt; & Lt;% # Eval ("Application.NormalizedAppName")%> & Lt; / Itememplate & gt; & Lt; / Asp: TemplateField & gt; & Lt; ASP: TemplateField headerText = "Notes" & gt; Item items & gt; & Lt;% # Eval ("Application.NormalizedNotes")% & gt; & Lt; / Itememplate & gt; & Lt; / Asp: TemplateField & gt; & Lt; ASP: TemplateField & gt; & Lt; HeaderTemplate & gt; & Lt; / HeaderTemplate & gt; & Lt; ItemTemplate & gt; & Lt; Asp: RadioButtonList selected value = '& lt;% # Eval ("RequirementOption")% & gt; Id = "rblRequirementOption" duplication direction = "horizontal" run = "server" & gt; & Lt; Asp: ListItem value = "now required" text = "now required" & gt; & Lt; / Asp: ListItem & gt; & Lt; Asp: ListItem value = "Need a day" text = "Some day requirement" & gt; & Lt; / Asp: ListItem & gt; & Lt; Asp: ListItem value = "no need" text = "no need" & gt; & Lt; / Asp: ListItem & gt; & Lt; / ASP: RadioButtonList & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: TemplateField & gt; & Lt; ASP: BoundfieldDefined = "General Notes" HeaderText = "Notes" visible = "False" /> & Lt; / Column & gt; & Lt; / ASP: GridView & gt;  

What should you do if you are getting an error? Here is a work example copied from my current project: I am compiling a faucetable bit field - so there is a hidden list item to accept the tap.

  & lt; Asp: RadioButtonList runat = "server" id = "MyRbl" SelectedValue = '& lt;% # bind ("myrbilled")% & gt; 'CssClass = "Normal Textbox" Repeat Direction = "Horizontal" & gt; & Lt; Asp: ListItem value = "wrong" text = "no" /> & Lt; Asp: ListItem value = "true" text = "yes" /> & Lt; Asp: ListItem value = "" text = "style =" display: none "/> & Lt; / ASP: RadioButtonList & gt;  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -