View Full Version : [CLOSED] Unable to lock grid view column

Nov 26, 2012, 2:05 PM
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>
<head runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Panel ID="Panel1" Margin="10" Header="false" runat="server">
<ext:GridPanel ID="GridPanel1" runat="server" Title="Records" Frame="false" Width="300">
<ext:Store runat="server" ID="Store2">
<ext:AjaxProxy Url="/Example/LoadFakeRecords/">
<ActionMethods Read="POST" />
<ext:JsonReader Root="data" />
<ext:Model ID="Model2" runat="server">
<ext:ModelField Name="ID" Type="String" />
<ext:ModelField Name="Name" Type="String" />
<ext:ModelField Name="Address" Type="String" />
<ext:DataSorter Property="Common" Direction="ASC" />
<ColumnModel ID="ColumnModel1" runat="server">
<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" />

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; }

Nov 26, 2012, 5:45 PM
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.

Nov 26, 2012, 7:21 PM
Thank you Danill, please mark it as closed.