Hi All,
I use the Infragestic WebDatePicker in GridView with UpdatePanel. Our Infragistics version is (Infragistics35.Web.v10.3, Version=10.3.20103.2120).
When Page Load or postback, infragistics WebDatePicker is not display popup calendar. But when click the grid event (AddNew,Update,Delete) calendar is display.
I have no idea, which place need to configure or fix ?
Below is my script sample -
<form id="frmBL" method="post" runat="server"> <ig:WebScriptManager ID="WebScriptManager1" runat="server"> </ig:WebScriptManager>
<asp:UpdatePanel runat="server" ID="UpdatePanel1" ChildrenAsTriggers="true" UpdateMode="Always"><ContentTemplate><asp:GridView ID="grdParent" runat="server" AlternatingItemStyle-BackColor="White" AutoGenerateColumns="False" BackColor="#A8D3FF" CellPadding="-1" Font-Bold="False" Font-Italic="False" Font-Names="arial" Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" Font-Underline="False" ForeColor="#333333" PagerStyle-PageButtonCount="5" Width="100%" ShowFooter="true" AlternatingRowStyle-BackColor="#C9F3F8" EditRowStyle-BackColor="#7D7D7D" BorderStyle="None" GridLines="None" CellSpacing="2"> <HeaderStyle BackColor="#507CD1" Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Size="9" Font-Strikeout="False" Font-Underline="False" ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle" /> <FooterStyle Font-Size="9pt" HorizontalAlign="Right" /> <HeaderStyle Font-Size="9pt" HorizontalAlign="Right" /> <Columns> <asp:TemplateField> <EditItemTemplate> <asp:ImageButton ID="btnUpdate0" runat="server" CausesValidation="True" CommandName="Update" ImageUrl="~/images/check.png" Text="Update" ToolTip="Update" ValidationGroup="grpE" /> </EditItemTemplate> <ItemTemplate> <asp:ImageButton ID="btnEdit0" runat="Server" CausesValidation="False" CommandName="Edit" CommandArgument='<%# Bind("ITEM_NO") %>' Height="18px" ImageUrl="~/images/edit.png" ToolTip="Edit" /> <asp:ImageButton ID="lnkDelete0" runat="Server" CausesValidation="False" CommandArgument='<%# Bind("ITEM_NO") %>' CommandName="Delete" ImageUrl="~/images/delete_icon.png" OnClientClick="return confirm('Are you sure you want to delete this record?');" ToolTip="Delete" /> </ItemTemplate> <FooterTemplate> <asp:ImageButton ID="btnAdd0" runat="server" CausesValidation="True" CommandArgument='<%# Bind("ITEM_NO") %>' CommandName="AddNew" ImageUrl="~/images/list-add.png" Text="Add Item" ToolTip="Add Item" ValidationGroup="grpA" /> </FooterTemplate> <FooterStyle Font-Bold="True" Font-Size="9pt" HorizontalAlign="center" /> <HeaderStyle Font-Size="9pt" HorizontalAlign="center" /> <ItemStyle Font-Bold="True" Width="55px" HorizontalAlign="Center" /> </asp:TemplateField> <asp:TemplateField HeaderText="Item No"> <ItemTemplate> <asp:Label ID="lblItemNo" runat="server" Text='<%# Bind("ITEM_NO") %>' Enabled="false"></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:Label ID="lblItemNoE" runat="server" Text='<%# Eval("ITEM_NO")%>' Enabled="false"></asp:Label> </EditItemTemplate> <FooterTemplate> <asp:Label ID="lblItemNoI" runat="server" Text='<%# Bind("ITEM_NO") %>' Enabled="false"></asp:Label> </FooterTemplate> <FooterStyle Font-Size="9pt" HorizontalAlign="Center" /> <HeaderStyle Font-Size="9pt" HorizontalAlign="Center" /> <ItemStyle Font-Size="9pt" HorizontalAlign="Center" Width="5%" Font-Names="arial" /> </asp:TemplateField> <asp:TemplateField HeaderText="Receiving Date"> <ItemTemplate> <asp:Label ID="lblReceivingDate" runat="server" Text='<%# Eval("RECEIVING_DATE", "{0:dd/MM/yyyy}") %>' ></asp:Label> </ItemTemplate> <EditItemTemplate> <ig:WebDatePicker ID="dtReceivingDateE" runat="server" Value='<%# Eval("RECEIVING_DATE") %>' DisplayModeFormat="dd/MM/yyyy" EditModeFormat="dd/MM/yyyy" Width="130px"> </ig:WebDatePicker> </EditItemTemplate> <FooterTemplate> <ig:WebDatePicker ID="dtReceivingDateI" runat="server" DisplayModeFormat="dd/MM/yyyy" EditModeFormat="dd/MM/yyyy" Width="130px"> </ig:WebDatePicker> </FooterTemplate> <FooterStyle Font-Size="9pt" HorizontalAlign="Center" /> <HeaderStyle Font-Size="9pt" HorizontalAlign="Center" /> <ItemStyle Font-Size="9pt" HorizontalAlign="Center" Font-Names="arial" /> </asp:TemplateField> <asp:TemplateField HeaderText="Releasing Date"> <ItemTemplate> <asp:Label ID="lblReleasingDate" runat="server" Text='<%# Eval("RELEASING_DATE", "{0:dd/MM/yyyy}") %>'></asp:Label> </ItemTemplate> <EditItemTemplate> <ig:WebDatePicker ID="dtReleasingDateE" runat="server" Value='<%# Eval("RELEASING_DATE") %>' DisplayModeFormat="dd/MM/yyyy" EditModeFormat="dd/MM/yyyy" Width="130px"> </ig:WebDatePicker> </EditItemTemplate> <FooterTemplate> <ig:WebDatePicker ID="dtReleasingDateI" runat="server" DisplayModeFormat="dd/MM/yyyy" EditModeFormat="dd/MM/yyyy" Width="130px"> </ig:WebDatePicker> </FooterTemplate> <FooterStyle Font-Size="9pt" HorizontalAlign="Center" /> <HeaderStyle Font-Size="9pt" HorizontalAlign="Center" /> <ItemStyle Font-Size="9pt" HorizontalAlign="Center" Font-Names="arial" /> </asp:TemplateField> </Columns> <RowStyle BackColor="#EFF3FB" /> <EditRowStyle BackColor="#7D7D7D" /> <AlternatingRowStyle BackColor="White" /> </asp:GridView></ContentTemplate></asp:UpdatePanel>
</form>
===================================================
Private Sub Page_InitComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.InitComplete Me.WebScriptManager1.SupportsPartialRendering = True Me.WebScriptManager1.EnablePartialRendering = TrueEnd Sub
Private Sub grdParent_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles grdParent.RowCommand Dim strItemNo As String, strCustDeclareNo As String, strReceivingDate As Date Dim strReleasingDate As Date, strExpressWayNo As String Try If e.CommandName.ToLower = "addnew" Or e.CommandName.ToLower = "addemptyfooter" Then Me.grdParent.EditIndex = -1 If Me.grdParent.FooterRow IsNot Nothing Then strItemNo = Me.dtMain.Rows.Count + 1 strReceivingDate = CType(grdParent.FooterRow.FindControl("dtReceivingDateI"), WebDatePicker).Value strReleasingDate = CType(grdParent.FooterRow.FindControl("dtReleasingDateI"), WebDatePicker).Value Else strItemNo = 1 strReceivingDate = CType(grdParent.Controls(0).Controls(0).FindControl("dtReceivingDateEmp"), WebDatePicker).Value strReleasingDate = CType(grdParent.Controls(0).Controls(0).FindControl("dtReleasingDateEmp"), WebDatePicker).Value End If If Me.dtMain.Rows.Count <= 0 Then Me.dtMain = CDTableSchema.Clone() End If Dim oRows() As DataRow = Nothing Dim oRow As System.Data.DataRow oRow = Me.dtMain.NewRow oRow("ITEM_NO") = strItemNo oRow("RECEIVING_DATE") = strReceivingDate oRow("RELEASING_DATE") = strReleasingDate Me.dtMain.Rows.Add(oRow) dtMain.AcceptChanges() With Me.grdParent .DataSource = Me.dtMain .DataBind() End With ElseIf e.CommandName.ToLower = "delete" Then Dim oRows() As DataRow = Nothing oRows = Me.dtMain.Select("ITEM_NO='" & e.CommandArgument.ToString & "'") If oRows.Length > 0 Then Me.dtMain.Rows.Remove(oRows(0)) Me.dtMain.AcceptChanges() For Each oRow As DataRow In Me.dtMain.Select("ITEM_NO > '" & e.CommandArgument.ToString & "'") oRow("ITEM_NO") = Convert.ToInt32(oRow("ITEM_NO").ToString) - 1 Next Me.dtMain.AcceptChanges() With Me.grdParent .DataSource = Me.dtMain .DataBind() End With If Me.dtMain.Rows.Count <= 0 Then LoadCDEmptyGrid() End If End If ElseIf e.CommandName.ToLower = "edit" Then Dim oRows() As DataRow = Nothing If Me.grdParent.FooterRow IsNot Nothing Then strItemNo = CType(grdParent.FooterRow.FindControl("lblItemNoI"), Label).Text strReceivingDate = CType(grdParent.FooterRow.FindControl("dtReceivingDateI"), WebDatePicker).Value strReleasingDate = CType(grdParent.FooterRow.FindControl("dtReleasingDateI"), WebDatePicker).Value Else strItemNo = CType(grdParent.Controls(0).Controls(0).FindControl("lblItemNoE"), Label).Text strReceivingDate = CType(grdParent.Controls(0).Controls(0).FindControl("dtReceivingDateE"), WebDatePicker).Value strReleasingDate = CType(grdParent.FooterRow.FindControl("dtReleasingDateE"), WebDatePicker).Value End If oRows = Me.dtMain.Select("ITEM_NO='" & strItemNo & "'") If oRows.Length > 0 Then oRows(0)("ITEM_NO") = strItemNo oRows(0)("RECEIVING_DATE") = strReceivingDate oRows(0)("RELEASING_DATE") = strReleasingDate End If Me.dtMain.AcceptChanges() End If Catch ex As Exception DisplayMsg(ex.ToString & " - " & e.CommandName.ToLower) End Try End Sub
Private Function CDTableSchema() As DataTable Dim dt As New DataTable dt.Columns.Add("ITEM_NO") dt.Columns.Add("RECEIVING_DATE", GetType(DateTime)) dt.Columns.Add("RELEASING_DATE", GetType(DateTime)) dt.Rows.Add(dt.NewRow()) Return dt End Function Private Sub LoadCDEmptyGrid() grdParent.DataSource = CDTableSchema() grdParent.DataBind() Dim totalcolums As Integer = grdParent.Rows(0).Cells.Count grdParent.Rows(0).Cells.Clear() grdParent.Rows(0).Cells.Add(New TableCell()) grdParent.Rows(0).Cells(0).ColumnSpan = totalcolums grdParent.Rows(0).Cells(0).Text = "No Data Found" End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.LoadIf Not (Page.IsPostBack) Then LoadCDEmptyGrid()End IfEnd Sub
Hello naingoo ,
I’m glad to hear you were able to resolve your issue.
If you have any additional questions or concerns please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://ko.infragistics.com/support
Hi Maya,
I created new page (as test page), calendar is working.
But when I used in my project page, it become problem.
I am not sure, which script/configure is conflict/not working in existing page.
So I change to use other calendar.
thank.
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Developer Support Engineer
http://www.infragistics.com/support
Thank you for posting in our forum.
I see that you have a WebDatePicker in the FooterTemplate. I didn’t notice any other WebDatePickers initiated on the initial load or on postback.
I’ve created a sample based on your code and on the initial load the WebDatePickers from the Footer template were opened as expected.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.