Dec 12, 2013, 8:50 AM
[CLOSED] Grid column lock issue
Hi,
We are creating a grid using dynamic columns & modelfields as shown in below code.
Controller :
Also in firebug tool it shows error as : 'TypeError: grid.getView(...).getViewRange is not a function' in file 'ext.axd?v=28524 (line 1674)'
Please refer attached image.
If we remove Loader of RowExpander then everything works well but our main part of grid is RowExpander.
Please suggest.
We are creating a grid using dynamic columns & modelfields as shown in below code.
Controller :
List<Column> columns = new List<Column>();
columns.Add(new Column() { Text = "Columns 1", DataIndex = "index1", Width = 200 });
columns.Add(new Column() { Text = "Columns 2", DataIndex = "index2", Width = 200 });
columns.Add(new Column() { Text = "Columns 3", DataIndex = "index3", Width = 200 });
// Added extra column
columns.Insert(0, new Column() { Text = "", DataIndex = "index1", Locked = true, Width = 40, Renderer = new Renderer() { Fn = "RowActionBtnState" } });
List<ModelField> modelFields = new List<ModelField>();
modelFields.Add(new ModelField("index1"));
modelFields.Add(new ModelField("index2"));
modelFields.Add(new ModelField("index3"));
Model.ParentGridColumns = columns;
Model.ParentGridModelFields = modelFields;
View : Html.X().GridPanel()
.Header(false)
.Store(
Html.X().Store()
.PageSize(10)
.Proxy(
Html.X().AjaxProxy()
.Url(Url.Action("ReadStatePagingData"))
.Reader(Html.X().JsonReader().Root("data"))
)
.Model(
Html.X().Model().IDProperty("index1")
.Fields(Model.ParentGridModelFields)
)
)
.ColumnModel(Model.ParentGridColumns)
.Plugins(Html.X().RowExpander()
.Loader(Html.X().ComponentLoader()
.Url(Url.Action("ChildGridData", "Insurer"))
.Mode(LoadMode.Component)
.LoadMask(mask => mask.ShowMask = true)
.Params(ps => ps.Add(new Parameter("index1", "this.record.getId()", ParameterMode.Raw)))
)
.Listeners(events =>
{
events.Expand.Handler = "this.grid.doLayout();";
events.Collapse.Handler = "this.grid.doLayout();";
})
)
.BottomBar(Html.X().PagingToolbar())
When we insert a column and set its 'Locked' property to true(in Controller) the grid doesn't show the data & appears to be disabled. Also in firebug tool it shows error as : 'TypeError: grid.getView(...).getViewRange is not a function' in file 'ext.axd?v=28524 (line 1674)'
Please refer attached image.
If we remove Loader of RowExpander then everything works well but our main part of grid is RowExpander.
Please suggest.
Last edited by Daniil; Dec 24, 2013 at 8:32 AM.
Reason: [CLOSED]