<pre lang="xml"><asp:GridView ID="GridViewATC" runat="server" AllowSorting="True" AutoGenerateColumns="False" CssClass="gridlineClass" HeaderStyle-CssClass="freezing" GridLines="Both" BorderColor="Red" DataKeyNames="ID" DataSourceID="AccessDataSource1" EmptyDataText="There are no data records to display." ForeColor="#333333" style="border-style: solid; border-color: #FFFF00; margin-top: 0px;" PageSize="15" RowHeaderColumn="cancelled" CellPadding="4" onselectedindexchanged="GridViewATC_SelectedIndexChanged" Enabled="false" > <AlternatingRowStyle BackColor="White" BorderStyle="Solid" BorderWidth="9px" BorderColor="Red" /> <Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ButtonType="Button" InsertVisible="False" /> <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" ApplyFormatInEditMode="True" /> <asp:BoundField DataField="Short_Name" HeaderText="Short_Name" SortExpression="Short_Name" ApplyFormatInEditMode="True" > <ControlStyle Width="100px" /> <HeaderStyle Width="100px" /> <ItemStyle Width="100px" /> </asp:BoundField> <asp:BoundField DataField="Users_DN" dataformatstring="{0:(###) ###-####}" HTMLEncode="false" HeaderText="Users_DN" SortExpression="Users_DN" ApplyFormatInEditMode="True" > <ControlStyle Width="100px" /> <FooterStyle Width="200px" Wrap="False" /> <HeaderStyle HorizontalAlign="Center" Width="100px" Wrap="False" /> <ItemStyle Width="100px" Wrap="False" /> </asp:BoundField> <asp:BoundField DataField="Instant_Meeting_Owner" HeaderText="Instant Meeting Owner" SortExpression="Instant_Meeting_Owner" ApplyFormatInEditMode="True" > <ControlStyle Width="100px" /> <HeaderStyle Width="100px" Wrap="true" /> <ItemStyle Width="120px" Wrap="true" /> </asp:BoundField> <asp:BoundField DataField="column1" dataformatstring="{0:(###) ###-####}" HTMLEncode="false" HeaderText="Dial-In Number" SortExpression="column1" ApplyFormatInEditMode="True" > <ControlStyle Width="100px" /> <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="155px" /> <ItemStyle Wrap="True" Width="100px" /> </asp:BoundField> <asp:BoundField DataField="Participant_Code" HeaderText="Participant Code" SortExpression="Participant_Code" ApplyFormatInEditMode="True" > <ControlStyle Width="100px" /> <FooterStyle Width="100px" /> <HeaderStyle Width="100px" /> <ItemStyle Wrap="True" Width="100px" /> </asp:BoundField> <asp:BoundField DataField="Leader_Code" HeaderText="Leader Code" SortExpression="Leader_Code" ApplyFormatInEditMode="True" > <ControlStyle Width="80px" /> <FooterStyle Width="100px" /> <HeaderStyle Width="100px" /> <ItemStyle Width="80px" /> </asp:BoundField> <asp:BoundField DataField="Conf_ID" HeaderText="Conf_ID" SortExpression="Conf_ID" ApplyFormatInEditMode="True" /> <asp:BoundField DataField="column2" HeaderText="# of Lines" SortExpression="column2" ApplyFormatInEditMode="True" > <ControlStyle Width="20px" /> <HeaderStyle Width="50px" /> <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" /> </asp:BoundField> <asp:BoundField DataField="Date_verified" DataFormatString="{0:M/dd/yyyy}" HeaderText="Date_verified" SortExpression="Date_verified" ApplyFormatInEditMode="True" > <ControlStyle Width="100px" /> <FooterStyle Width="100px" /> <HeaderStyle Width="100px" /> <ItemStyle Width="100px" /> </asp:BoundField> <asp:CheckBoxField DataField="cancelled" HeaderText="cancelled" SortExpression="cancelled" > <ControlStyle Font-Strikeout="True" /> </asp:CheckBoxField> <asp:CheckBoxField DataField="Verified" HeaderText="Verified" SortExpression="Verified" /> <asp:BoundField DataField="Date_Cancelled" DataFormatString="{0:M/dd/yyyy}" HeaderText="Date_Cancelled" SortExpression="Date_Cancelled" ApplyFormatInEditMode="True" > <ControlStyle BorderStyle="Solid" BorderWidth="2px" Width="100px" /> <HeaderStyle Width="100px" /> <ItemStyle Width="100px" /> </asp:BoundField> <asp:TemplateField Visible="False"> <ItemTemplate> <font size="2"><<font color="#a52a2a">asp:CheckBox</font> <font color="#0000ff"><font color="#ff0000">id</font>="CheckBox1" <font color="#ff0000">runat</font>="server" <font color="#ff0000">AutoPostBack</font>="True" <font color="#ff0000">OnCheckedChanged</font>="Check_Clicked"</font><font color="#red">></font></< <font <="" color="#a52a2a">asp:CheckBox</font>><br /> </font> </ItemTemplate> </asp:TemplateField> </Columns> <EditRowStyle BackColor="#2461BF" /> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" BorderColor="Red" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#EFF3FB" BorderColor="Red"/> <AlternatingRowStyle BackColor="LightBlue" bordercolor="Red" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" BorderColor="Red" /> <SortedAscendingHeaderStyle BackColor="#6D95E1" /> <SortedDescendingCellStyle BackColor="#E9EBEF" /> <SortedDescendingHeaderStyle BackColor="#4870BE" /> </asp:GridView>
public partial class _Default : System.Web.UI.Page<br /> {<br /> protected void atcadd_Click(object sender, System.EventArgs e)<br /> {<br /> Response.Redirect("atcadd.aspx");<br /> }<br /> protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)<br /> if (e.Row.RowType == DataControlRowType.DataRow)<br /> System.Data.DataRowView cancelled = (System.Data.DataRowView)e.Row.DataItem;<br /> if (checked == (true))<br /> if (CheckBox.Equals = (checked(true)))<br /> e.Row.BackColor = System.Drawing.Color.Red;<br /> e.Row.ForeColor = System.Drawing.Color.White;<br /> e.Row.Font = System.Drawing.Font.Strikeout;<br /> public System.Data.DataColumn cancelled { get; set; }<br /> }<br /> }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)