Oct 07, 2014, 6:13 PM
[CLOSED] GridPanel ComboBox editor using AjaxProxy: Display blank column MVC
Hi ,
I found almost same problem (http://forums.ext.net/showthread.php...y-blank-column),
but my application in MVC.
Renderer Script
I found almost same problem (http://forums.ext.net/showthread.php...y-blank-column),
but my application in MVC.
Renderer Script
var MaterialCatergoryRenderer = function (value) {
var r = App.Store_MaterialCatergory.getById(value);
if (Ext.isEmpty(r)) {
return "";
}
return r.data.CategoryName;
};
StoreX.Store()
.ID("Store_MaterialCatergory")
.Model(
X.Model()
.IDProperty("MaterialCatergoryID")
.Fields(
X.ModelField()
.Name("MaterialCatergoryID")
.ServerMapping("MaterialCatergoryID")
.Type(ModelFieldType.Int)
,
X.ModelField()
.Name("CategoryName")
.ServerMapping("CategoryName")
.Type(ModelFieldType.String)
)
)
.AutoLoad(false)
.Proxy(Html.X().AjaxProxy()
.Url(Url.Action("../QuotationEntry/Pur_Master_MaterialCategory_Get"))
.Reader(Html.X().JsonReader().Root("data"))
)
.Listeners(l=>{
l.Load.Handler = "App.Store_MaterialCatergory.load();";
l.Load.Single = true;
})
//.DataSource(ViewBag.MaterialCatergory)
)
Combobox Inside GridX.Column()
.DataIndex("MaterialCatergoryID")
.Text("Category")
.Renderer("MaterialCatergoryRenderer")
.Sortable(false)
.MenuDisabled(true)
.Editor(
X.ComboBox()
.QueryMode(DataLoadMode.Local)
.StoreID("Store_MaterialCatergory")
.ValueField("MaterialCatergoryID")
.DisplayField("CategoryName")
.AllowBlank(false)
.SelectOnFocus(true)
.SelectOnTab(true)
.Triggers(
Html.X().FieldTrigger().Icon(TriggerIcon.Clear).Qtip("Remove selected")
)
.Listeners(l =>
{
l.TriggerClick.Handler = "this.clearValue();";
l.Focus.Handler = @"if(this.getValue()==0)
{
this.clearValue()
};";
})
.EmptyText("Select")
)
I do as per Daniil's suggestion ,but not working.
Last edited by Daniil; Oct 09, 2014 at 7:31 AM.
Reason: [CLOSED]