This is a migrated thread and some comments may be shown as answers.

CalendarExtender(AjaxControlToolkit) inside the RadGrid ?

7 Answers 373 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 03 Oct 2008, 08:36 AM
Hi,

Is there a way to add the CalendarExtender from Ajax Control Toolkit inside the RadGrid ? In my table I've got a datetime field so I need to perform a little validation for the date field.

Thanks a lot

7 Answers, 1 is accepted

Sort by
0
Missing User
answered on 06 Oct 2008, 12:35 PM
Hi Max,


You can use a template field with a TextBox and CalendarExtender as shown below:

        <div> 
            <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
                <MasterTableView AutoGenerateColumns="false"
                    <Columns> 
                        <telerik:GridTemplateColumn UniqueName="GridTemplateColumn1" HeaderText="GridTemplateColumn1" > 
                            <ItemTemplate> 
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1"/>                             
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                    </Columns> 
                </MasterTableView> 
            </telerik:RadGrid>     
        </div> 





Greetings,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Yury
Top achievements
Rank 1
answered on 24 Feb 2009, 06:29 AM
Hi, Telerik Support Team!

I've got the problem: when I use calendar exteneder in my grid template column, on Item Updating I need to use DateTime.ParseExact(...) function, because date should be displayed in particular format. How can I proceed this conversion?
0
Mike
Top achievements
Rank 1
answered on 08 Dec 2010, 03:45 PM
When I use the CalendarExtender inside of a RadGrid GridTemplateColumn, the calendar does not diplay correctly.  I use this control in various other Telerik controls with no issue.  Is this a known problem?
0
Pavel
Telerik team
answered on 10 Dec 2010, 09:29 AM
Hi Mike,

You can fix the layout by adding the following css to the head tag of your page:
<style type="text/css">
.RadGrid  td  .ajax__calendar  td
{
    padding:0;
}
</style>


All the best,
Pavel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Mike
Top achievements
Rank 1
answered on 10 Dec 2010, 02:38 PM
Thank you, works like a charm now!
0
Nitesh
Top achievements
Rank 1
answered on 25 Mar 2012, 03:02 PM
Hi Pavel,

I had the same issue with the calendar extender from the ajax tool kit and the layout doesn't display correctly even after adding that style bit, Please advice.

Nitesh
0
Martin
Telerik team
answered on 26 Mar 2012, 05:10 PM
Hello Nitesh,

I am attaching a small sample that runs as expected on my side. Please give it a try and let me know whether further assistance is needed.

Kind regards,
Martin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Max
Top achievements
Rank 1
Answers by
Missing User
Yury
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Pavel
Telerik team
Nitesh
Top achievements
Rank 1
Martin
Telerik team
Share this question
or