[CLOSED] [#1367] [4.1.0] Data is not showing in Grid.

  1. #1

    [CLOSED] [#1367] [4.1.0] Data is not showing in Grid.

    The data is not showing up in the Grid. Could I be missing something:

    @{ 
        var x = Html.X();
        var data = new List<object>{
            new
            {
                Name = "Lisa"
            },
    
            new
            {
                Name = "Bart"
            },
    
            new
            {
                Name = "Homer"
            },
    
            new
            {
                Name = "Marge"
            }
        };
    }
    
    @(
        x.Grid()
            .Plugins(x.EditableGrid())        
            .Columns(
                x.Column()
                    .DataIndex("Name")
                    .Text("Name")
            )
            .Store(x.Store()
                .AutoDataBind(true)
                .Fields(
                    x.ModelField().Name("Name")
                )
                .Data( data )
            )     
    )
    Last edited by Daniil; Aug 10, 2016 at 6:45 PM.
  2. #2
    Hello @sveins12!

    Interesting how this works from user control but not if coded directly on the main view! Thanks for the report, they're simple but awesome!

    We've created an issue to track this under #1367. Please sit tight while we fix the bug and get back to you!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello,

    In Ext.NET Mobile a Grid's Column requires an explicit Width setting. If you add Width, all is good.
    <ext:Column runat="server" Text="Name" DataIndex="name" Width="100" />
    <ext:Column runat="server" Text="More" DataIndex="more" Width="100" />
  4. #4
    Thanks. Yes the data is showing up when setting the width property of the column. A little bit strange though since the column-header already was showing using a default width.

    Now, I added .Editor(x.TextField()) to the column. When double-tapping on a row, a row-editor show up. But there are no column editors showing, so it is impossible to edit the row.
  5. #5
    Agree, it is confusing. We've decided to set up the default Width for Grid's Columns. Now it is 100 by default if not explicitly set up.

    As for editing, please start a new forum thread.

Similar Threads

  1. Replies: 9
    Last Post: Jun 18, 2014, 1:24 PM
  2. Replies: 5
    Last Post: Oct 02, 2013, 9:57 PM
  3. No data showing
    By zaggle in forum 1.x Help
    Replies: 2
    Last Post: Mar 23, 2012, 1:09 AM
  4. GridPanel not showing all data
    By iltwams in forum 1.x Help
    Replies: 1
    Last Post: Oct 01, 2010, 6:09 PM
  5. Grid Panel not showing complete data
    By Nagaraj K Hebbar in forum 1.x Help
    Replies: 2
    Last Post: Aug 17, 2009, 10:42 AM

Posting Permissions