<asp:GridView ID="gridlob" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2" width="50%" onrowdatabound="gridlob_RowDataBound" > <Columns> <asp:BoundField DataField="LOUPe_LOB" HeaderText="Line Of Bussiness" SortExpression="LOUPe_LOB" /> <asp:TemplateField HeaderText="Grouping"> <ItemTemplate> <asp:CheckBox ID="chkReimbursable" runat="server" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
DataRowView drview = e.Row.DataItem as DataRowView; if (e.Row.RowType == DataControlRowType.DataRow) { CheckBox check = (CheckBox)e.Row.FindControl("chkReimbursable"); if (drview[1].ToString() == "Y") { check.Checked = true; } else { check.Checked = false; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)