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

[Solved] GridTemplateColumn not working in IE10

1 Answer 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Juan
Top achievements
Rank 1
Juan asked on 15 Jul 2013, 11:27 AM
Hey Guys,

I have a RadGrid with a few Template Columns that is basically doing the same as the ButtonColumn, but I prefer to use the TemplateColumn type. When I click on the button inside this column, everything works as it should BUT NOT IN INTERNET EXPLORER 10. The error IE10 throws is this:

SCRIPT5022: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '

<!DOCTYPE html>'. 

When I switch my browser mode to Internet Explorer 9 (or earlier), then it works 100%. The problem is, we're using Telerik 2012.3.1308.40 and my client is using Internet Explorer 10, on Windows 8 (same as me). It is VITAL that the controls works in IE10. Any suggestions on why this error is happening?

The Grid layout:

<telerik:RadGrid ID="RadGridPolicies" runat="server" AllowSorting="true" DataSourceID="sqlPolicies" EnableEmbeddedSkins="false" Skin="DimsRed" OnItemCommand="RadGridPolicies_ItemCommand" OnItemDataBound="RadGridPolicies_ItemDataBound">
                        <ClientSettings EnableRowHoverStyle="true"></ClientSettings>
                        <MasterTableView AutoGenerateColumns="false" CellSpacing="-1" AllowPaging="false" DataKeyNames="groupID, groupName, groupIsActive" DataSourceID="sqlPolicies">
                            <Columns>
                                <telerik:GridBoundColumn DataField="groupID" HeaderText="groupID" UniqueName="groupID" SortExpression="groupID" Visible="false"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="groupName" HeaderText="Group Name" UniqueName="groupName" SortExpression="groupName"></telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="Status">
                                    <HeaderStyle Width="20px" HorizontalAlign="Center" />
                                    <ItemStyle Width="20px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:ImageButton ID="imgStatusGroup" runat="server" ImageUrl="Images/imgNoCancel.png" CommandName="StatusGroup" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Configure">
                                    <HeaderStyle Width="20px" HorizontalAlign="Center" />
                                    <ItemStyle Width="20px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:ImageButton ID="imgConfigureGroup" runat="server" ImageUrl="Images/imgConfigure.png" CommandName="ConfigureGroup" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Edit">
                                    <HeaderStyle Width="20px" HorizontalAlign="Center" />
                                    <ItemStyle Width="20px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:ImageButton ID="imgEditGroup" runat="server" ImageUrl="Images/imgEdit.png" CommandName="EditGroup" OnClientClick="OpenPopup('ModalWindow');" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Purge">
                                    <HeaderStyle Width="20px" HorizontalAlign="Center" />
                                    <ItemStyle Width="20px" HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:ImageButton ID="imgPurgeGroup" runat="server" ImageUrl="Images/imgDelete.png" CommandName="DeleteGroup" />
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>


The code behind:

protected void RadGridPolicies_ItemCommand(object sender, GridCommandEventArgs e)
    {
        if (e.CommandName == "StatusGroup")
        {
            int groupID = NecHelper.ParseInteger(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["groupID"].ToString());
            bool isActive = NecHelper.ParseBoolean(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["groupIsActive"].ToString());
            if (isActive)
                taPermissionGroups.UpdateGroupStatus(false, groupID);
            else
                taPermissionGroups.UpdateGroupStatus(true, groupID);
 
            RadGridPolicies.Rebind();
        }
        if (e.CommandName == "ConfigureGroup")
        {
            btnCreatePolicy.Style.Add("display", "none");
            hfCurrentPolicyID.Value = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["groupID"].ToString();
            lblActivePolicy.Style.Remove("display");
            lblActivePolicy.Text = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["groupName"].ToString();
            btnUpdatePolicy.Style.Remove("display");
            btnCancelPolicyEdit.Style.Remove("display");
 
            treeViewActive.Nodes.Clear();
            treeViewInactive.Nodes.Clear();
 
            PopulateViews(NecHelper.ParseInteger(hfCurrentPolicyID.Value));
        }
        if (e.CommandName == "EditGroup")
        {
            string groupID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["groupID"].ToString();
            litModalTitle.Text = "Edit Permission Group";
 
            taPermissionGroups.FillByGroupID(ds.AccessPermissionGroups, NecHelper.ParseInteger(groupID));
            DataRow dr = ds.AccessPermissionGroups.Rows[0];
 
            txtGroupName.Text = dr["groupName"].ToString();
            txtGroupDescription.Text = dr["groupDescription"].ToString();
        }
        if (e.CommandName == "PurgeGroup")
        {
            int groupID = NecHelper.ParseInteger(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["groupID"].ToString());
            taPermissionGroups.PurgeGroup(true, groupID);
            RadGridPolicies.Rebind();
        }
    }
 
    protected void RadGridPolicies_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            ImageButton imgStatusGroup = (ImageButton)e.Item.FindControl("imgStatusGroup");
            bool isActive = NecHelper.ParseBoolean(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["groupIsActive"].ToString());
            if (isActive)
                imgStatusGroup.ImageUrl = "Images/imgYesOK.png";
        }
    }

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 18 Jul 2013, 08:04 AM
Hi Juan,

I was not able to reproduce the issue. I prepared a small sample based on your code and attached it to this thread. Could you please give it a try and provide me with the exact steps in order to replicate the issue locally?

Regards,
Kostadin
Telerik
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 the blog feed now.
Tags
Grid
Asked by
Juan
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or