[CLOSED] DataGrid only rendering partial values ( version 2.2)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] DataGrid only rendering partial values ( version 2.2)

    Hello All,

    I have a DataGrid with Livesearchplugin as follows

    Html.X().GridPanel().ID("wsGridPanel").Height(500)
                   .Store(Html.X().Store().ID("wsGridStore").Model(Html.X().Model()))
                   .Plugins(Html.X().LiveSearchGridPanel())
                   .TopBar(Html.X().LiveSearchToolbar()
                   .Items(Html.X().Button()
                   .Text("Search")
                   .ToolTip("Yellow highlight")
                   .IconCls("x-yellow-highlight")
                   .Pressed(true)
                   .EnableToggle(true)
                   .ToggleGroup("highlightColor")
                   .ToggleHandler("function(b, state) {if(state) {this.up('wsGridPanel').liveSearchPlugin.matchCls = 'x-livesearch-match';}}")
    The following Code reconfigures and resets the the datagrid based on a datatable

                // recreate columns 
                foreach (DataColumn dsColumn in dataTable.Columns)
                {
                    ModelField field = new ModelField(dsColumn.ColumnName, ModelFieldType.Auto);
                    store.AddField(field);
    
                    Column newCol = new Column
                                        {
                                            Text = dsColumn.ColumnName,
                                            DataIndex = dsColumn.ColumnName,
                                            Sortable = true
                                        };
    
                    if (dsColumn.ColumnName.ToLower().Contains("amount"))
                    {
                        newCol.Renderer.Fn = "moneyColorRenderer";
                    }
                    else
                    {
                        if (dsColumn.ColumnName.ToLower().Contains("date"))
                        {
                            newCol.Renderer.Format = RendererFormat.Date;
                        }
                    }
    
                    wsGridPanel.AddColumn(newCol);
                    
                    for (int i = 0; i < dataTable.Rows.Count; i++)
                    {
                        store.LoadData(dataTable.Rows[i].ItemArray, false);
                    }
    
                }
    
                return this.Direct();
            }
    This method uses the following DataModel

        public class DataModel
        {
    
            [Display(Name = "Method")]
            public string SelectedTableValue { get; set; }
    
            public int SelectedService { get; set; } 
        }

    When the page is loaded and executed, we can see the method is returning the new configuration and data as image "DataGrid" shows

    Click image for larger version. 

Name:	DataGrid.jpg 
Views:	34 
Size:	53.4 KB 
ID:	5900

    However the Grid doesnot render the values as shown here
    Click image for larger version. 

Name:	Empty_Grid_Count.jpg 
Views:	37 
Size:	25.4 KB 
ID:	5898

    However other times it does render portion of data as shown here
    Click image for larger version. 

Name:	Empty_Grid_Portion.jpg 
Views:	29 
Size:	61.4 KB 
ID:	5899

    I am not sure what is going wrong, no js errors are thrown.

    Any help is appreciated

    Thanks
    Amir
    Last edited by Daniil; Mar 25, 2013 at 3:30 PM. Reason: [CLOSED]

Similar Threads

  1. ASP.NET MVC partial rendering
    By wdk in forum 1.x Help
    Replies: 16
    Last Post: Jul 20, 2012, 12:01 PM
  2. [CLOSED] Problem rendering partial view
    By T3rryChan in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 03, 2012, 9:22 PM
  3. [CLOSED] rendering desktop windows using partial view
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jan 11, 2012, 6:42 PM
  4. [CLOSED] Dynamically Added Tab not rendering partial view
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Apr 26, 2011, 9:10 PM
  5. [CLOSED] Issue with Check Box Rendering in IE7 - Coolite Version 0.8.3
    By vedagopal2004 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Feb 09, 2011, 1:22 PM

Posting Permissions