[CLOSED] Combobox Display field not showing inside grid panel

  1. #1

    [CLOSED] Combobox Display field not showing inside grid panel

     
    @( Html.X().Store()
                        .ID("stormaterialid")
                         
                        .Model(
                            Html.X().Model()
                                .IDProperty("MaterialID")
                                .Fields(
                                  Html.X().ModelField().Name("MaterialID").Type(ModelFieldType.Int),
                                    Html.X().ModelField().Name("MaterialName").Type(ModelFieldType.String)
    
                                 )
    
    
                                )
                                  .ServerProxy(X.AjaxProxy()
                                .Url(Url.Action("Pur_MaterialInformation_Get", "MaterialRequisitionsEntry"))
                                .Reader(X.JsonReader().Root("data"))
                                                      )
    
                                )
    
    
    
    
    
    
    
    
    
     Html.X().GridPanel().ColSpan(4)
                .ID("gridpanel")
                .Width(600)
                .Height(300)
                .Border(false)
                .Title("Edit Plants")
                .Header(false)
                 // .Layout(LayoutType.Fit)
                .Frame(true)
                .Listeners(l =>
                        {
                            l.ViewReady.Fn = "addPlant";
                            l.ViewReady.Delay = 1;
                        })
                .Store(
                    Html.X().Store().ID("Store1")
                        .Model(
                            Html.X().Model().ID("Model1")
                                .Name("PR")
    
                                .Fields(
                                    Html.X().ModelField().Name("materialid").Type(ModelFieldType.Int),
                                    Html.X().ModelField().Name("uomcode").Type(ModelFieldType.Int),
                                    Html.X().ModelField().Name("avaiablestock").Type(ModelFieldType.Float),
                                    Html.X().ModelField().Name("requireqty").Type(ModelFieldType.Float),
                                    Html.X().ModelField().Name("UnitRate").Type(ModelFieldType.Float),
                                    Html.X().ModelField().Name("totalvalue").Type(ModelFieldType.Float),
                                    Html.X().ModelField().Name("approvedqty").Type(ModelFieldType.Float),
                                    Html.X().ModelField().Name("approvedunitrate").Type(ModelFieldType.Float),
                                    Html.X().ModelField().Name("approvedtotalvalue").Type(ModelFieldType.Float)
    
                                )
                        )
    
    
                )
    
                .ColumnModel(
    
                         Html.X().Column()
                         .MenuDisabled(true)
                         .Sortable(false)
                        .Text("Material")
                        .DataIndex("materialid")
                        
                        .Width(130)
                        .Editor(
                            Html.X().ComboBox()
                            .ID("ddlMaterialID")
                            .ForceSelection(true)
                                .TypeAhead(true)
                                .SelectOnTab(true)
                                .DataIndex("MaterialName")
                                .ValueField("MaterialID")
                                .DisplayField("MaterialName")
                                .StoreID("stormaterialid")
                                .QueryMode(DataLoadMode.Local)
                                .TriggerAction(TriggerAction.All)
    this is my code,combobox is load but after select item from combobox instead of displayfield valuefield is showing,what I doing wrong
    Last edited by Daniil; Jul 01, 2014 at 2:48 PM. Reason: [CLOSED]
  2. #2
    Hi @matrixwebtech,

    In such the case uou should use a Column's Renderer. Please see the Department Column in this example:
    http://mvc.ext.net/#/GridPanel_Data_...Field_Mapping/

Similar Threads

  1. Replies: 18
    Last Post: Mar 13, 2013, 10:40 AM
  2. Replies: 13
    Last Post: Feb 28, 2013, 2:06 PM
  3. Replies: 6
    Last Post: Jan 09, 2013, 10:30 AM
  4. [CLOSED] Grid inside a panel does not show vertical scrollbar
    By blueworld in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 27, 2012, 2:16 PM
  5. Replies: 4
    Last Post: Aug 09, 2011, 10:28 AM

Posting Permissions