I found this amazing code to make a dropdownlist with check boxes: Click here
I implemented it and it works, except for one detail I cant for the life of me get the array of selected checkboxes back.
I have implemented as follows:
<local:MultiSelectionDropDown maxHeight="300" x="181" y="-7" width="233" requireSelection="false" itemRenderer="myComponents.MultiSelectItemRenderer" skinClass="myComponents.MultiSelectionDropDownListSkin" dataProvider="{GetIsList.lastResult.ReportFilterList.ReportFilter}" id="dropISLIST" color="#000000"/>
What I cant figure out is what to call to get dropISLIST to give me back the list of selected check boxes and their values.
Does anyone have any ideas.
Please and thank you in advance for any help you can provide....
If your item renderers are properly reporting their checked state back to your data provider, then it is as simple as iterating through dropISLIST.dataProvider. If the data provider does not reflect what is shown in the droplist, then your first job is to make sure your item renderers are working correctly. If you are having trouble, feel free to share your code for the item renderer and we can help you sort it out.
Related
Researching https://fullcalendar.io/docs/vertical-resource-view for work
It seems the columnHeaderHtml callback does not work for this view.
https://github.com/fullcalendar/fullcalendar-scheduler/issues/429
Is this still the case? Any way around this?
I also need the ability to click a timeslot. Eg. clicking the 10 AM row to create an event at 10 AM. Does this functionality exist? I can't seem to find any callbacks that seem to work.
My codepen so far:
https://codepen.io/anon/pen/OKyvGZ?editors=0010
EDIT: #ADyson pointed out that columnHeaderHtml only works for date headers, not resource headers as is the case here.
i am amateur in flex, and started my final year project in flex to learn it, i am stuck in place where i have to create rows of drop down lists when the user pressed add more, eg: like the ones in mail attachments
i think i have found a way to generate rows, i am not even sure whether it is a correct way, may be there are easy ways..if so please let me know
this is how i generate the rows:
<mx:states>
<mx:State name="newRow">
<mx:AddChild relativeTo="{cityDropdown}">
<s:DropDownList id="newbutton" creationComplete="hotelDropdown_creationCompleteHandler(event)" labelField="Name">
<s:AsyncListView list="{getAllHotelResult.lastResult}"/>
</s:DropDownList>
</mx:AddChild>
</mx:State>
</mx:states>
now when i generate more rows the dropdownlist ids will conflict, so i want to know a way to generate ids, i think i cant even call a function in there :(
please help...deadline is near :(
It just happens that I created something very similar recently, but using ComboBoxes rather than DropDownList - where the user can click Add More and a new ComboBox will slide down on a new row (right click the demo on my site to View Source - link below).
Maybe you can get some inspiration from that.
To auto increment the id names, you going to have to do some AS3 coding. Each time a button is created, its name will become "whaterver" + i (with i as an int incrementing each time)
http://bbishop.org/blog/?p=448
i don't understand about the state you used, but to do multi dynamic generated view, i choose to use "Event Bubbling" strategy and let the control without id.
wrap your controls into one component than make the event bubble from the component. than add listener on the parent of the control. thats all.
//in your custom control
dispatchEvent(new Event("myCustomEvent", true));
//in the parent control
parentComponent.addEventListener("myCustomEvent", myEventHandler);
The Following code seems to only be working when i have editable="true" on the Advanced Data Grid. But I don't want it it be editable. Anyone have any idea or experience with this issue?
The docs don't say anything about it needing to be editable, and i dont see why it should need to be.
http://docs.huihoo.com/flex/4/mx/events/DataGridEvent.html#ITEM_FOCUS_IN
a_data_list.addEventListener(AdvancedDataGridEvent.ITEM_FOCUS_IN, clickedRow);
public function clickedRow(event:AdvancedDataGridEvent):void
{
trace("datagrid line was clicked");
}
You need to listen to the "change" (ListEvent.CHANGE) event if you want to know when rows are selected/deselected.
Actually, sorry christophe, the proper solution to the issue is using
ListEvent.ITEM_CLICK
Because for example if the highlighted item is already highlighted it will not trigger the function because it does not "change" what does work perfectly for this issue though is item click. But thanks for pointing me in the right direction
I`m really new to Flex and ActionScript so please be patient with me.
I want to implement this script: tinyurl.com/yafqrqb
...that is doing this "magic" : tinyurl.com/y9qg32r
...but I want to tweak it a little on InfoWindowTabbedComponent. To be more precisely I`m trying to insert links in that tabs, and when you click one the state will change.
You can see my custom InfoWindowTabbedComponent at the end of the post As you can see, right now I have 2 functions that open url`s.
What I`m trying to do is to change this:
var adobeURL:URLRequest = new URLRequest("http://www.microsoft.com" );
navigateToURL(adobeURL, "_self");
Into something that change the current state.
Can you please help me?
Here`s my custom InfoWindowTabbedComponent: http://pastebin.com/f387bc3b9
I'm not sure I understand what you want to do. If you just want to set the selected Tab, instead of calling navigateToURL() set myTabNavigator.selectedIndex (or selectedChild)
If you really want to change the state, each component has a currentState property, but then you would have to define the states first (via the tag)
And if you really want to navigateToURL() you could navigate to javascript:somefunction() and then set the application state via ExternalInterface, but that would be horribly circumstantial.
Cheers,
Jörg
I've got a project I'm working on where I need to put a RadioButton inside a ListView, and have them all have the same GroupName. (can't use RadioButtonList, long story).
Anyway, this seems to be a well known bug in .NET, so I've implemented the solution found here:
ASP.NET RadioButton messing with the name (groupname)
This works perfectly, but with one small bug which undoubtedly will come back to bite me. If I click one radio button, and then click another while the javascript function is still running and has not completed; I can get 2 radiobuttons in the same group selected.
Any ideas? If you need clarification; leave me a comment and I'll update my post.
EDIT: I believe I fixed my own issue here. See my posted answer below.
Would something like this work?
if (!rbClicked)
rbClicked=True;
runJavascript();
rbClicked=False;
I admit I didn't do alot of research, but this is how I've usually solved this type of problem.
Turns out I was misguided here.
Later on in the page lifecycle; I was adding an additional onclick event that was overwriting the previous value.
In the following example:
var radiobutton = new System.Web.UI.WebControls.RadioButton();
radiobutton.Attributes.Add("onclick", "test1");
radiobutton.Attributes.Add("onclick", "test2");
the onlcick attribute is set to "test2"; test1 is lost.
I ended up fixing it by appending to the existing attribute; see below:
radiobutton.Attributes["onclick"] = string.Format("{0};{1}", radiobutton.Attributes["onclick"], "My Second Script");
This works without issue.