[CLOSED] Unable to lock grid view column

  1. #1

    [CLOSED] Unable to lock grid view column

    When the grid does not have an initial locked column, its not possible lock an column anymore.

    Run the following example and try to lock Column1. To make it work it's necessary to set locked to true on View's line 38

    1 - View
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Index</title>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Panel ID="Panel1" Margin="10" Header="false" runat="server">
            <Items>
                <ext:GridPanel ID="GridPanel1" runat="server" Title="Records" Frame="false" Width="300">
                    <Store>
                        <ext:Store runat="server" ID="Store2">
                            <Proxy>
                                <ext:AjaxProxy Url="/Example/LoadFakeRecords/">
                                    <ActionMethods Read="POST" />
                                    <Reader>
                                        <ext:JsonReader Root="data" />
                                    </Reader>
                                </ext:AjaxProxy>
                            </Proxy>
                            <Model>
                                <ext:Model ID="Model2" runat="server">
                                    <Fields>
                                        <ext:ModelField Name="ID" Type="String" />
                                        <ext:ModelField Name="Name" Type="String" />
                                        <ext:ModelField Name="Address" Type="String" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                            <Sorters>
                                <ext:DataSorter Property="Common" Direction="ASC" />
                            </Sorters>
                        </ext:Store>
                    </Store>
                    <ColumnModel ID="ColumnModel1" runat="server">
                        <Columns>
                            <ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" />
                            <ext:Column ID="Column1" runat="server" Text="ID" DataIndex="ID" Lockable="true" />
                            <ext:Column ID="Column3" runat="server" Text="Name" DataIndex="Name" />
                            <ext:Column ID="Column2" runat="server" Text="Address" DataIndex="Address" />
                        </Columns>
                    </ColumnModel>
                </ext:GridPanel>
            </Items>
        </ext:Panel>
    </body>
    </html>
    2 - Controller
    public class ExampleController : System.Web.Mvc.Controller
    {
        public ActionResult Index()
        {
            return View();
        }
    
        public StoreResult LoadFakeRecords()
        {
    
            List<Person> lst = new List<Person>();
    
            for (int index = 0; index < 15; index++)
            {
                lst.Add(new Person
                {
                    ID = index,
                    Name = "Name" + index,
                    Address = "Address" + index,
                });
            }
    
            return new StoreResult(lst, lst.Count());
        }
    }
    3 - Utility

    public class Person
    {
        public int ID { get; set; }
    
        public string Name { get; set; }
    
        public string Address { get; set; }
    }
    Last edited by Daniil; Nov 27, 2012 at 4:05 AM. Reason: [CLOSED]
  2. #2
    Hi Raphael,

    I think it needs to set up EnableLocking="true" for the GridPanel.

    Just Locked="true" enables it automatically, but Lockable="true" does not.
  3. #3
    Thank you Danill, please mark it as closed.

Similar Threads

  1. Replies: 7
    Last Post: Mar 27, 2013, 6:07 AM
  2. [CLOSED] Unable to get panel to fit to view port and scroll
    By Labyrinth in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 17, 2010, 9:41 PM
  3. GridPanel lock Column and Header [0.8.2]
    By Born2Code in forum 1.x Help
    Replies: 0
    Last Post: May 19, 2010, 4:49 AM
  4. Lock column from editing based on value entered on other field
    By n_s_adhikari@rediffmail.com in forum 1.x Help
    Replies: 2
    Last Post: Aug 07, 2009, 5:28 PM
  5. [CLOSED] Unable to view the design in vs 2008
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 26, 2009, 9:19 AM

Posting Permissions