[CLOSED] Combobox in GridPanel

  1. #1

    [CLOSED] Combobox in GridPanel

    Hi,

    I have a gridpanel with combobox as editor in one of its columns.
    When I click the cell where the combobox is, it sometimes does not show me the combobox but just a flash of it.
    This behavior happenes more often when I use Chrome but also happens in IE.

    Please see below the example:

    var someGrid = Html.X().GridPanel()
                          .ID("someGrid")
                          .Store(store => store.Add(someStore))
                          .ColumnModel(columnModel =>
                           {
                                    columnModel.Columns.Add(Html.X().Column().Text("so meId").DataIndex("someId").Sortable(true).Width(17 0));
                                    columnModel.Columns.Add(Html.X().Column()               
                                                                                        .Text("Status")
                                                                                        .DataIndex("Status")
                                                                                        .Width(80)
                                                                                        .Editor(ed => ed.Add(Html.X().ComboBox().ID("someother")
                                                                                        .Store(st => st.Add(othersomeStatusStore))
                                                                                        .SelectedItems(selectedItems => selectedItems.Add(Html.X().ListItem().Value(Model) ))
                                                                                        .DisplayField("Status")
                                                                                        .SetActive(true)
                                                                                        .Editable(true)
                                                                                        .AutoShow(true)
                                                                                        .ToFront(true)
                                                                                        .SelectOnFocus(true)
                                                                                        .Enable(true)
                                                                                        .Focus(true)
                                                                                        .ListConfig(new BoundList()).Width(180)
                                                                                        .AutoDataBind(true)
                                                                                        .MatchFieldWidth(false)
                                                                                        .QueryMode(DataLoadMode.Local)))
    
    );
    })
                                       .SelectionModel(sm => sm.Add(Html.X().
                                        RowSelectionModel().ID("someSelectionModel").Mode( SelectionMode.Single)))
                                       .Plugins(pl => pl.Add(Html.X().CellEditing().ClicksToEdit(1)))
                                       .View(view => view.Add(Html.X().GridView().TrackOver(false)));
    Thanks a lot.
    Last edited by Daniil; Feb 19, 2013 at 3:42 AM. Reason: [CLOSED]
  2. #2
    Hello!

    I couldn't reproduce your problem. Can you provide full sample?

    I've tried with our example: \trunk\Ext.Net.Examples.MVC\Areas\GridPanel_Data_P resentation with the following GridPanel:

    @(Html.X().GridPanel()
    	.Title("List")
    	.Icon(Icon.Application)
    	.Store(Html.X().Store()
    		.Model(Html.X().Model()
    			.IDProperty("ID")
    			.Fields(
    				new ModelField("ID", ModelFieldType.Int),
    				new ModelField("Name"),
    				new ModelField("Surname"),
    				new ModelField("DepartmentId")
    			)
    		)
    		.DataSource(Model[0])
    	)
    	.ColumnModel(
    		Html.X().Column().Text("ID").DataIndex("ID"),
    		Html.X().Column().Text("NAME").DataIndex("Name"),
    		Html.X().Column().Text("SURNAME").DataIndex("Surname"),
    		Html.X().Column()
    			.Text("DEPARTMENT")
    			.DataIndex("DepartmentId")
    			.Width(240)
    			.Editor(Html.X().ComboBox().ID("someother")
    				.StoreID("StoreCombo")
    				.DisplayField("Name")
    				.ValueField("ID")
    				.SetActive(true)
    				.Editable(true)
    				.AutoShow(true)
    				.ToFront(true)
    				.SelectOnFocus(true)
    				.SelectedItems(selectedItems => selectedItems.Add(Html.X().ListItem().Value("1") ))
    				.Enable(true)
    				.Focus(true)
    				.ListConfig(new BoundList()).Width(180)
    				.AutoDataBind(true)
    				.MatchFieldWidth(false)
    				.QueryMode(DataLoadMode.Local))
    	)
    	.SelectionModel(sm => sm.Add(Html.X().
    		RowSelectionModel().ID("someSelectionModel").Mode( SelectionMode.Single)))
    	.Plugins(Html.X().CellEditing().ClicksToEdit(1))
    	.View(view => view.Add(Html.X().GridView().TrackOver(false)))
    )

Similar Threads

  1. Combobox in GridPanel
    By bingdian in forum 2.x Help
    Replies: 4
    Last Post: Jan 09, 2013, 1:46 PM
  2. Replies: 4
    Last Post: Nov 30, 2011, 5:25 AM
  3. Replies: 2
    Last Post: May 05, 2011, 10:16 AM
  4. Replies: 6
    Last Post: Mar 20, 2009, 5:39 PM
  5. how to Add ComboBox in GridPanel
    By supermanok in forum 1.x Help
    Replies: 8
    Last Post: Dec 20, 2008, 6:35 AM

Posting Permissions