Adding a button to the end of the grouped gridview - wpf

I am looking into adding a button to the "end" of the grid view.
The idea is that I have a grouped view showing groups and items with in these groups. I only show some of the items within the group and wants to show a "load more" button at the end of the items shown.
I have tried all kinds of things in the standard grouped items page with no luck.
Any good ideas?
Thanks in advance
Kim

The simplest answer is to follow the approach used by most existing apps: Allow the user to click on the header to display all the items.
You can also add the "Load More" button as if it was a normal grid item. Then, style it differently using a different template and ItemTemplateSelector.
Finally, the most complex (and flexible) solution would be to put the "Load More" button above the GridView, and manually sync its location when the GridView is scrolled...

Related

Is it possible to move "Edit" and "Delete" buttons to the front in CRUD?

I created a model with ~30 columns, so every time I need to edit or delete something in CRUD, I have to scroll to the rightmost to find the edit or delete button. Is it possible to move them to the first 2 columns in the grid?
Also, it seems the CRUD class is derived from "View" rather than "Grid", so the addPaginator() function does not work here. Is there any way I can separate the data into different pages in CRUD? Thanks
CRUD is a container for both Grid and Form. Depending on how the page is called, it will initialize a proper sub-element. To do something with grid, such as adding pagination, you need this:
if($crud->grid)$crud->grid->addPaginatior();
Also if you are looking to re-order columns, then this is what you need to do:
if($crud->grid)$crud->grid->addOrder()
->move('edit','first')
->move('delete','after','edit')
->now();
Edit button moves just as Romaninsh said, but I'n not able to move the delete button...

Prevent Treeview Selection in Silverlight

I have two panes in my page (category and items). The category pane is basically a n-level tree view which controls what items are to be shown on the items pane on the right. So if I choose a category, the items panel on the right hand side will show all items in that particular category (in a datagrid). I am fetching the items from a WCF service in the SelectedItemChanged event.
Now the items grid in the right pane is an editable datagrid. So when a user has some unsaved changes in the grid and tries to change the category, I need to give him a warning message (message box with Ok/Cancel) and on cancel click, I need to suppress this category selection change.
Now, I have tried the the MouseLeftButtonDown event to suppress this, but it somehow doesn't seem to work.
I have refereed this link for the possible solutions.
Can anyone please suggest something?
At the end of your selectedItemChanged event, call [yourTreeView].ClearSelection()
This will give the appearance of the treeview not performing a selection, yet will react as a click.

ExtJS - Nested Window/FormPanel

This is sort of a subjective question, but I'd like to get some ideas on the best way to lay this out. I'll set up the situation for you.
I have a grid with a column that allows the user to "View Details" on a particular item. The grid also allows the user to select multiple rows and "View Details" on those items. When the user clicks "View Details", a Window will pop over the grid, with a form inside it and controls to navigate between the multiple items (if they selected multiple items).
Here's a picture for an example:
I have no problem creating the Window, but I'm curious as to how to handle multiple "FormPanels", if that makes sense? Would I need to create another Panel inside the container Panel for each item they have selected, and then hide/show based on the active item (shown as "Item #1" in the dropdown)?
I'm thinking of it like a deck of cards in which you can navigate through, but I've never done something like this before. Also note that each item/card will be prepopulated with information from the grid, but that should be easy enough to do if I'm using the same Store.
Thoughts?
Yes you're right, and the layout you're looking for is the CardLayout.
You can read about it in the API here. The basic idea is like you said, a stack of cards that contain components, and you shuffle through them by calling the relevant methods.

Popups in Pivot

I have a Pivot layout with three items. One holds news for today, the second shows news for the week and in the third one you can search by date. If there aren't news for today yet, I show a message through a popup. I use a popup because I can put it over the datatemplate list.
The problem is that if I show the popup in the pivotitem for today news, it is shown in all other pivot items, but in code is inside the first pivot item only!
How can I solve this? Would you recommend me to use something different than a popup? I could hide the popup when pivot item is changed, but I want the message to remain visible in the item that has no news.
thank you!
There are known issues with regards to performance and rotation with the Popup control. My suggestion would be to use a Grid element and toggle it's visibility as and when required. For this overlay to be shown on top of the whole pivot (and not just the current item contents) you will need to put it at the same level in the visual tree as the pivot, and declared afterwards in the XAML to ensure that it appears on top. Other than that, it's just a case of showing/hiding it based on your logic and the selected pivot item.

silverlight combobox - highlight a few items in the popup list

I'm wondering if I can make fake sections in the popup menu:
The rule would be, if the 5th character of the displayed item is different from the 5th char of the previous item in the menu, it has to be highlighted
What do you think?
Thanks!
To achieve this would be a hack.
Normally the items that appear in the popup part of a combo box will be an instantiated data template, and each gets its own data item and has no clue or knowledge of the other items in the list, so you couldn't use a converter or anything else to achieve this behavior.
What you could do though is inject (attach) your own control into the popup part of the combo box, and take over the rendering of the data items. How you do this will depend upon which combo box you are using (i.e. MS or some other vendor's) and would be a whole new question.
Would that be easier if I were to create my own combobox as follow:
a TextBox associated with a Button that when pushed would popup a datagrid in which I could implement this conditional formatting?

Resources