aspx_beginners thread: DataGrid: SelectedItemStyle Not working...
Hi
I want the selected Row to appear to have a RED back ground.
This is my code: But its do4esn't work ? why ?
<asp:datagrid id="FileList" runat="server" Visible="False"
AllowSorting="True" AutoGenerateColumns="False" CellPadding="2"
CellSpacing="2" BorderStyle="None" BorderWidth="0" BackColor="white"
Width="100%" HorizontalAlign="Left" Font-Name="Verdana" Font-Size="8pt">
<HeaderStyle BackColor="#dddddd" CssClass="NormalBlack" Font-Bold="True"
Font-Name="Verdana" Font-Size="8pt" HorizontalAlign="Left" />
<SelectedItemStyle BackColor="#990000" ForeColor="#990000" /> '<--
<AlternatingItemStyle BackColor="#eeeeee" />
<Columns>
<asp:BoundColumn SortExpression="Filename" ReadOnly="True"
HeaderText="Filename" DataField="Filename" />
<asp:ButtonColumn ButtonType="LinkButton"
ItemStyle-HorizontalAlign="Center" ItemStyle-Width="45" CommandName="DoView"
Text="View" />
<asp:BoundColumn HeaderText="Size" ReadOnly="True" DataField="Size"
DataFormatString="{0:#,####KB}" />
<asp:BoundColumn SortExpression="Type" ReadOnly="True" HeaderText="Type"
DataField="Type" />
<asp:BoundColumn SortExpression="Modified" ReadOnly="True"
HeaderText="Modified" DataField="Modified" DataFormatString="{0:d}" />
<asp:EditCommandColumn ItemStyle-HorizontalAlign="Center"
ItemStyle-Width="45" UpdateText="Yes" CancelText="No" EditText="Delete" />
</Columns>
</asp:datagrid>
Best Regards
Robert Sindall
_______________________________
Tel: +44 (0)1242 251251
Email: rsindall@z...
Website: http://www.zethics.com
Hi
I want the selected Row to appear to have a RED back ground.
This is my code: But its do4esn't work ? why ?
<SelectedItemStyle BackColor="#990000" ForeColor="#990000" />
<AlternatingItemStyle BackColor="#eeeeee" />
<Columns>
etc...
</Columns>
</asp:datagrid>
Best Regards
Robert Sindall
_______________________________
Tel: +44 (0)1242 251251
Email: rsindall@z...
Website: http://www.zethics.com