B
Ben
Hi,
I'm designing a c# page and trying to add a checkbox column to a
GridView, I've added a Template Row (as described at:
http://aspnet.4guysfromrolla.com/articles/052406-1.aspx) and in the
Edit Templates dragged a Checkbox into the Item Template.
The new column shows up, but it's empty...no checkbox appears. Any
ideas? here's the source if it helps:
<ContentTemplate>
<asp:GridView ID="gridIssues" runat="server"
AllowSorting="True" CellPadding="4"
ForeColor="#333333" GridLines="None"
OnSorting="gridIssues_Sorting" Style="font-size: 10pt;
font-family: arial"
OnDataBinding="gridIssues_DataBinding"
OnDataBound="gridIssues_DataBound"
OnRowDataBound="gridIssues_RowDataBound" DataKeyNames="MonitorID">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" /<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-
Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White"
HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White"
ForeColor="#284775" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1"
runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
btw, I'm not setting a Data Source in the designer... in my code, I
load a DataView into memory and then bind it to the GridView... not
sure if that changes something...
Thanks so much!!
I'm designing a c# page and trying to add a checkbox column to a
GridView, I've added a Template Row (as described at:
http://aspnet.4guysfromrolla.com/articles/052406-1.aspx) and in the
Edit Templates dragged a Checkbox into the Item Template.
The new column shows up, but it's empty...no checkbox appears. Any
ideas? here's the source if it helps:
<ContentTemplate>
<asp:GridView ID="gridIssues" runat="server"
AllowSorting="True" CellPadding="4"
ForeColor="#333333" GridLines="None"
OnSorting="gridIssues_Sorting" Style="font-size: 10pt;
font-family: arial"
OnDataBinding="gridIssues_DataBinding"
OnDataBound="gridIssues_DataBound"
OnRowDataBound="gridIssues_RowDataBound" DataKeyNames="MonitorID">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" /<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-
Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White"
HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White"
ForeColor="#284775" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="CheckBox1"
runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
btw, I'm not setting a Data Source in the designer... in my code, I
load a DataView into memory and then bind it to the GridView... not
sure if that changes something...
Thanks so much!!