May 18, 2015, 12:49 PM
[CLOSED] Combobox in header items returns value.split error
I'm using the FilterHeader plugin on gridpanel. I have a field "CompanyTypeId" which uses a rendererer function to output the lookup name. I want a combobox that displays the names but sets the filter to the Id column. It looks like it get's most of the way to working but then expects the getValue output of the combobox to be a string.
error: Uncaught TypeError: value.split is not a function Ext.define.statics.behaviour.numeric.is
i.e. var parts = value.split(/(>=|<=|>|<)/i);
Any help would be appreciated.
error: Uncaught TypeError: value.split is not a function Ext.define.statics.behaviour.numeric.is
i.e. var parts = value.split(/(>=|<=|>|<)/i);
Any help would be appreciated.
@(Html.X().GridPanel().ID("CompanyList")
.Store(
Html.X().Store().AutoLoad(true).AutoSync(true).Model(Model.CompanyModel)
.Proxy(
Html.X().AjaxProxy()
.Url(Url.Action("SetupGet" + RecNamePlural))
.Reader(Html.X().JsonReader().Root("data"))
.API(x => x.Update = Url.Action("SetupUpdate"+RecName))
.API(x => x.Create = Url.Action("SetupCreate"+RecName))
.API(x => x.Destroy = Url.Action("Destroy"+RecName))
.Writer(x => x.Add(Html.X().JsonWriter().AllowSingle(true).Root("Data").Encode(true)))
)
)
.ColumnModel(
Html.X().Column().Text("Id").DataIndex("CompanyId").MinWidth(80),
Html.X().Column().Text("Name").DataIndex("Name").MinWidth(100).Flex(1),
Html.X().Column().Text("Area").DataIndex("CompanyTypeId").MinWidth(100).Flex(1).Renderer("CompanyTypeRenderer")
.HeaderItems(
Html.X().ComboBox().QueryMode(DataLoadMode.Local).StoreID("CompanyTypeStore").Name("CompanyTypeId").DisplayField("Name").ValueField("CompanyTypeId")
)
)
.Plugins(
X.FilterHeader()
)
)
}
Model:return new Model()
{
Fields =
{
new ModelField("CompanyId", ModelFieldType.Int),
new ModelField("Name", ModelFieldType.String),
new ModelField("CompanyTypeId", ModelFieldType.Int),
},
IDProperty = "CompanyId",
Name = "Company"
};
Last edited by Daniil; May 26, 2015 at 4:14 PM.
Reason: [CLOSED]