DataGrid with dynamic comboboxes
I need to design a dataGrid with comboboxes in one column. These comboboxes should all have different dataProviders based on a value from column 1. What would a general approach be?
Thanks
The renderer's data property is the data for the entire row so you can get the column1 data and assign the combobox's dataprovider accordingly.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui
Similar Messages
-
Flex Advanced DataGrid with dynamic grouping
Can we implement something similiar as in below link, using flex 3.
http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/grouploadmodeclient/defaultcs.a spx
I am not sure if flex 3 allows grouping of columns based on drag - drop component. Plus how to show the pictorial view of grouped columns, same as in the above example.
Any help greatly appreciated.This blog post seems to answer your question:
http://blog.flexgeek.in/2007/06/tips-tricks-adding-a-combobox-to-a-datagrid-header-as-head errenderer/
http://omalraj.com/2009/06/flex-datagrid-header-with-a-combobox-filter/
http://franto.com/custom-header-in-datagrid-part-2/
http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html
If this post answers your question or helps, please mark it as such. Thanks!
http://www.stardustsystems.com
Adobe Flex Development and Support Services -
Spark DataGrid with Dynamic Column Width
Lets suppose I have a Spark Datagrid with no explicit typicalItem. When the Datagrid is initialized, the column widths are calcualted correctly based on the contents of the dataprovider. However if I add/remove an item from the dataprovider, or modify the one of the objects in the dataprovider, the column widths never update to reflect the change. Is the the correct behavior for a DataGrid? If so, is there any method I can call to force the DataGrid to recalculate and redraw the column widths?
When Spark DataGrid doesn't have a typicalItem, it uses the first dataProvider item as the typicalItem. If you change that, the DataGrid won't pick it up immediately. You can invalidate the current typicalItem using dataGrid.invalidateTypicalItem().
-
DataGrid with dynamic columns & renderers
I'm developing using Flash Builder 4 & Flex SDK 4.1.
I need to manage very dynamic DataGrid components and keep their definitions, which are all part of a complex item renderer of an Offers list.
The objects structure is simplified as follows -
Data: Model --> Offers ArrayCollection --> Offer VO --> DataGrid data ArrayCollection & DataGrid columns Array
View: List --> Offer Item Renderer --> DataGrid
1. Since the DataGrid's columns property accepts only an Array (not ArrayCollection), it seems like Data Binding for defining the columns is very problematic.
I tried to bind it to the source property of an ArrayCollection that would keep my columns definitions, but it didn't really work (mainly header display bugs).
What is the recommended way to keep the dynamic columns definition of a DataGrid?
2. Each column can have a set of dynamic properties, so I created a "mutant" - Column VO that extends DataGridColumn and got a dynamic properties ArrayCollection on it.
The columns got a custom header renderer that includes an icon when there are properties.
The header renderers got 4 main states (NotSelectedWithProperties, SelectedWithProperties, NotSelectedWithoutProperties & SelectedWithoutProperties).
However, the header renderer area seems a bit buggy when maintaning dynamic columns.
Any thoughts on the subject?
3. Anyway, I ended up recreating the DataGrid's columns Array very often (copying the columns definition on the offer's item renderer's dataChange event handler).
Note that the dynamic properties can be edited when the column is selected and I copy their values from the view back to the model when entering the state NotSelectedWithProperties.
This feels way too complicated and I really try to keep it simple, inspite of the required complexity.
Does anyone have better ideas?
4. In some cases the column's item renderer should also be modified into another DataGrid (grid-in-grid).
I used the MXDataGridItemRenderer with a DataGrid and included an ArrayCollection for the "newValue" returned by the editor.
(I use RendererIsEditor=true and on updateComplete populate that variable with the DataGrid's dataProvider contents)
When needed, I loop though the data objects of the parent DataGrid and populate the related field with an ArrayCollection of key-value objects that are displayed on the internal DataGrid.
After adding this feature I encounter very strange bugs -
a. After editing the grid-in-grid values and changing the column's state (selecting & deselecting), I get the following exception:
ArgumentError. Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/setChildIndex()
at mx.core::UIComponent/setChildIndex().......6993....
All I could find about this is that it might be related to some context error or something, but I'm really stuck on this one.
b. Sometimes another column might copy value from one row to another, running over the previous value.
I'm not sure exactly what sequence of actions causes this behavior, but it's related to that itemRenderer for sure.
c. Switching places with a column that uses the grid item renderer (headerShift) causes a stak overflow of StyleManager that tried to get style from the DataGridItemRenderer. This one I just found out, but couldn't reproduce a second time... strange!
I'm pretty sure this caused another problem that I don't remember at the moment.
The bottom line is that there got to be a better way to implement this feature within this already-complicated environment.
Maybe I'm doing something very wrong here...
Please advice and thanks for reading all this.Update on item 4a -
This was a major issue (the main reason for opening this thread really) and I managed to resolve it!
As part of my application, I override the default DataGrid behavior for column selection (headerRelease event).
Instead of sorting, I change the column's header looks and define it as Selected (for showing its dynamic properties and enable its deletion).
At first I did this by setting styles, but the look didn't refresh unless I created a new instance of the header renderer.
Later I changed thi behavior to work with states, but I left the new header renderer instance creation commands and those lines created all the mess!
Conclusion -
If you define a custom header renderer for your datagrid column and then a custom item renderer, don't create a new instance of your header renderer!
It would still be nice to get some response for the other issues I raised.
Thanks and have a nice week. -
Flex DataGrid with Dynamic Grouping
Does anyone know of any examples of Flex datagrids that have
grouping features comparable to the numerous grid components
available in the ASP.NET world? I’m thinking of .NET
component vendors such as Telerik, Infragistics, Component Art,
DevExpress, etc.
The way these .NET controls generally work is that you drag
the header of a column to a bar above the grid, which causes the
grid to redraw based on the new grouping you just specified.
This is an example of a grid component that I am currently
using:
Telerik
Grid
Thank you,
Mike ChabotThe renderer's data property is the data for the entire row so you can get the column1 data and assign the combobox's dataprovider accordingly.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui -
Dynamic binding of a DataGridTemplateColumn with a ComboBox inside
Hi all and thank you in advance.
I wish you could help me 'cause I'm quite a newbye in this world (C# and WPF).
I need to bind a ComboBox field inside a DataGrid with some data.
The DataGrid is filled with a collection.
I need that one or more data from one field (or more) of this collection is bound with data from another DataSet (and collection).
I need this binding as DYNAMIC and not STATIC:
if I add a record in the second collection I need this record is avaible in the other collection (DataGrid "collection" before)
Any suggestion?
Edit:
obviously with "if I add" I mean:
if I add one record in the table I need this record in the ComboBox content of the ComboBox field inside the DataGrid filled with the other collection...Ummm... obviously is not a word I would use there mate.
It's Friday evening and been a tiring week but I'm a bit confused by your explanation.
I'm guessing you're kind of OK with an observablecollection bound to itemssource of your datagrid.
If not bind a.... ditto.
Observablecollection tells you + and - to that collection but not properties.
You have to implement inotifypropertychanged to do that.
Then add some notification from your setters on each property.
kinda like
using GalaSoft.MvvmLight;
namespace wpf1
public class Class1 : ViewModelBase
private int myVar;
public int MyProperty
get
return myVar;
set
myVar = value;
RaisePropertyChanged();
Binding comboboxes in datagrids is tricky.
You have several options.
You mention datasets and collections.
I'm going with collection here.
The thing to realise about the wpf datagrid is datacontext.
The datacontext of the row is an item in the collection the itemscollection is bound to.
If you bind a collection of customer then it's in customer it looks for any binding.
It has to use a bit of weird notation to get to the datacontext of the window.
That's one route to your data.
Another is to have an observable collection as a resource.
http://social.technet.microsoft.com/wiki/contents/articles/26347.wpf-combobox-binding-in-datagrid.aspx
http://social.technet.microsoft.com/wiki/contents/articles/26200.wpf-dynamicresource-observablecollection.aspx
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
Dynamic DataGrid with Preferred columns
Hi all,
I want to populate a dynamic DataGrid with User Preferred
columns (ex : EmpId,First Name and Phone). Each time columns may
change based on User Selection in Preferences Page so columns
should not hard code. I'm able to see data for EmpId, First Name
but I want to see the Inner tag data of "Phone" as a Field.
Sample XML ....
<emp>
<empId>1002</empId>
<firstName>Smith</firstName>
<lastName>John</lastName>
<address>
<city>Ohio>
<phone>433-234-322</phone>
<zip>60003</zip>
</address>
</emp>
Thanks.To display nested data, you must use a labelFunction. I have
several labelFunction examples on cflex.net.
You can assign a function reference to the column's
labelFunction property in the column generation code.
Tracy -
FB4b1: Datagrid with data driven Combobox
Hi,
I would like to implement a datagrid with a datadriven combox in FB4b1.
The database should store "only" values, but should show a different labeltext in the grid.
When the users load this Grid the stores values should be uses to set the comboboxes.
That sounds easy but I haven't found a easy way to implement that!
1.) I need to overrite the "save column" function, so that the shown labeltext is not saved, but its db-values.
How can I do this?
2.) I need to build the combox in the datagrid, but there is nnothing like"combox.value="myValID" ( that would be all in vb.net)
Do I have to loop manually over the selectedIndex until I found my savedValue?
Like
http://www.boyzoid.com/blog/index.cfm/2006/11/22/Flex-Custom-Components-and-Custom-Methods
Is there an easier way to do this?
Thanks for any pointers!
Martin ZachEach item in comobobox has a label and a data value associated with it.
The following should work if you were to access data of a selected combo box item, without looping through the items. If it is a string value then
mylabel.text = myCombo.selectedItem.data.toString() would show / store the associated data with the combobox item for the label text, you can replace mylabel with the datagrid's dataprovider for your requirements.
Hope this helps
-Sunil -
Combobox in Datagrid with different values
Hi All,
I have a datagrid. One of the columns in the datagrid is set
to display a combobox as the ItemRenderer. Now, the data for the
combobox is different for each row. How do I set up the data
provider for the combobox in such a scenario.
For example : I have a collection of Shirt objects.
public class Shirt {
public String id;
public String type;
public String[] color; //this is an array
This should be displayed in the datagrid, with the Color
column rendered as a combobox. The colors will be different for
each shirt.
Thanks
CSYes. Some more detail:
in the function,
override public function set data(value:Object): void {
the "value" parameter will contain a refernce to an entire
"Shirt" instance.
So you can assign the comboBox.dataProvider=value.color;
Now, It is more complicated than this, because you will want
the combobox to show the correct value for each row, right?
For this to happen, you will need a selectedColor property on
Shirt. When the user chooses a color, you will need to update this
property with the selection.
Next, your renderer must read the value of selectedColor and
set the comboBox.selectedIndex.
If selectedColor contains the *index* of the color then you
have it easy. If it contains the color name itself, then you will
have to for-loop over the color array until yom match the
selectedColor. then you will have the index and can set
selectedIndex.
ComboBox does not support setting the value directly. It is
pretty easy to extend combo to do this. There are several examples
out there. I posted a link to one on CFLEX.net
Tracy -
I have a DataGrid with several columns and I would like to be
able to sort it with a ComboBox. So if option a in the comboBox is
selected then column A in the DataGrid will be used to sort. I
option B is selected then a different column wil sort the DataGrid.
How would I go about this?
Thanks
Dave"dmschenk" <[email protected]> wrote in
message
news:gbe16o$c4p$[email protected]..
> I have a DataGrid with several columns and I would like
to be able to sort
> it
> with a ComboBox. So if option a in the comboBox is
selected then column A
> in
> the DataGrid will be used to sort. I option B is
selected then a
> different
> column wil sort the DataGrid. How would I go about this?
I think there's an example of this at
http://blog.flexexamples.com -
Using a DropDownList in a DataGrid, both with dynamically loaded content
I just bought FlashBuilder 4.5 and even though I have been using ActionScript for years, I am having the hardest time to solve a seemingly simple task:
I have a database table with names of employees:
id
name
departmentid
1
Janet Jackson
2
2
Frank Zappa
2
3
John Travolta
1
in another table I have the departments
id
Department
1
Acting Department
2
Music Department
What I want is a DataGrid with a DropDownList itemRenderer for the Department so that I can selected the Department by name and not by id. This should be a no-brainer (and with HTML and PHP I have done that hundreds of times), but with Flex I can not figure out how to do this. This is what I have done so far:
Created the DataGrid, generated the database service and dragged it to the datagrid to bind the data. Works.
Then I created an itemRenderer for departmentid
In the department itemRenderer I dragged a DropDownList element, created a database service for the departments and dragged it onto that to get the databinding.
So far, so good. When I start it, I have a populated datagrid with a DropDownList that shows all available departments when I click on it.
What I need, of course, is that the Department DropDownList now shows the Department of the Employee row. When I change the Department in the DropDownList, it should update the Employee Database table.
I literally spend now days on trying to figure this out and can't find anything on the Internet that would help me. If you could give me some advise or even show me how the code needs to look, it would be GREATLY appreciated.
I am pasting here also the code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:employeeservice="services.employeeservice.*"
width="982" height="380" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
getAllEmployeeResult.token = employeeService.getAllEmployee();
]]>
</fx:Script>
<fx:Declarations>
<s:CallResponder id="getAllEmployeeResult"/>
<employeeservice:EmployeeService id="employeeService"
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"/>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:DataGrid id="dataGrid" x="52" y="67" width="455"
creationComplete="dataGrid_creationCompleteHandler(event)" editable="true"
requestedRowCount="4">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="id" headerText="id"></s:GridColumn>
<s:GridColumn dataField="firstname" headerText="firstname"></s:GridColumn>
<s:GridColumn dataField="lastname" headerText="lastname"></s:GridColumn>
<s:GridColumn dataField="departmentid" editable="false" headerText="departmentid"
itemRenderer="components.DepartmentDropDownList"></s:GridColumn>
</s:ArrayList>
</s:columns>
<s:typicalItem>
<fx:Object id="id1" departmentid="departmentid1" firstname="firstname1"
lastname="lastname1"></fx:Object>
</s:typicalItem>
<s:AsyncListView list="{getAllEmployeeResult.lastResult}"/>
</s:DataGrid>
</s:Application>
Here the code of the itemRenderer:
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:departmentservice="services.departmentservice.*"
width="172" height="34" clipAndEnableScrolling="true">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
override public function prepare(hasBeenRecycled:Boolean):void {
lblData.text = data[column.dataField]
protected function dropDownList_creationCompleteHandler(event:FlexEvent):void
getAllDepartmentResult.token = departmentService.getAllDepartment();
]]>
</fx:Script>
<fx:Declarations>
<s:CallResponder id="getAllDepartmentResult"/>
<departmentservice:DepartmentService id="departmentService"
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"/>
</fx:Declarations>
<s:Label id="lblData" top="9" left="7"/>
<s:DropDownList id="dropDownList" x="34" y="5" width="128"
creationComplete="dropDownList_creationCompleteHandler(event)"
labelField="department">
<s:AsyncListView list="{getAllDepartmentResult.lastResult}"/>
</s:DropDownList>
</s:GridItemRenderer>I just bought FlashBuilder 4.5 and even though I have been using ActionScript for years, I am having the hardest time to solve a seemingly simple task:
I have a database table with names of employees:
id
name
departmentid
1
Janet Jackson
2
2
Frank Zappa
2
3
John Travolta
1
in another table I have the departments
id
Department
1
Acting Department
2
Music Department
What I want is a DataGrid with a DropDownList itemRenderer for the Department so that I can selected the Department by name and not by id. This should be a no-brainer (and with HTML and PHP I have done that hundreds of times), but with Flex I can not figure out how to do this. This is what I have done so far:
Created the DataGrid, generated the database service and dragged it to the datagrid to bind the data. Works.
Then I created an itemRenderer for departmentid
In the department itemRenderer I dragged a DropDownList element, created a database service for the departments and dragged it onto that to get the databinding.
So far, so good. When I start it, I have a populated datagrid with a DropDownList that shows all available departments when I click on it.
What I need, of course, is that the Department DropDownList now shows the Department of the Employee row. When I change the Department in the DropDownList, it should update the Employee Database table.
I literally spend now days on trying to figure this out and can't find anything on the Internet that would help me. If you could give me some advise or even show me how the code needs to look, it would be GREATLY appreciated.
I am pasting here also the code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:employeeservice="services.employeeservice.*"
width="982" height="380" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
getAllEmployeeResult.token = employeeService.getAllEmployee();
]]>
</fx:Script>
<fx:Declarations>
<s:CallResponder id="getAllEmployeeResult"/>
<employeeservice:EmployeeService id="employeeService"
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"/>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:DataGrid id="dataGrid" x="52" y="67" width="455"
creationComplete="dataGrid_creationCompleteHandler(event)" editable="true"
requestedRowCount="4">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="id" headerText="id"></s:GridColumn>
<s:GridColumn dataField="firstname" headerText="firstname"></s:GridColumn>
<s:GridColumn dataField="lastname" headerText="lastname"></s:GridColumn>
<s:GridColumn dataField="departmentid" editable="false" headerText="departmentid"
itemRenderer="components.DepartmentDropDownList"></s:GridColumn>
</s:ArrayList>
</s:columns>
<s:typicalItem>
<fx:Object id="id1" departmentid="departmentid1" firstname="firstname1"
lastname="lastname1"></fx:Object>
</s:typicalItem>
<s:AsyncListView list="{getAllEmployeeResult.lastResult}"/>
</s:DataGrid>
</s:Application>
Here the code of the itemRenderer:
<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:departmentservice="services.departmentservice.*"
width="172" height="34" clipAndEnableScrolling="true">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
override public function prepare(hasBeenRecycled:Boolean):void {
lblData.text = data[column.dataField]
protected function dropDownList_creationCompleteHandler(event:FlexEvent):void
getAllDepartmentResult.token = departmentService.getAllDepartment();
]]>
</fx:Script>
<fx:Declarations>
<s:CallResponder id="getAllDepartmentResult"/>
<departmentservice:DepartmentService id="departmentService"
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"/>
</fx:Declarations>
<s:Label id="lblData" top="9" left="7"/>
<s:DropDownList id="dropDownList" x="34" y="5" width="128"
creationComplete="dropDownList_creationCompleteHandler(event)"
labelField="department">
<s:AsyncListView list="{getAllDepartmentResult.lastResult}"/>
</s:DropDownList>
</s:GridItemRenderer> -
Add button to a datagrid with custom class
Hi.
I have a custom class that i put in the dataprovider to a datagrid. And when i column with buttons i get the following error.
ReferenceError: Error #1069: Property null not found on COMPONENTS.Output.OutputFile and there is no default value.
at mx.controls::Button/set data()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\Button.as:873]
at mx.controls::DataGrid/http://www.adobe.com/2006/flex/mx/internal::setupRendererFromData()[E:\dev\3.0.x\framework s\projects\framework\src\mx\controls\DataGrid.as:1646]
at mx.controls::DataGrid/commitProperties()[E:\dev\3.0.x\frameworks\projects\framework\src\m x\controls\DataGrid.as:1606]
at mx.core::UIComponent/validateProperties()[E:\dev\3.0.x\frameworks\projects\framework\src\ mx\core\UIComponent.as:5670]
at mx.managers::LayoutManager/validateProperties()[E:\dev\3.0.x\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:519]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:669]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\sr c\mx\core\UIComponent.as:8460]
at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src \mx\core\UIComponent.as:8403]
What shuld i do?
Thanks for help.If you are talking SE54 and Maintenance Views, when I do an SM30 on the Maintenance View and do SYSTEM->STATUS, I see GUI STATUS ZULG on program SAPLSVIM. If you look at that status, I see two buttons with dynamic text. The first one is call GPRF and has dynamic text VIM_PR_STAT_TXT_CH. You can find a suitable PBO event to set the text of that function code and if that works, find a suitable PAI event to respond to that function.
I recall finding some documentation on customizing the GUI STATUS but no luck today trying to find it.
Let us know how it goes. -
Hi,
I have a demo containing many sections. At the end of each
section a clip is loaded from the library that has a bunch of links
and a comboBox in it that lists all the other sections. Everything
is working as it should except that when you open the comboBox the
list appears behind everything else in the clip.
Why why why?
Also, is there a way to embed fonts in to the fields of the
list as with dynamic text fields so that alpha effect etc can be
applied to the CB (the movie it is in fades up from alpha 0 but the
CB text just appears)
Thanks for any helpHere's how I'm proceeding :
I click one time on the ComboBox to open the item list. Then, the list appears.
So, I click a second time on the wanted item. Then, the list disappears (it's normal !) but the wanted item is not selected !
I've tried to put "System.out.println" everywhere in my code and I saw that it seems that both item events and action events (depending on the case) are not captured !
Caro -
(Advanced)DataGrid with selectable columns
Hello -
I'm trying to make a Flex (Advanced)DataGrid component with some mechanism where the user can toggle the visibility of the columns. I've crudely implemented this by reading in the columns into the right-click menu, and when a column name is selected here, the visibility is toggled. It works, but it's not the most elegant solution.
Specifically, I'm trying to emulate the "datagrid" that Mozilla Thunderbird uses to display emails. Here is an image:
In the upper right, there is an icon over the scroll bar. If there is no scrollbar, the icon remains in the same place. When clicking the icon, it opens up a menu that shows all the possible columns, with the visible ones having a check mark next to them, like this:
Also, the scroll bar always appears under this button, never "pushing" it over into it's own column.
I'd like to re-create this in Flex. I believe the menu part and creating a column with a button headerRendered is easy enough. But I can't figure out how (if at all possible) to do this with the scrollbar, because the scrollbar always seems to be "its own column". Any ideas or help would be appreciated. Thank you.
- IanThis blog post seems to answer your question:
http://blog.flexgeek.in/2007/06/tips-tricks-adding-a-combobox-to-a-datagrid-header-as-head errenderer/
http://omalraj.com/2009/06/flex-datagrid-header-with-a-combobox-filter/
http://franto.com/custom-header-in-datagrid-part-2/
http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html
If this post answers your question or helps, please mark it as such. Thanks!
http://www.stardustsystems.com
Adobe Flex Development and Support Services -
Datagrid with a datadriven combox
Hi,
I would like to implement a datagrid with a datadriven combox.
The database should store "only" values, but should show a different labeltext in the grid.
When the users load this Grid the stores values should be uses to set the comboboxes.
That sounds easy but I haven't found a easy way to implement that!
1.) I need to overrite the "save column" function of the generated code from FB4b1, so that the shown labeltext is not saved, but its db-values.
How can I do this?
2.) I need to build the combox in the datagrid, but there is nnothing like"combox.value="myValID" ( that would be all in vb.net)
Do I have to loop manually over the selectedIndex until I found my savedValue?
Like
http://www.boyzoid.com/blog/index.cfm/2006/11/22/Flex-Custom-Components-and-Custom-Methods
Is there an easier way to do this?
Thanks for any pointers!
Martin ZachHi Martin,
Couple of questions
Are you using LCDS as your backend?
Are you using the Adobe data modeler and deploying your model on to your LCDS server?
If so, then you could try something called derived properties, which actually do not require a database column and you could compute its value based on the value of a existing column.
You can find more info about this on
http://labs.adobe.com/technologies/livecycle_dataservices3/videos/
http://labs.adobe.com/technologies/livecycle_dataservices3/
Thanks
-Sunil
Maybe you are looking for
-
Log File in Bundled tomcat of netbeans ide 5.5
I am not able to create log file in tomcat's log folder. The version i am using is 5.5.
-
i have installed flash player on my hp laptop windows 7 i am playing games but then all off a sudden it tells me that flash player is not found 11.3.0 version is required but i have this already installed now i cant play my games. I have uninstalled
-
Hi, How can i add an undo selection functionality in a jComboBox? I know how it works in textcomponents and buttons but i have a problem with jComboBoxs. Thnx
-
Dynamic rows created not seen in form manager
I have a form in which I create an instance of a subform for every click of a button. When I tried the form in PDF Preview tab, it works fine. However, when I loaded the form into form manager and I opened the form, I saw that it does not create any
-
My Mac is completely charger-dependent.
If it is disconnected from the charger for 2 minutes it will die. I was wondering what I can do to fix this? Replace the battery? I'm assuming the problem stemmed from leaving it plugged up 24/7 since I got it two and a half years ago. D: