I have changed DataGrid's DataGridRowGroupHeader's controltemplated and have placed 1 checkbox and 1 textblock instead of content presenter.
now when i do grouping... in some cases if i click on checkbox of one group... it automatically selects another group also.
can anybody please give some advice for this?
I had ScrollbarVisibility= true for Datagrid... and when i was scrolling the grid... checkbox selection was changing... i made scrollbarvisibility to false for datagrid and placed the datagrid in one scrollviewer and it worked fine...
i am surprised from this behaviour of datagrid's scrollbars.
Related
Is it possible to show or hide a comboBox based off the selection made in another comboBox. I have been looking for documentation on this to no avail.
Thanks
Yes, in a Change handler of ComboBox1 set ComboBox2's visible property to false based on the selected item.
Along with setting the combobox's visible property, if you want the form to act as if the combobox is not there, also set the includeInLayout property.
I have a Flex TileList with an itemRenderer made by me.
The list loads the content perfectly and renders it.
Renderer is a simple canvas element with a checkbox and another canvas with some labels with data.
I implemented a method that, on TileList itemClick="clickedItemHandler(event)", changes the state of the checkbox (if checked -> uncheck, and vice versa).
Problem is: the method works if i click on any place of the item, EXCEPT the checkbox. When i click the checkbox, it doesn't change state.
My thoughts: maybe i was changing the state of the checkbox, and the event changing it back, but i debugged it and it doesn't look like so..
The solution is actually quite simple. Perhaps the best way to make this work is making sure the CheckBox ignores mouse clicks, and this can be done by setting the "mouseEnabled" attribute to false.
Cheers
I think you're probably correct. The checkbox toggles when you click it and then you toggle it back when the event gets to the TileList. You may not see this when debugging depending on how you are confirming... you may be able to fix this by confirming that the target of the event is not a CheckBox.
I have a custom component as an item renderer.
In this renderer there is an item called dlFirstChoice.
Now when I add more items to this list and force the list to rebuild itself something odd happens.
Part of the creation of the renderer I set a default selection for the DropDownlist as follows: dlFirstChoice.selectedIndex=0
The problem is once I have more than one item to render from my dataset this property stops working.
So if my dataset has only 1 item to render the drop downlist sets itseld up properly, the momment I need to render more than 1 copy of my item renderer, all of a sudden nothing gets set for dlFirstChoice.selectedIndex. Its almost as if the namespace fails partially.
This is very odd behavior any ideas?
Please and thank you.
Craig
Turns out using DataChange is a very bad Idea, I moved my functions to creationComplete as the initilisiasing event then all of a sudden it took :)
Thanks for all those who looked or tried to help.
i am using a data grid in flex and i am generating data from a mysql server. However, my problem is with adding a button within the datagrid so each row has one.
i have set the columns itemRenderer to mx.controls.Button although with the buttons shown in the grid there is no label on them (even though one has been set) and the assigned click event does not trigger when hitting the button. anyone have any ideas or guidance on what i am doing wrong.
Thanks
Mark
Not to worry I have sorted it. anyone with a similar issue i suggest reading this
http://www.axelscript.com/2008/02/29/using-the-itemrenderer-with-a-datagrid-in-flex/
an excellent source.
I'm looking for a DataGrid with expandable rows implementation in Flex. I don't want to use Advanced DataGrid control because it's too slow and too complex.
The desired behavior is like this: when you click a row, a panel opens between the rows with some details and the rest of the rows are moved down, and when you click again the panel is closed and the rows are back to normal. If you click the other row, the one that was expanded collapses and the row you clicked is expanded.
You'll probably need to use a custom ItemEditor that responds to clicks and expands itself.
The variableRowHeight property may need to be set to true as well.
The behavior you are describing sounds an awful lot like an Accordion component, though that doesn't quite sound like what you are looking for. Another approach would be to use a List component with a custom itemRenderer that is expanded when in the selected (clicked) state, and collapsed when not selected.
We extended Flex Datagrid component and used custom item renderer for this. We actually expand one cell and resize it to cover all other cells in the same row. While this may be not the easiest solution it works and the Datagrid is very fast.