[FIXED] [#723] GridView's DisableSelection

  1. #1

    [FIXED] [#723] GridView's DisableSelection

    On the following example, GridView's DisableSelection (Line 37) is set to true, but selection is not disabled.

    On version 2.x, it works as expected.

    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:GridPanel Title="Ext.Net" runat="server" Width="200">
            <Store>
                <ext:Store AutoLoad="true" runat="server">
                    <Proxy>
                        <ext:AjaxProxy Url="~/Example/LoadFakeRecords/">
                            <ActionMethods Read="POST" />
                            <Reader>
                                <ext:JsonReader RootProperty="data" />
                            </Reader>
                        </ext:AjaxProxy>
                    </Proxy>
                    <Model>
                        <ext:Model IDProperty="ID" runat="server">
                            <Fields>
                                <ext:ModelField Name="ID" Type="String" />
                                <ext:ModelField Name="Name" Type="String" />
                                <ext:ModelField Name="LastName" Type="String" />
                                <ext:ModelField Name="Address" Type="String" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Text="ID" DataIndex="ID" Width="100" runat="server" />
                    <ext:Column Text="Name" DataIndex="Name" Width="100" runat="server" />
                </Columns>
            </ColumnModel>
            <View>
                <ext:GridView DisableSelection="true" />
            </View>
        </ext:GridPanel>
    </body>
    </html>
    namespace SandBox.Controllers
    {
        public class ExampleController : System.Web.Mvc.Controller
        {
            public ActionResult Index()
            {
                return View();
            }
    
            public ActionResult Index2()
            {
                return View();
            }
    
            public StoreResult LoadFakeRecords()
            {
                List<Entity> lst = new List<Entity>();
    
                for (int index = 0; index < 15; index++)
                {
                    lst.Add(new Entity
                    {
                        ID = index,
                        Name = string.Format("Name - {0}", index),
                        LastName = string.Format("Last Name - {0}", index),
                        Address = string.Format("Address - {0}", index)
                    });
                }
    
                return new StoreResult(lst, lst.Count());
            }
        }
    
        [Serializable]
        public class Entity
        {
            public int ID { get; set; }
    
            public string Name { get; set; }
    
            public string LastName { get; set; }
    
            public string Address { get; set; }
        }
    }
    Last edited by fabricio.murta; Apr 27, 2016 at 2:44 AM.
  2. #2
    I would like to inform that setting GridPanel's DisableSelection to true disables the selection.
  3. #3
    Any update regarding this issue?
  4. #4
    Hello, Raphael!

    Sorry for the delay... We're doing our best to answer all threads giving the most attention. Thank you very much for your understanding, the bumps are helping us track your issues that are still waiting for feedback.

    Use this on your view's definition:
    <ext:GridView DisableSelection="true" ItemSelector="div.x-panel" />
    As per sencha documentation about views:
    In order to use these features, an itemSelector config must be provided for the View to determine what nodes it will be working with.
    I'm sorry, I believe we will have to live with this from now on.
    Fabrício Murta
    Developer & Support Expert
  5. #5
  6. #6
    Hello Raphael!

    I doubt Gary Schlosberg double-checked the documentation regarding the GridView. But, after all, if they feel like reviewing this, it will be very nice to have this feature back!
    Fabrício Murta
    Developer & Support Expert
  7. #7
    In my opinion it's a bug, so, at this moment i have nothing to add. I am gonna wait a position from Sencha.
  8. #8
    Hello!

    It was working in Ext.NET 2 and ExtJS 4. So, I guess it is supposed to be working.

    I see Sencha has opened a bug. I am not sure they'll fix it ever, but we are creating an Issue anyways.
    https://github.com/extnet/Ext.NET/issues/723

    Thank you for the report, Raphael!
  9. #9
    Hello!

    Sencha reports they fixed the issue and it should -- if not already in current version -- be in Ext.NET 4.1.0 upcoming release!

    If this issue still bugs after ExtJS 4.1.0 release, just let us know, maybe their fix wasn't really what we expected it to be. :)
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] asp.net GridView
    By gumush75 in forum 2.x Legacy Premium Help
    Replies: 8
    Last Post: Apr 04, 2014, 4:50 AM
  2. [CLOSED] Remove DisableSelection on client side
    By blueworld in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 01, 2014, 7:51 AM
  3. GridView RTL
    By mono in forum 1.x Help
    Replies: 1
    Last Post: May 17, 2012, 12:34 PM
  4. Replies: 2
    Last Post: Nov 04, 2011, 6:06 PM
  5. Replies: 2
    Last Post: Oct 06, 2011, 8:40 AM

Posting Permissions