I am populating dev express imagecombobox with some values. After the combo box is populated, I would like to change the order of the items.
Could this be done?
The solution to this task is to clear existing items and repopulate them in the required order.
Related
I have a grid with few columns which are sortable. Currently if user clicks on any column, it gets sorted, and at the same time grid clears existing sort. I want grid to retain the sort of existing column as well.
Here is the fiddle: https://fiddle.sencha.com/#view/editor&fiddle/3mg5
You can use multiColumnSort config on your grid. By doing it this way your grid will not clear the existing column sort option. However, you should also give option to user to clear the sort state.
Here is the working solution - https://fiddle.sencha.com/#view/editor&fiddle/3mg6
Folks,
I am using ng-grid to display a list of items.
I want to give my users ability to rearrange the rows in the list.
i.e move the rows up and down as they please.
Now,
However when I update the grid data in the backend i.e say change the index of a particular row, that row does not automatically change locations in the front-end.
What am i missing here ?
I have created a plunker to describe the problem
http://plnkr.co/edit/s1hrTSqF2zeZo3Btaln0
The grid doesn't use the index of the array to order it, so even if you are changing it, because the data is still there nothing happens.
What you could do is define an order field and update the value then changing the values as shown in this plukr. The order field you can hide it from the grid if required using columnDefs to explicitly defined which column should be shown.
Regards
I have a RadGridView, with filterable columns. I need to add a checkbox in the column header that checks all the rows that are a result of certain filters (if used).
When the CheckBox on the Header Column is checked, I just cannot update the values in the Binded collection, since there are Filters that user may apply to certain columns.
So, I tried the following:
var rows = EntityDataGridView.ChildrenOfType<GridViewRow>();
I then loop through the rows and update its data context. This solution works fine, however it does not work well with Row Virtualization turned ON. It only updates the VIsible rows on the screen. We have to deal with large amounts of data so we cannot turn off row virtualization.
I have a solution in mind, but I am posting this to get some more ideas on how this can be solved in a quick and better way.
The solution I have it, I pass to the View Model, the filter descriptors of the RadGridView, and then manually apply filtes to the collection in the view model and then, update the checkbox state. But is there a better way to handle this?
I don't know how telerik implements filters.
But, if its radgrid uses ICollctionView to filter collection, you can create your collection as ICollctionView, and iterate through the filtered collection of items.
var myCollectionView = CollectionViewSource.GetDefaultView(myDataSource);
...
foreach(var item in myCollectionView.OfType<TypeOfTheElement>())
{
item.IsChecked = value;
}
Notice that this will be work only if the ICollcetionView in the ViewModel is the same as used by telerik radgrid.
LOL, the solution to this problem turned out to be quite trivial, the "Items" property on the RadGridView has the filtered items and not the items from the data source. So, I used that one instead!
I have following requirement.
Display data in a table
Clicking on checkbox filter out currently displayed rows by some condition
Clicking on checkbox once again return data appearance to it's previous state
To achieve this I've ovverided method rowQualifies in my ViewObject which is simple SQL based view object to apply my custom filter logic.
When user clicks on checkbox I refresh view object data to apply filter
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It works perfectly, data set updates without interacting with database and my custom filter logic applies as well.
But when I need to cancel filter it wouldn't work because iterator doesn't contain anymore previous rows, and I can only load them from database but it means that I can lose my changes already made to view object rows.
So, when I do
viewObject.setDoFiltering(false);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It will return me those rows that were displayed previous time.
If I do
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES);
viewObject.executeQuery();
It will return me all rows, but I will lost my changes already made to view object rows.
My questions is how to avoid it? Maybe there is another way of doing this? Maybe it is possible to do something with RichTable to tell it how to filter rows in memory.
Any advices are warmly appricated!
I believe this can be done using ViewCriteria, to filter means to apply a ViewCriteria, and then disable it to view all your data
I have two ComboBoxe's that use the same store. I want to filter the second combo with the select triggerAction on the first. If i filter the store of course it will be filtered for the first combo as well, and i don't want that so .. Is it possible to filter the dropdown list of an combobox without filtering the store? Thanks. If you can provide an example it would be great.
You can link the combo boxes this way... A selection in the first combobox is used as a parameter for the request in the second... once the parameter's value is set for the 2nd combobox's store, you can make an ajax call to your service to return the "filtered" data.
You'll need to use the store.reload() function to pull this off.