confusing of using ajax calender extender

Posted by Dotnet4ashu under ASP.NET AJAX on 2/2/2013 | Points: 10 | Views : 1170 | Status : [Member] | Replies : 3
hello experts
i am using below this code..... but i am pretty confuse is this code is correct....

Please help me how to use calender extender in gridview with relevant examples.................


<asp:TemplateField HeaderText="Booking Date">
<ItemTemplate>
<asp:TextBox ID="txt_date" runat="server" CssClass="sty_text"></asp:TextBox>
<cc1:CalendarExtender ID="calenderext" runat="server" TargetControlID="txt_date"></cc1:CalendarExtender>
</ItemTemplate>
</asp:TemplateField>

Himanshu Sharma
If you see Dreams then Get Success On Dreams.....



Responses

Posted by: Nadh123 on: 2/3/2013 [Member] Starter | Points: 25

Up
0
Down
Ajax Cotrol Must Be targetcontrolid and popupcontrolid
<asp:TemplateField HeaderText="Booking Date">
<ItemTemplate>
<asp:TextBox ID="txt_date" runat="server" CssClass="sty_text"></asp:TextBox>
<cc1:CalendarExtender ID="calenderext" runat="server" TargetControlID="txt_date" Popupcontrolid="txt_date"></cc1:CalendarExtender>
</ItemTemplate>
</asp:TemplateField>


Mahendra
91-9908699686

Dotnet4ashu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bhanubysani on: 2/4/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

If you want to add a CalendarExtender to a GridView, use a template field with a TextBox and CalendarExtender as shown below:

<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>

Regards,
Bhanu

Regards,
Bhanu Prakash Bysani

Dotnet4ashu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankitsrist on: 2/4/2013 [Member] Starter | Points: 25

Up
0
Down
Your code is correct specifically tell what error you are getting...

Dotnet4ashu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response