updatepanel, gridview, calendar


J

JohnE

I have a gridview that is inside an update panel. In the gridview there is a
date field. In the Update mode, a calendar extender is used for a calendar
extender (the full template source below). Simple, effective, and very user
friendly when the update panel is not used.
<asp:TemplateField HeaderText="Target End Date"
SortExpression="DevTargetEndDate">
<ItemTemplate>
<asp:Label ID="lblDevTargetEndDate"
runat="server" Text='<%# Bind("DevTargetEndDate", "{0:M-d-yyyy}")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtDevTargetEndDate"
runat="server" Text='<%# Bind("DevTargetEndDate", "{0:M-d-yyyy}")
%>'></asp:TextBox>
<cc1:CalendarExtender ID="calDevTargetEndDate"
runat="server" TargetControlID="txtDevTargetEndDate"
Format="M/d/yyyy"
CssClass="ListEdit_theme1" >
</cc1:CalendarExtender>
</EditItemTemplate>
</asp:TemplateField>

When the update panel is used, the calendar is smaller, cramped looking, and
not very user friendly. How the update panel and calendar able to co-exist
together on the same gridview, properly?

Thanks...John
 
Ad

Advertisements

A

Andy O'Neill

When the update panel is used, the calendar is smaller, cramped looking,
and
not very user friendly. How the update panel and calendar able to
co-exist
together on the same gridview, properly?

I've not fully explored it myself, but I heard the updatepanel can't cope
with templated controls.
If you google on "gridview updatepanel problem" you will see a stack of
hits.

Ajax is nice when it just works, not so nice when it doesn't.
I moved onto silverlight.
 
S

SOURAV DEY

I have a gridview that is inside an update panel.  In the gridview there is a
date field.  In the Update mode, a calendar extender is used for a calendar
extender (the full template source below).  Simple, effective, and very user
friendly when the update panel is not used.  
                    <asp:TemplateField HeaderText="Target End Date"
SortExpression="DevTargetEndDate">
                        <ItemTemplate>
                            <asp:Label ID="lblDevTargetEndDate"
runat="server" Text='<%# Bind("DevTargetEndDate", "{0:M-d-yyyy}")
%>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="txtDevTargetEndDate"
runat="server" Text='<%# Bind("DevTargetEndDate", "{0:M-d-yyyy}")
%>'></asp:TextBox>
                            <cc1:CalendarExtender ID="calDevTargetEndDate"
runat="server" TargetControlID="txtDevTargetEndDate"
                                    Format="M/d/yyyy"
CssClass="ListEdit_theme1" >
                            </cc1:CalendarExtender>
                        </EditItemTemplate>
                    </asp:TemplateField>            

When the update panel is used, the calendar is smaller, cramped looking, and
not very user friendly.  How the update panel and calendar able to co-exist
together on the same gridview, properly?

Thanks...John



Hi John,

Check whether your gridview is within some div or span or panel. If
your griview is inside these type of placeholders then put it outside
of that and try.
Let me know the result.
 
Ad

Advertisements

J

JohnE

The gridview is inside the update panel so it does not go blank or flicker
when controls are used. The calendar extender is in a templated field of the
gridview.
When the update panel is not used, all works and looks just fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top