Click here to Skip to main content
15,893,266 members
Please Sign up or sign in to vote.
3.40/5 (4 votes)
See more:
Here is my questions
1.How to use a DateTimePicker in datagridview column using WindowsForms c#.net
2. how to use three checkbox.At a time one checkbox will be check.
can any one help me

Thanks & Regards
pcy
Posted
Updated 30-Jan-12 0:25am
v6
Comments
manognya kota 30-Jan-12 6:35am    
Hi,
For 2nd question,its a best practice to use radio buttons than checkboxes when one of many options need to be selected.
Check boxes are generally used to select/deselect at item level.Radio buttons are used to select from group.

-Manognya.
Anuja Pawar Indore 2-Feb-12 2:44am    
Remove asp.net tag, when it's a window based application.

Use Template Column for datetime picker
 
Share this answer
 
v3
Comments
phoolchand yadav 30-Jan-12 6:20am    
but how i can use template column in windows
Sanjay K. Gupta 30-Jan-12 8:23am    
Then why you have mention the Tag of question Under ASP.NET
 
Share this answer
 
Comments
phoolchand yadav 30-Jan-12 6:20am    
i am asking in windows not in web.
 
Share this answer
 
 
Share this answer
 
Hi friend,

XML
<form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID"
            DataSourceID="SqlDataSource1" ShowFooter="true" AllowPaging="True" AllowSorting="True">
            <Columns>
               <asp:BoundField DataField="CategoryID" HeaderText="CategoryID"
                 SortExpression="CategoryID" />
                  <asp:BoundField DataField="CategoryName" HeaderText="CategoryName"
                 SortExpression="CategoryName" />
              <asp:TemplateField>
                <ItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1"/>
                </ItemTemplate>
            </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=SUPROTIM;Initial Catalog=Northwind;Integrated Security=True"
            SelectCommand="SELECT [CategoryID], [CategoryName] FROM [Categories]" >
        </asp:SqlDataSource>

        </div>
    </form>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900