Is there a way to use LoadOnDemand with a grid where I want to show 300 rows (with around 10 columns) with no sub-rows? I am adding each row in the server code. I tried marking some rows as Hidden, but I just realized that those rows still are sent to the Client.
Here is the method I use to add rows:
UltraGridRow newRow = new UltraGridRow(true); newRow.Cells.Add(new UltraGridCell()); newRow.Cells[PROJECT_NAME_COLUMN].Text = iGCProject.Name; newRow.Cells[PROJECT_NAME_COLUMN].Title = ""; newRow.Cells[PROJECT_NAME_COLUMN].Tag = objPhaseInfo;
...
uwgProjectList.Rows.Add(newRow);
Also, I need to have ViewState turned on for my grid, so I can tell what cell the user clicks on.
For me it is taking 10 seconds for this grid to load. HELP!
Hello,
You can use the property Hidden = true and hidden row. Please take a look sample code below: protected void Page_Load(object sender, EventArgs e) { UltraWebGrid1.Columns.Add("Key"); for (int i = 0; i < 10; i++) { UltraGridRow newRow = new UltraGridRow(); newRow.Cells.Add(new UltraGridCell("Value")); newRow.Cells[0].Text = i.ToString(); if ((i%2)!=0) { newRow.Hidden = true; } UltraWebGrid1.Rows.Add(newRow); } }
Hope this helps.
If a row is hidden, does it still get sent to the Client? It appears that it is. Is there a way to mark a row as not "Visible"to help decrease the size of what is being sent to the Client?
Thanks for your help!
Yes, all rows go to the client and depending on the property visibility show or not. With JS code you can manipulate this value. Please take a look help page below:
http://help.infragistics.com/NetAdvantage/NET/2008.3/CLR3.5/
Hope this help.