I have an application using xamWebGrid and in the demo configuration it displays just 357 rows. The data are instances of a simple CLR object of 11 properties of value types: datetime (3), enum (2), string (2), int (2), bool (2).
The empty grid is displayed quickly but the time from setting the data source to displaying the data is ~5 seconds. Initially this is quite confusing for users who are unaware they should wait so press F5 to refresh the page. We've put in a "Loading..." message on screen to inform the user but there does not seem to be an event fired by the xamWebGird once the data is displayed. Without such an event we don't know when to remove the loading message.
So two questions: why the delay? There is not a lot of data. Secondly, is there an event that will fire once the display is presented?
Thanks
Bill Seddon
Hi, I am having similar problem, with a grid having 25 columns and about 100 rows. I have make following settings
<igGrid:XamWebGrid.RowSelectorSettings> <igGrid:RowSelectorSettings Visibility="Visible" EnableRowNumbering="True" > </igGrid:RowSelectorSettings> </igGrid:XamWebGrid.RowSelectorSettings> <igGrid:XamWebGrid.SelectionSettings> <igGrid:SelectionSettings ColumnSelection="Multiple" RowSelection="Multiple" ></igGrid:SelectionSettings></igGrid:XamWebGrid.SelectionSettings><igGrid:XamWebGrid.SortingSettings> <igGrid:SortingSettings AllowSorting="False"></igGrid:SortingSettings></igGrid:XamWebGrid.SortingSettings>
<igGrid:XamWebGrid.EditingSettings> <igGrid:EditingSettings AllowEditing="Cell" IsMouseActionEditingEnabled="DoubleClick" IsEnterKeyEditingEnabled="True" IsF2EditingEnabled="True" IsOnCellActiveEditingEnabled="False" /></igGrid:XamWebGrid.EditingSettings>
I am facing following problems:1. Overall application load time bit high about 20 seconds.2. Overall application response time is very slow.3. Keyboard typing in a cell is very slow. 4. Grid Scroll is very slow.
Furthermore, this issue is basically related with number of columns instead of number of rows. I've tested same program with 5 Columns and 10000 Rows without paging and it is working fine. No Keyboard event delays nor application response problem and significant change (better) load time but the same program causes problem with 30 rows with 25 columns.
Hi,
So, you don't have to explicitly set a Height and Width on the control, it works as everything in SL works. If you don't set a height and width, it inherits it's height and width from it's parent container.
My guess is that you're placing the xamWebGrid in a container that is giving it infinite height and width. When that happens, you're telling the grid to draw everything, which mean no virtualization can take place. So, this should be avoided. You'll see the same issue with ms's grid as well.
As for resizing, with your browser, then if the xamWebGrid's container is a Grid panel, then it will resize with the container, and still have a height and width. So virtualization will still take place.
-SteveZ
Guys you are missing the point. The 'whole' data is 300 rows by 11 columns - lets say 4000 cells (or less in Imran Zia's case). *Any* grid (including MS's because I've used it) does not pause for 5 seconds after the data source is set and before the data is displayed. Let's focus on the XamWebGrid and not try to be distracted by what may or may not be happening with some other grid.
But I'll another datapoint from further testing in response to these posts: I've set column widths and row heights to a fixed size and fixed the size of the control to 800x800 but it makes no difference. Also, the delay does not appear to be affected by the volume of data - 300 or 1500 records and the delay period is the same.
It *does* appear to be affected by the number of rows or columns in the available display area. That is, the number of cells. 34 rows x 11 coumns = ~ 5 seconds. 7 rows = 2 seconds.
So, i'm not sure why you're seeing such a long delay in the loading of the xamWebGrid. Performance is always a number one priority for us. And we're constantly making improvements to make it faster. So, if you have a sample that shows off your issue, can you attach to this thread, so that i can see what's going on?
As for your other question. We don't currently have an event that fires when the grid is finished updating.
I suppose you could use the xamWebGrid's LayoutUpdated event. You can hook up the event, before you attach your itemSource, and unhook the first time it's called after the LayoutUpdated event has fired.
Hope this helps,
Steve, I think you should try and reproduce the problem yourself - it really simple. In silverlight create a class with, say, 9, 10, 11 public properties - make them string and generate a string for each one (say a guid). Create a collection of, say, 300 or 400 instances of the class.
Create a grid in Xaml. I do not use auto generated columns so create template columns for each field in the class and have it bind to the respective field. Now use the collection as the data source and see what happens. I'm sure you will have a large display so make sure there are lots of rows. On my machine (1900x1440 screen) 34 rows can be displayed and the display time is 5 seconds. Resize the browser to show 7 rows and its ~2 seconds.
Also, don't just try it on one of your super dev machines, I'm sure there will be no problem. Hop into the accounts department and try it on one of the standard single core, old machines there and see what happens.
Hi Bill,
I was able to reproduce the problem. And i'm going to make it a high priority to fix these right away. They won't make our next Service Release. However, we will be creating a Support case for you, and as soon as we have a fix available, we can send you a private build, so that this doesn't freeze your development.
Thanks for the report,
Thanks for letting me know. For me, the important tip was the one you offered yesterday and coupled with looking at the Rows.Count property we are able to offer, and remove, feedback to users.
That said, it you find a resolution, it will be great to find out about it.
Regards
Bill