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

IPad safari - problems with hidecolums

9 Answers 212 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Svetlana
Top achievements
Rank 1
Svetlana asked on 06 Sep 2011, 12:26 PM
Hello!
I have problem with function javascript  hideColumn
Function don't works in brower safari in IPAD
despite the fact that function works in safari in PC

Regards
Sveta

9 Answers, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 08 Sep 2011, 11:32 AM
Hi Svetlana,

 I checked the show/hideColumn functions from the client-side API of the grid and they are working correctly on my side. The issue might be related to some additional client-side code or setting that you have in your application. Note that some of the client-side settings for RadGrid (e.g. context menu, resizing) are not supported yet on mobile devices.
For your reference I am attaching a sample page demonstrating showing and hiding of columns in the grid, that works on iPad.

Greetings,
Marin
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Svetlana
Top achievements
Rank 1
answered on 14 Sep 2011, 09:15 AM


Hello!
I
  plugged your sample and checked on iPad, but the same result - hide-show functions don’t work. The sample works on PC.

This is link to our site www.iscar.com/iscartooladvisor1/Default7.aspx

Regards

Sveta

0
Svetlana
Top achievements
Rank 1
answered on 14 Sep 2011, 09:15 AM


 

0
Marin
Telerik team
answered on 14 Sep 2011, 04:05 PM
Hello Svetlana,

 The link that you provided indeed does not work on iPad. Which means that probably there is some difference between the two pages. Do you use the exact same page that I sent you and do you have any other settings in the code behind? I see that the grid is not bound to any data unlike the original page. Other reason might be in the way the application is hosted and the settings on the server. You should check whether the client-side handlers for the buttons are actually fired and the code there is executed. Also do you have any other pages with client settings for the grid (e.g. row selection) that work correctly on iPad? I will appreciate if you could post an exact copy of the problematic page (both markup and code behind) so I can have a look at it.

All the best,
Marin
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
Svetlana
Top achievements
Rank 1
answered on 15 Sep 2011, 06:59 AM

Hello Marin!
I added to page the part of code for lines grid.
(I don't use LINQ) .
I checked client-side handlers for the buttons.Handlers are actually fired and the code there is executed.

I post the problematic page ( aspx and aspx.cs)

Regards
Sveta

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default7.aspx.cs" Inherits="Default7" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="margin-top: 50px; margin-left: 25px;">
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function myfunction()
            {
                var grid = $find('<%= RadGrid1.ClientID %>');
                grid.get_masterTableView().hideColumn(3);
  
            }
  
            function myfunction2()
            {
                var grid = $find('<%= RadGrid1.ClientID %>');
                grid.get_masterTableView().showColumn(3);
            }
        </script>
        </telerik:RadCodeBlock>
  
        <br />
        <asp:Button ID="Button1" Text="Hide" runat="server" OnClientClick="myfunction(); return false;" />
        <br />
        =================================
        <br />
        <asp:Button ID="Button2" Text="Show" runat="server" OnClientClick="myfunction2(); return false;" />
        <br />
        <telerik:RadAjaxLoadingPanel runat="server" ID="oRadAjaxLoadingPanel" Skin="Vista">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManager runat="server" ID="radAjax">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadGrid ID="RadGrid1" Skin="Vista" runat="server"
            Width="600px"
            AllowPaging="true" AutoGenerateColumns="false">
            <HeaderStyle Height="50px" />
            <MasterTableView>
                <Columns>
                    <telerik:GridBoundColumn DataField="CustomerID" UniqueName="111111" HeaderText="111111">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CompanyName" UniqueName="222222" HeaderText="222222">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactName" UniqueName="333333" HeaderText="333333">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactTitle" UniqueName="444444" HeaderText="444444">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
          
    </div>
    </form>
</body>
</html>
using System;
using System.Collections.Generic;
//using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
  
public partial class Default7 : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        RadGrid1.NeedDataSource += new Telerik.Web.UI.GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
    }
  
    void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        DataTable dt =new DataTable ();
        dt.Columns.Add("CustomerID");
        dt.Columns.Add("CompanyName");
        dt.Columns.Add("ContactName");
        dt.Columns.Add("ContactTitle");
         
        DataRow dr =dt.NewRow ();
        dr["CustomerID"] = "1111";
        dr["CompanyName"] = "2222";
        dr["ContactName"] = "3333";
        dr["ContactTitle"] = "4444";
        dt.Rows.Add(dr);
  
        dr = dt.NewRow();
        dr["CustomerID"] = "5555";
        dr["CompanyName"] = "12345";
        dr["ContactName"] = "7777";
        dr["ContactTitle"] = "3353535";
        dt.Rows.Add(dr);
  
        dr = dt.NewRow();
        dr["CustomerID"]= "aaaaa";
        dr["CompanyName"] = "bbbb";
        dr["ContactName"] = "ccccc";
        dr["ContactTitle"] = "ddddd";
        dt.Rows.Add(dr);
  
        RadGrid1.DataSource =dt;
        //RadGrid1.DataSource = Enumerable.Range(1, 10).Select(i => new 
        //{
        //    CustomerID = "CustomerID" + i,
        //    CompanyName = "CompanyName" + i,
        //    ContactName = "ContactName" + i,
        //    ContactTitle = "ContactTitle" + i
        //});
    }
}

0
Svetlana
Top achievements
Rank 1
answered on 15 Sep 2011, 06:59 AM
 
0
Marin
Telerik team
answered on 16 Sep 2011, 02:40 PM
Hello Svetlana,

 I checked the page and it is working on my side. So the issue can be related to some server setting or configuration. Can you specify where you host the application - IIS, Windows, iPad version etc. Also does this demo for reordering columns work on your side on iPad?

Best wishes,
Marin
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
Svetlana
Top achievements
Rank 1
answered on 19 Sep 2011, 07:50 AM

Hello Marin !
Thanks for answer to my question.
The demo for reordering columns work on my side on iPad.
The host - IIS- 6 ,Windows-XP,iPad version - 1 and 2 .

Regards.
Sveta.

0
Svetlana
Top achievements
Rank 1
answered on 19 Sep 2011, 07:50 AM
 
Tags
Grid
Asked by
Svetlana
Top achievements
Rank 1
Answers by
Marin
Telerik team
Svetlana
Top achievements
Rank 1
Share this question
or