iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
AutoGenerateColumns property sets a value that indicates whether columns are created automatically when ItemsSource property is set. The default value of this property is True.
By default, the UXGridView control generates columns automatically when you set the ItemsSource property. The generated columns are of type UXGridViewCheckBoxColumn for bound Boolean (and nullable Boolean) properties, and of type UXGridViewTextColumn for all other properties. If a property does not have a string or numeric value type, the generated text box columns are read-only and display the data object's ToString value.
I tried to reproduce the problem in my local test by carefully follow the step-by-step of “Create Data Application using UXGridView and WCF RIA Service” as shown in the video available in this link but my efforts were not successful – everything worked smoothly; columns are generated automatically; and the content was accessed without any issues.
I’m willing to advise you further but in order to do so I would need you to elaborate on your specific scenario and possibly give us a step-by-step guide that we can use to observe the problematic behavior.
For your information: I’m using Intersoft WebUI Studio 2011 R1 SP1.
Thank you for your reply Yudi
Okay, let's start (from the start):
The XAML for the grid I'm trying to add is the following -
----------------------------------------------------------------------------------------------------------------------------
<Intersoft:UXGridView x:Name="AssetRegister" ItemsSource="{Binding AssetCollection, Mode=TwoWay}" BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="1" SelectionMode="Single" SelectedItem="{Binding SelectedAsset, Mode=TwoWay}" GroupByBoxVisibility="{Binding ShowGroupBox, Converter={StaticResource BooleanToVisibilityConverter}}" IsBusy="{Binding IsBusy}" CanUserBatchUpdate="False" CanUserPage="True" PageSize="100000" EnableRowVirtualization="False" />
This is the View...
I'm aware that the grid automatically generates columns, thus I've left it out.
The ViewModel contains a Property (ObservableCollection) AssetCollection, which gets populated from the database when the VM gets constructed.
The VM also contains a Property (Boolean) IsBusy, which changes based on the query state to populate the AssetCollection Property.
The VM also contains a Property (Boolean) ShowGroupBox to enable/disable grouping.
Now, we use Caliburn-Micro to tie up our views and view-models, and we use (DevForce)Ideablade to handle our model needs.
The following is the code on my VM to retrieve the data from the database -
private void RetrieveRecords() { _query = AREM.Instance.tmptestValRegs.OrderBy(asset => asset.ComponentID).Skip(_skipCount).Take(_takeCount); _backendThread = new SelectMany<tmptestValReg>(_query); IsBusy = true; _backendThread.Execute((hasError, response) => { if (response != null) AssetCollection.AddRange(response); _skipCount = _skipCount + _takeCount; if ((_takeCount*2) < 50000) _takeCount = _takeCount * 2; else _takeCount = 50000; }); _backendThread.Completed += QueryCompleted; } void QueryCompleted(object sender, ResultCompletionEventArgs e) { if (_backendThread.Response.Count() < _originalTakeCount) { IsBusy = false; _tempCollection = AssetCollection; return; } RetrieveRecords(); }
The "RetrieveRecords" method gets called from the constructor.
After the initial retrieval, the _skipCount increases and the "RetrieveRecords" gets called again, causing a recursive retrieval untill there aren't any
records retrieved.
I have notify-handlers which "tells" the UI when a Property has ben changed.
Please let me know if there is anything else that I can tell you to help solve the problem (as I really want to move from our current 3rd-party controls to yours).
Hi Naude,
I apologize for any inconvenience this problem may have caused you.
When setting AutoGenerateColumns to true, the ui freezes as soon as the data that should be loaded into the grid is retrieved.
Could you please provide me more information about the term “… the ui freezes as soon as the data that should be loaded into the grid is retrieved.”? Does this term means that there is no column generated or something else? Please correct me if I’m wrong. (Screenshot, if available, will help)
Fetching large amount of data may require longer time. In such condition, the user interface may look like freezing. So, if you don’t mind, could you please try to load less data and let us know whether the issue persists or not?
When setting AutoGenerateColumns to false, the ui does not freeze, but no data is displayed and I really need to set AGC to true.
In the case when disabling the AutoGenerateColumns property, you will need to create and configure all columns explicitly in order to have the data displayed. Creating your own columns enables you to use additional column types, such as the UXGridViewComboBoxColumn, UXGridViewExpanderColumn, UXGridViewSelectColumn, UXGridViewTemplateColumn or other custom column type that inherited from UXGridViewColumn.
For more detail information about how to create and configure the “UXGridView.Columns” please refer to the documentation or sample. When using the “Intersoft ClientUI MVVM Data Application” project template, the product.xaml file shows the implementation of declaring the column manually.
Thank you.
Hi Yudi
Hmmm... I'm not 100% sure that I've fixed the problem, but it's retrieving- and displaying the data successfully...
What I did was:
->decrease the first _takeCount integer value.
->set the size of pages way, way smaller.
->instead of fixing an entity type to the grid, i changed "tmptestValReg" (which was the initial type) to type of object. (and this seemed to do the trick somehow)
But thank you for your responses.
(was actually trying to make a screenshot when i realized the UI was not hanging).
What I meant with "UI freezez" is that the notification from the VM to the view never happened, you couldn't click anyware on the UI (Then the browser stoppes responding), and if you leave it long enough, the application throws a "SystemOutOfMemory Exception", but I'm guessing this happened because of the amount of data that I was pulling at a time.
Glad to hear the good news.
Should you need further assistance or run into any problems regarding our controls, please feel free to post it into our forum. We would be happy to assist you again.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname