TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sandeep kodepaka
NA
106
210.4k
how to add checkbox to datagrid
Dec 20 2010 2:21 AM
Hi
iam a fresher can any one helpme out how to add checkbox to a datagrid. using c#
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ShiftUpdate.aspx.cs" Inherits="Manual_Sanctions_ShiftUpdate" Title="Untitled Page" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register src="~/UserControl/Calender.ascx" tagname="Calender" tagprefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="~/UserControl/TimeFormate.ascx" tagname="TimeFormate" tagprefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table id="Table33" runat="server" class="TableList" width="100%">
<tr>
<td>
<table id="Table5" runat="server" class="TableList" width="100%">
<tr>
<td style="width: 284px">Shift Updation</td>
</tr>
</table>
<table id="Table1" runat="server" class="TableList" width="100%">
<tr>
<td style="width: 284px">Date Range</td>
</tr>
<tr>
<td style="width: 284px">From Date<uc1:Calender ID="Calender1" runat="server" /></td>
<td>To Date<uc1:Calender ID="Calender2" runat="server" /></td>
</tr>
<tr>
<td style="width: 284px">Selection Mode</td>
</tr>
<tr>
<td style="width: 284px"><asp:RadioButtonList ID="RadioButtonList1" runat="Server" Height="74px">
<asp:ListItem Text="Departmentwise" Value="Departmentwise"></asp:ListItem>
<asp:ListItem Text="Categorywise" Value="Categorywise"></asp:ListItem>
<asp:ListItem Text="Gradewise" Value="Gradewise"></asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
</table>
<table id="Table2" runat="server" class="TableList" cellpadding="1" cellspacing="1" width="100%" >
<tr>
<td style="width: 189px">Applicable</td>
<td style="width: 197px">Applicable Employees</td>
</tr>
</table>
<table id="Table25" runat="server" class="TableList" cellpadding="1" cellspacing="1" >
<tr>
<td style="width: 224px; height: 121px;"><asp:GridView ID="dgApplicable"
runat="server" AutoGenerateColumns="False" Width="136%"
AllowSorting="True" AllowPaging="True" PageSize="20" onrowediting="dgApplicable_RowEditing"
onpageindexchanging="dgApplicable_PageIndexChanging" Height="127px"
style="margin-right: 75px"
onselectedindexchanged="dgApplicable_SelectedIndexChanged" >
<Columns>
<asp:BoundField DataField="Code" HeaderText="Code" SortExpression="Code ASC"></asp:BoundField>
<asp:BoundField DataField="Category" HeaderText="Category"></asp:BoundField>
</Columns>
</asp:GridView>
</td>
<td style="height: 135px; width: 42px;"><asp:Button id="Button1" Text="->" runat="server" style="width: 51px" Font-Bold="True" ForeColor="Black" Width="87px" Height="26px"/></td>
<td>
<asp:GridView ID="dgAppEmployees" runat="server" AutoGenerateColumns="False" Width="31%"
AllowSorting="True" AllowPaging="True" PageSize="20" onrowediting="dgAppEmployees_RowEditing"
onpageindexchanging="dgAppEmployees_PageIndexChanging" Height="51px" >
<Columns>
<asp:BoundField DataField="EmpCode" HeaderText="EmpCode" SortExpression="Code ASC"></asp:BoundField>
<asp:BoundField DataField="Name" HeaderText="Name"></asp:BoundField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td colspan="1" valign="top" style="width: 224px">
<asp:CheckBox ID="CheckBox1" runat="server" Text="Select" CssClass="tableList" Height="25px" Width="126px"></asp:CheckBox>
</td>
<td></td>
<td><asp:CheckBox ID="CheckBox2" runat="server" Text="Select" CssClass="tableList" Height="25px" Width="126px"></asp:CheckBox></td>
</tr>
</table>
</td>
<td>
<table>
<tr>
<td style="width: 189px">Change Type</td>
</tr>
<tr>
<td><asp:RadioButton ID="radFix" runat="server" Text="Fix Shift" />
<asp:RadioButton ID="radRotation" runat="server" Text="Rotation" />
<asp:RadioButton ID="radweekoff" runat="server" Text="Weekoff" />
<tr>
<td>
</td>
</tr>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="176px"
AllowSorting="True" AllowPaging="True" PageSize="20" Height="51px" >
<Columns>
<asp:BoundField DataField="Code" HeaderText="Code" SortExpression="Code ASC"></asp:BoundField>
<asp:BoundField DataField="InTime" HeaderText="InTime"></asp:BoundField>
<asp:BoundField DataField="OutTime" HeaderText="OutTime"></asp:BoundField>
<asp:BoundField DataField="LocationCode" HeaderText="LocationCode"></asp:BoundField>
<asp:BoundField DataField=" " HeaderText=" "></asp:BoundField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td colspan="1" style="width: 284px"><asp:Button id="Button2" Text="UPDATE" runat="server" />
<asp:Button id="Button3" Text="EXIT" runat="server" /></td>
</tr>
</table>
</td>
</tr>
</table>
<table id="Table13" runat="server" class="TableList" cellpadding="1" cellspacing="1" >
</table>
</asp:Content>
Reply
Answers (
5
)
To download a file, which is been saved in the database
Serial USB problem