N
NKaufman
<asp:GridView ID="Basic" runat="server"
DataKeyNames="QuestionID,isHeading" AutoGenerateColumns="false"
AllowPaging="true" PageSize="100">
<Columns>
<asp:BoundField Visible="false" DataField="QuestionID"
HeaderText="QuestionID"></asp:BoundField>
<asp:BoundField DataField="QuestionDesc"
HeaderText="Question"
ItemStyle-HorizontalAlign="Left"></
asp:BoundField>
<asp:TemplateField HeaderText="Answer">
<ItemTemplate>
<asp:RadioButtonList
RepeatDirection="Horizontal" runat="server"
ID="rdAnswer" SelectedIndex='<%#
SetState(DataBinder.Eval
(Container.DataItem,"Answer"))%>'>
<asp:ListItem Value="0">Yes</
asp:ListItem>
<asp:ListItem Value="1">No</
asp:ListItem>
</asp:RadioButtonList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Hello,
I need to create a gridview programmatically in code that would be
similar to the above code (in design mode).\
Any pointers?
Thanks,
DataKeyNames="QuestionID,isHeading" AutoGenerateColumns="false"
AllowPaging="true" PageSize="100">
<Columns>
<asp:BoundField Visible="false" DataField="QuestionID"
HeaderText="QuestionID"></asp:BoundField>
<asp:BoundField DataField="QuestionDesc"
HeaderText="Question"
ItemStyle-HorizontalAlign="Left"></
asp:BoundField>
<asp:TemplateField HeaderText="Answer">
<ItemTemplate>
<asp:RadioButtonList
RepeatDirection="Horizontal" runat="server"
ID="rdAnswer" SelectedIndex='<%#
SetState(DataBinder.Eval
(Container.DataItem,"Answer"))%>'>
<asp:ListItem Value="0">Yes</
asp:ListItem>
<asp:ListItem Value="1">No</
asp:ListItem>
</asp:RadioButtonList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Hello,
I need to create a gridview programmatically in code that would be
similar to the above code (in design mode).\
Any pointers?
Thanks,