Hey Everyone!
So I have a radiobuttonlist, that has 2 list items(Yes/No) inside a Gridview as an ItemTemplate. I have a stored procedure that populates the gridview, but I want it to populate/select the radiobuttonlist based on the SQL Column value, I am selecting the
column in the stored procedure but I can't figure out how to bind it to the radiobuttonlist. I am looking for something along the lines if the dataset column value is 1 then to select Yes if 0 then to select No.
Here's my code so far:
RadioButtonList inside the gridview:
<asp:radiobuttonlist ID="RadioButtonList1" runat="server">
<asp:ListItem Text="Yes" Value="1" />
<asp:ListItem Text="No" Value="0" />
</asp:radiobuttonList>
C#
DataSet ds = new DataSet();
ds = Data.GridViewData(City,Convert.ToInt32(Session["Type"]));
...
Go to the complete details ...