I have a grid with 3 columns ( name | lastname | age ) in that order. What I need is to change the position of the columns when clicking a button to ( age | lastname | name). Is there any way of doing this ? I did it by creating 2 grids and change them each other when the button is clicked but I was wondering if there is any way of doing the same thing with only one grid.
Here is a link how to dynamically set column order using a button. The example should help you in your quest to fill your needs.
Related
I am using ng-grid to show the customer data from database, what i want to do is to give a row color which is alltoted to customer.
for example customer 1 has select red color so all the data related to customer 1 should be in a row with red color. is it possbible?
i have been searching and all i got to know is
rowTemplate
but i dont know if it will fix my dynamic row coloring problem
You can try something like this with ng-class
In your view :
<yourrow ng-class="{'oftheuser': user.id == row.userid}"></yourrow>
In your css :
yourrow.oftheuser{
background-color:red
}
You have to give us some code for a better example :p
I have charts on a tab, that should only show if 1 value from a column filter is selected.
For example if a field named: BUSINESS_UNIT has values of "HR","FIN","IT" The charts should only show data if 1 value is filtered on. Such as "HR."
These charts do not contain the BUSINESS_UNIT field itself.
I tried using the Limit Data Using expression, but for some reason the limit expression UniqueCount(BUSINESS_UNIT)=1 doesn't work.
How would I hide the data in the charts, unless 1 BUSINESS_UNIT is selected?
What you could do is hide the filters panel and create radio buttons on a new text area for each property to mark data. If you need help setting this up let me know. Then in your visualisations limit data using markings and show an empty visualisation if no items are marked.
One downside to this is maintenance, if the values change you will have to update the UI.
Another possible solution (untested) is to change the filter panel properties from checkboxes to radio buttons.
Filter Panel Properties:
http://stn.spotfire.com/spotfire_client_help/filter/filter_panel_properties.htm
You want it to look something like this:
http://stn.spotfire.com/spotfire_client_help/filter/filter_radio_buttons.htm
i have the hbox layout as below
window
--------------------------
| panel
| Form
| hbox
| row 1 combo1 combo2
| form
| hbox
| row 2 combo1 combo2
|
|
--------------------------
The row 2 is added dynamically on clicking a button. Same code is executed to add row 1 and row 2 to hbox. When i click on combo1 in row#1 the roe#2 combo gets clicked.
Any idea why this happens and any suggestion on how i can achieve the behaviour of clicking combo of particular row displays its store?
try using itemId property of form field.
refer docs and extjs-avoid-using-the-id-property
I want to set my GtkComboBox to have some default value/name, on it as follows:
+---------------+---+
| Image Options | X |
+---------------+---+
| Image Option 1 |
+-------------------+
| Image Option 2 |
+-------------------+
| Image Option 3 |
+-------------------+
"Image Options" will be just a Title and it will disappear once user selects any option from list. when user click on the list and selects "Image Option 3" then it will display selected value insted of "Image Options". "Image Options" will not be a part of option list.
I don't think you can. The GtkComboBox shows data from a model. You're asking it to show a piece of data that is not in the model.
If you want to change which row of data (in the model) is changed, you can use the gtk_combo_box_set_active() call. Note that it takes an integer index (model row number) though, not a string so you cannot use it to make the box show data that is not in the model.
Consider labelling the widget using a nearby GtkLabel instead, or perhaps using a pop-up tooltip.
I have a combo with more than one value in it (different bindings from the same source)
I would like to create a combo box where the user could sort by those columns and also include a header to clarify the informations
Example :
Item No | Name | Rank
00 | foo | 0
01 | bar | 2
02 | too | 1
We could sort by Item No, Name or rank.
Is it even possible?
Thanks!
Doing it with a ComboBox is definitely possible, but involves changing the entire ComboBox template such that the Popup hosts a ListView. As a simpler alternative, you might consider just using a ToggleButton and Popup, with a ListView inside the Popup.