WPF Data Grid Column Visibility Toggle Issue

I have a WPF control that is used in multiple dialog forms. In one of these, I want to include a checkbox column along with two buttons that fire a method to either include all (check all the boxes) or exclude all (uncheck all the boxes.)
I setup a Boolean variable to control this "IsExcludeVisible"
Here is a snippet of the xaml:
<Grid>  
<Grid.ColumnDefinitions>
   <ColumnDefinition Width="Auto" />
   <ColumnDefinition Width="*"/>
 </Grid.ColumnDefinitions>
       <common:BaseDataGrid
  Name="grd"
  AutoGenerateColumns="False"            
  ItemsSource="{Binding ExcludeRoundingIngredientList}">
   <DataGrid.Columns>
     <DataGridTextColumn Header="Code" Binding="{Binding IngredientNumber}" />
     <DataGridTextColumn Header="Ingredient" Binding="{Binding Name}" />
           <DataGridCheckBoxColumn Header="Exclude"
Visibility="{Binding IsExcludeVisible,
                                     Converter={StaticResource VisibilityConverter}}"
                                   Binding="{Binding MillBatchMixExclude}" />
           <DataGridComboBoxColumn Header="Rounding"
    DisplayMemberPath="Name"
                                SelectedValuePath="RoundingId"
    SelectedValueBinding="{Binding MillBatchMixRoundingId}"
    ItemsSource="{Binding DataContext.RoundingOptions,Source={StaticResource Spy}}" />
     </DataGrid.Columns>
        </common:BaseDataGrid>
  <StackPanel ......
   <Button
    Content="Include All"
                x:Name="btnIncludeAll"
Visibility="{Binding IsExcludeVisible, Converter={StaticResource VisibilityConverter}}"
    csla:InvokeMethod.MethodName="IncludeAll"
    csla:InvokeMethod.TriggerEvent="Click"
    />
   <Button
    Content="Exclude All"
Visibility="{Binding IsExcludeVisible, Converter={StaticResource VisibilityConverter}}"
    csla:InvokeMethod.MethodName="ExcludeAll"
    csla:InvokeMethod.TriggerEvent="Click"
    />
  </StackPanel>
 </Grid>...
The button visibility toggles based on the IsExcludeVisible value as expected but the column visibility is totally unaffected.
Am I missing something here (which obviously I am.)
Below is my code to determine the value of the Boolean variable.
public bool IsExcludeVisible
get { return (SelectedReport.Name ==
"Horizontal Batch Mix"); }
Tom Mann MCSD C#

I think the best way is to make a label function something
like this (just off the top of my head, not tested):
public function rate_label(item:Object,
column:DataGridColumn):String
return "GBP"+item.prdt_rate;
Then in the DataGridColumn add a property:
labelFunction="rate_label"

Similar Messages

  • How to save xml and xsl function to a data grid column

    hi. wondering, i have a xml and a xsl file, and have the transform class, and so need to save the xml and the xsl file, and display the results on a particular data grid column and to loop through the data grid columns. so, how do i use the xml save function
    class, any examples or point me to articles, where i can read how to do this. need to display a file, with a different colour and font. any ideas. thanks. marvin.hi. need to save a xml and xsl file and display the results on data grid. how do i do this. any
    sample code or articles i can read about thanks. marvin.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

    
    Hi.
    Okay, well, did ask on the msdn forums, and some one replied, and so, will paste the code he suggested.
    But getting a lot of errors.
    Can you help me out.
    Where am I going wrong.
    So, I can then get this to work, then it shows the colours and the fonts on the specified data grid.
    Can you help.
    Want to get this working and passed today if possible.
    Will pasate the code and the errors below.
    Can you help.
    Where am I going wrong.
    Marvin.
    // Set up the data set.
    DataSet ds =
    new
    DataSet();
    // Set up the data table.
    DataTable dt =
    new
    DataTable();
    // Ad the data table to the data set.
        ds.Tables.Add(dt);
    // Write the xml document to the data grid column.
        ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
        ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
        ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
        ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
    // Set up the data table and the data set and set to 0.
        dgvDisplayData.DataSource = ds.Tables[0];
    Error      1              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                215        
    18           WoodStocks
    Error      2              Invalid token ')' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                215        
    21           WoodStocks
    Error      3              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                219        
    16           WoodStocks
    Error      4              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                221        
    16           WoodStocks
    Error      5              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                222        
    15           WoodStocks
    Error      6              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                223        
    15           WoodStocks
    Error      7              Invalid token '=' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    31           WoodStocks
    Error      8              Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    43           WoodStocks
    Error      9              Invalid token ';' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    45           WoodStocks
    Can you help me out.
    Thanks.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

  • Advanced Data Grid Column Grouping

    When using column grouping with the advanced data grid, is it
    possible to ONLY show the AdvancedDataGridColumnGroup headerText
    and not have the extra row for the AdvancedDataGridColumn
    headerText? For instance, if a have a set of 3 columns with a
    spanned group headerText of "manage", and the columns have buttons
    with the text "edit", "move" and "delete", can I just omit the
    secondary headings since the "edit|move|delete" text is there on
    the buttons and redundant as a column heading?

    When using column grouping with the advanced data grid, is it
    possible to ONLY show the AdvancedDataGridColumnGroup headerText
    and not have the extra row for the AdvancedDataGridColumn
    headerText? For instance, if a have a set of 3 columns with a
    spanned group headerText of "manage", and the columns have buttons
    with the text "edit", "move" and "delete", can I just omit the
    secondary headings since the "edit|move|delete" text is there on
    the buttons and redundant as a column heading?

  • Hiding Column in Data Grid

    Is there is way to hide a column in data grid column?
    Is it possiblo to reorder the column like in excel . I know its not possible bcoz it <table> tag ...

    Select the column within the table and in the property window uncheck the visible. You can also include visible="false" in the jsp page within the column tag.

  • How to put an image in a data grid in Flex Builder 2

    Hi All,
    I need to populate a data grid with some text data received
    from a web service and, in a particular column of the datagrid, I
    have to put an image depending of a specific data returned me by
    the web service.
    It seems that there is the possibility to add an image in
    data grid column with the cellRenderer properties, but this
    property is available only for ActionScript 3.
    I'm developing an application in Flex Builder 2 that run
    ActionScript 2 and cellRenderer properties is not available. Is it
    right?
    If no, I will can use this cellRenderer properties in my
    application. Please, can you show me an example?
    If yes, there is a way to insert an image in datagridcolumn
    with ActionScript 2?
    Thank you very much
    Regards

    Flex Builder 2 uses Actionscript 3.
    You will need to write a renderer for for this column.
    There are a lot of examples of datagrids with images in them.
    here is one from the livedocs
    http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Live Docs_Book_Parts&file=cellrenderer_072_28.html

  • Data grid hidden

    hi. okay, have a two click buttons, and they are supposed to write to the xml and read the xml file, and then transform it to the application, when i click on the Current count or On Order buttons, when you click these buttons, have a grey background colour,
    foreground blue colour, and have a different font of Verdana and Century School book. it keeps  hidden, when i click these buttons, when i load the data grid from the csv. so, how do i make sure that, it is not hidden, when i click on it. will paste the
    two button click events. have tried googling this, and did not find any thing. so will paste the code below.
    marvin.
            // This function will display the Current Count data grid column  to change the style sheet for this click event.
            private void btnCurrentCount_Click(object sender, EventArgs e)
          // Design a data table and write and read the xml documents to the data grid columns selected.
          // Set up the data set.
          DataSet ds = new DataSet();
          // Set up the data table.
          DataTable dt = new DataTable();
          // Ad the data table to the data set.
          ds.Tables.Add(dt);
          // Write the xml document to the data grid column.
          ds.WriteXml(Application.StartupPath + ("CurrentCount.xml"));
          ds.ReadXml(Application.StartupPath + ("CurrentCount.xml"));
                // Set up the data table and the data set and set to 0.
          dgvDisplayData.DataSource = ds.Tables[0];
              // Set focus on the Data Grid Column.
          dgvDisplayData.Focus();
          System.Xml.Xsl.XslCompiledTransform xslTransformer =new System.Xml.Xsl.XslCompiledTransform();
          xslTransformer.Load("CurrentCount.xsl");
          xslTransformer.Transform("CurrentCount.xml", "CurrentCount.html");
        // This function will display the  On Order data grid column  to change the style sheet for this click event.
        private void btnOnOrder_Click(object sender, EventArgs e)
          // Design a data table and write and read the xml documents to the data grid columns selected.
          // Set up the data set.
          DataSet ds = new DataSet();
          // Set up the data table.
          DataTable dt = new DataTable();
          // Ad the data table to the data set.
          ds.Tables.Add(dt);
          // Write the xml document to the data grid column.
          ds.WriteXml(Application.StartupPath + ("OnOrder.xml"));
          ds.ReadXml(Application.StartupPath + ("OnOrder.xml"));
          // Set focus on the Data Grid Column.
          dgvDisplayData.Focus();
                System.Xml.Xsl.XslCompiledTransform xslTransformer = new System.Xml.Xsl.XslCompiledTransform();
          xslTransformer.Load("OnOrder.xsl");
          xslTransformer.Transform("OnOrder.xml", "OnOrder.html");
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

    Hello,
    Perhaps you can show what you are after by posting images and describe from the images what you want as I am unclear otherwise to what you are after, thanks.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile
    but do not reply to forum questions.

  • Data Grid - issues resizing width of columns and with data refresh and sort

    SQLDeveloper 1215 on Windows XP professional
    Database : various 9.2
    In the table data tab there are a few minor issues our developers have highlighted.
    1) There seems to be a minimum column width in the data display. This restricts flexibility in reviewing the data, esp. where the data length is less than the minimum column width.
    2) If a column is resized or the column order is changed and a refresh or a new filter is applied then the columns are restored to their original position and size making it frustrating to run more than one query via the GUI.
    3) There is no quick sort option by clicking on the column heading which would be useful.

    I am still seeing this minimum column width in SQL Developer production (v1467) and I haven't seen any other posts relating to this. I have seen this all of the grids that I have looked at, including all of the grid based sub-tabs for the Object tabs (ie Columns, Data, Indexes, Constraints, etc) and the SQL Worksheet results tab.
    It is very obvious with the Column Name and Data Type columns of the Table Columns tab - the Column Name column can be shrunk to truncate values but the Data Type column can only be shrunk to about the twice the width of the widest value.
    Can anyone in development provide any comments about why we have this minimum width and how the minimum width is actually calculated?

  • SQL Developer 1.1.0.21: Issues with Data Grid and SQL syntax checking

    In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion.
    Is there any option to change this behavior?
    Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check.
    I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql.
    Manish

    "In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion."
    In the "Results" tab, Click Ctrl & Tab keys (at the same time) or with mouse click on any cell other than the first column (a sequence or rownum), you will be able to navigate using the arrow keys.
    "Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check."
    The 0.0134 seconds could be the result of the most recently executed successful statement. Check the Script Output tab for errors. Use F5 (Run Script option) instead of F9.
    "I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql."
    On the SQL statement (or code), Right Click -> Format SQL (or press Ctrl & B), proper formatting would help.
    I use version 1.0.0.15.57 and seems to be working allright.
    - Babu Rangasamy

  • Really Urgent: List with Data Grid  rowcount issue i added the full code below

    Thanks in advance
    Exactly wat i need is
    1.if i click the open button want to visible all datagrid ,its working perfectly.
    2.if i click the close button want to close all data grid ,its working perfectly.
    3. if i click a particular  list means want to visible particular datagrid..some times working good but some times not visible ...
    4.if i click the list if datagrid already open means want to close .some times creates extra space below the datagrid........
    if u cont get clearly please copy the below code and check it.....i think there is row count not working properly...any other way to solve this problem?.......
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" >
    <fx:Declarations>
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var ArrUserList:ArrayCollection;
    [Bindable]
    public var listDB:ArrayCollection = new ArrayCollection([ {label: "2011", data:"jan",day:"saturday",date:"1-4-11"},
    {label: "2011", data:"jan",day:"monday",date:"13-4-11"}, {label: "2013", data:"jan",day:"monday",date:"1-5-11"}, {label: "2013", data:"jan",day:"wednesday",date:"14-5-11"}, {label: "2015", data:"jan",day:"tuesday",date:"11-5-11"}, {label: "2015" ,data:"jan",day:"friday",date:"1-6-11"} ]);
    public var loc_first_last_name:String;
    function Load():void
    ArrUserList=Find_Duplicate(listDB);
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    function Clink_lnk_open():void
    if(lnk_open.label=="Open")
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=1;
    lnk_open.label="Close";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    else
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    lnk_open.label="Open";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    function Click_UserName1(event:MouseEvent,data:Object):void
    loc_first_last_name=event.currentTarget.text;
    var str:String;
    for(var i:int=0; i<ArrUserList.length; i++)
    str=ArrUserList[i].label;
    if(loc_first_last_name==str)
    if(ArrUserList[i].click == 0)
    ArrUserList[i].click=1;
    else
    ArrUserList[i].click=0;
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    public function Find_Duplicate(test_arr:ArrayCollection):ArrayCollection
    var res_arr:ArrayCollection=new ArrayCollection();
    var flag:Boolean;
    for(var i:int=0;i<test_arr.length;i++)
    var j:int=0
    flag=false;
    for(;j<res_arr.length;j++)
    if(res_arr[j].label==test_arr[i].label)
    res_arr[j].dataCollection.addItem(test_arr[i]);
    flag=true;
    break;
    if(!flag)
    var myItem:Object = new Object() ;
    myItem.label=test_arr[i].label;
    myItem.dataCollection=new ArrayCollection();
    myItem.dataCollection.addItem(test_arr[i]);
    res_arr.addItem(myItem) ;
    return res_arr;
    ]]>
    </fx:Script>
    <s:Scroller id="id_scroller" width="100%" height="100%">
    <s:VGroup id="id_Vgroup" paddingLeft="50" paddingTop="10" paddingBottom="10"   width="100%" height="100%" >
    <mx:VBox width="850" paddingLeft="0" paddingTop="1"    color="black"  backgroundColor="#FFFFFF">
    <mx:HBox width="850" left="50" paddingBottom="3"  paddingLeft="5" backgroundColor="#6D6C6C"   paddingTop="3" color="#FFFFFF" >
    <mx:LinkButton id="lnk_open" label="Open" textDecoration="underline" click="Clink_lnk_open();"/>
    <mx:Button id="load_btn" label="Load" click="Load()"/>
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850"   horizontalScrollPolicy="off" verticalScrollPolicy="off"  >
    <mx:List variableRowHeight="true"   width="850" id="Lst_userlist" paddingTop="-3" verticalScrollPolicy="off"  horizontalScrollPolicy="off"
    buttonMode="true"  >
    <mx:itemRenderer>
    <fx:Component>
    <mx:VBox paddingTop="-5"  horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    override public function set data(value:Object):void
    super.data = value;
    Membership_Grid.dataProvider=data.dataCollection;
    Membership_Grid.rowCount=data.dataCollection.length;
    lbl_userhead.text=data.label;
    lbl_userhead1.text=data.dataCollection.length+" Datas";
    if(data.click==1)
    Vbox_main.visible=true;
    Vbox_main.includeInLayout=true;
    else
    Vbox_main.visible=false;
    Vbox_main.includeInLayout=false;
    Membership_Grid.validateNow() ;
    ]]>
    </fx:Script>
    <mx:HBox id="vbox_grid"  horizontalScrollPolicy="off"  height="25" verticalScrollPolicy="off" width="850"  paddingLeft="10" paddingTop="5"  backgroundColor="#6D6C6C" color="#FFFFFF">
    <s:Label id="lbl_userhead" click="outerDocument.Click_UserName1(event,data)" buttonMode="true"   width="250"  paddingTop="3" />
    <s:Label id="lbl_userhead1"  buttonMode="true"   width="548" paddingTop="3" />
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850" horizontalScrollPolicy="off" verticalScrollPolicy="off"  visible="false" includeInLayout="false" >
    <mx:DataGrid id="Membership_Grid"   alternatingItemColors="[#DCDCDC,#F8F8FF]"  paddingLeft="5"  horizontalScrollPolicy="off" color="black"
    horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"  rowHeight="25" width="850"  borderSkin="{null}"
    borderVisible="false" >
    <mx:columns>
    <mx:DataGridColumn width="150" headerText="Year" dataField="label"/>
    <mx:DataGridColumn width="150" headerText="Month" dataField="data"/>
    <mx:DataGridColumn width="150" headerText="Day" dataField="day" />
    <mx:DataGridColumn width="150" headerText="Date"  dataField="date"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    </mx:VBox>
    </fx:Component>
    </mx:itemRenderer>
    </mx:List>
    </mx:VBox>
    </mx:VBox>
    </s:VGroup>
    </s:Scroller>
    </s:Group>

    Hi,
    You already wrote the same exact post 4 times! Don't you think it's enough?
    May 12 : http://forums.adobe.com/message/3672269#3672269
    May 20 : http://forums.adobe.com/message/3690500#3690500
    May 23 : http://forums.adobe.com/message/3696874#3696874
    May 25 : http://forums.adobe.com/message/3701649#3701649
    If you want someone help you, from my point of view it surely not the right way of doing, especially by writing Really Urgent. It just annoys people (and btw it seems not to be so urgent as you stay with it since the May12). If you want a "urgent" answer, hire a Flex expert or just be patient.
    Kind regards,
    Mich

  • Flex List with data-grid issue any body can help me ......i added the full code below

    Thanks in advance
    Exactly wat i need is
    1.if i click the open button want to visible all datagrid ,its working perfectly.
    2.if i click the close button want to close all data grid ,its working perfectly.
    3. if i click a particular  list means want to visible particular datagrid..some times working good but some times not visible ...
    4.if i click the list if datagrid already open means want to close .some times creates extra space below the datagrid........
    if u cont get clearly please copy the below code and check it.......any other way to solve this problem?.......
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%" >
    <fx:Declarations>
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var ArrUserList:ArrayCollection;
    [Bindable]
    public var listDB:ArrayCollection = new ArrayCollection([ {label: "2011", data:"jan",day:"saturday",date:"1-4-11"},
    {label: "2011", data:"jan",day:"monday",date:"13-4-11"}, {label: "2013", data:"jan",day:"monday",date:"1-5-11"}, {label: "2013", data:"jan",day:"wednesday",date:"14-5-11"}, {label: "2015", data:"jan",day:"tuesday",date:"11-5-11"}, {label: "2015" ,data:"jan",day:"friday",date:"1-6-11"} ]);
    public var loc_first_last_name:String;
    function Load():void
    ArrUserList=Find_Duplicate(listDB);
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    function Clink_lnk_open():void
    if(lnk_open.label=="Open")
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=1;
    lnk_open.label="Close";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    else
    for(var i:int=0; i<ArrUserList.length; i++)
    ArrUserList[i].click=0;
    lnk_open.label="Open";
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount = ArrUserList.length ;
    function Click_UserName1(event:MouseEvent,data:Object):void
    loc_first_last_name=event.currentTarget.text;
    var str:String;
    for(var i:int=0; i<ArrUserList.length; i++)
    str=ArrUserList[i].label;
    if(loc_first_last_name==str)
    if(ArrUserList[i].click == 0)
    ArrUserList[i].click=1;
    else
    ArrUserList[i].click=0;
    ArrUserList.refresh();
    Lst_userlist.validateNow();
    Lst_userlist.dataProvider=ArrUserList;
    Lst_userlist.rowCount=ArrUserList.length;
    public function Find_Duplicate(test_arr:ArrayCollection):ArrayCollection
    var res_arr:ArrayCollection=new ArrayCollection();
    var flag:Boolean;
    for(var i:int=0;i<test_arr.length;i++)
    var j:int=0
    flag=false;
    for(;j<res_arr.length;j++)
    if(res_arr[j].label==test_arr[i].label)
    res_arr[j].dataCollection.addItem(test_arr[i]);
    flag=true;
    break;
    if(!flag)
    var myItem:Object = new Object() ;
    myItem.label=test_arr[i].label;
    myItem.dataCollection=new ArrayCollection();
    myItem.dataCollection.addItem(test_arr[i]);
    res_arr.addItem(myItem) ;
    return res_arr;
    ]]>
    </fx:Script>
    <s:Scroller id="id_scroller" width="100%" height="100%">
    <s:VGroup id="id_Vgroup" paddingLeft="50" paddingTop="10" paddingBottom="10"   width="100%" height="100%" >
    <mx:VBox width="850" paddingLeft="0" paddingTop="1"    color="black"  backgroundColor="#FFFFFF">
    <mx:HBox width="850" left="50" paddingBottom="3"  paddingLeft="5" backgroundColor="#6D6C6C"   paddingTop="3" color="#FFFFFF" >
    <mx:LinkButton id="lnk_open" label="Open" textDecoration="underline" click="Clink_lnk_open();"/>
    <mx:Button id="load_btn" label="Load" click="Load()"/>
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850"   horizontalScrollPolicy="off" verticalScrollPolicy="off"  >
    <mx:List variableRowHeight="true"   width="850" id="Lst_userlist" paddingTop="-3" verticalScrollPolicy="off"  horizontalScrollPolicy="off"
    buttonMode="true"  >
    <mx:itemRenderer>
    <fx:Component>
    <mx:VBox paddingTop="-5"  horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <fx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    override public function set data(value:Object):void
    super.data = value;
    Membership_Grid.dataProvider=data.dataCollection;
    Membership_Grid.rowCount=data.dataCollection.length;
    lbl_userhead.text=data.label;
    lbl_userhead1.text=data.dataCollection.length+" Datas";
    if(data.click==1)
    Vbox_main.visible=true;
    Vbox_main.includeInLayout=true;
    else
    Vbox_main.visible=false;
    Vbox_main.includeInLayout=false;
    Membership_Grid.validateNow() ;
    ]]>
    </fx:Script>
    <mx:HBox id="vbox_grid"  horizontalScrollPolicy="off"  height="25" verticalScrollPolicy="off" width="850"  paddingLeft="10" paddingTop="5"  backgroundColor="#6D6C6C" color="#FFFFFF">
    <s:Label id="lbl_userhead" click="outerDocument.Click_UserName1(event,data)" buttonMode="true"   width="250"  paddingTop="3" />
    <s:Label id="lbl_userhead1"  buttonMode="true"   width="548" paddingTop="3" />
    </mx:HBox>
    <mx:VBox id="Vbox_main" width="850" horizontalScrollPolicy="off" verticalScrollPolicy="off"  visible="false" includeInLayout="false" >
    <mx:DataGrid id="Membership_Grid"   alternatingItemColors="[#DCDCDC,#F8F8FF]"  paddingLeft="5"  horizontalScrollPolicy="off" color="black"
    horizontalGridLines="false" verticalScrollPolicy="auto"  verticalGridLines="false"  rowHeight="25" width="850"  borderSkin="{null}"
    borderVisible="false" >
    <mx:columns>
    <mx:DataGridColumn width="150" headerText="Year" dataField="label"/>
    <mx:DataGridColumn width="150" headerText="Month" dataField="data"/>
    <mx:DataGridColumn width="150" headerText="Day" dataField="day" />
    <mx:DataGridColumn width="150" headerText="Date"  dataField="date"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>
    </mx:VBox>
    </fx:Component>
    </mx:itemRenderer>
    </mx:List>
    </mx:VBox>
    </mx:VBox>
    </s:VGroup>
    </s:Scroller>
    </s:Group>

    Hi
    Sir am using flex 4.0.1     SDKS 4.1.0....
    Still i cont fix this problem....i have the same prob in many mxml files .any alternate solution for my prob pls let me know...
    Thanks in Advance,
    senthil.

  • Advanced data grid memory leak issues

    Steps to reproduce:
    1. create an hierarchical xml as per the adobe live docs
    2. load this in to your flex app with http service (e4x)
    using hierarchical data as data provider eg
    mydata = new HierarchicalData(root.item);
    mydata.childrenField = "child" ;
    3. use a refresh button to reload the data
    Actual Results: system memory increases unlimited.
    Expected Results: system memory levels out as is with the
    normal datagrid
    I have made a test application that demonstrates the issue
    reported i hope it will help you resolve the issue.
    The proplem is particularly apparent with larger data sets
    and frequent data refreshes as with our application currently in
    production. The application should run in a webserver environment.
    For local file system use you might have to change the permissions.
    I did some further tests and the problem only occurs if the
    "displayItemsExpanded" property of the advanced datagrid is set to
    true.
    Regards,
    Michel Durieux
    this bug is filed under
    http://bugs.adobe.com/jira/browse/FLEXDMV-1750

    I have a data grid getting streaming quote data (for a trading
    application we are building in Flex). I get at least an update per
    symbol and the user can typically have anywhere from 20 symbols to 50
    symbols on the grid -
    so my test case, is i have 30 symbols in the data grid and each of
    them get an update / second (4 or 5 columns in the grid get updated)
    - so i find the index of the symbol who row needs to get updated and
    update those fields (also update the corresponding data source to
    handle other scenarios) ...
    let me know if you need any other info ?
    2009/5/10 Michael Borbor <[email protected]>:
    Hi there could you post your project test case? I assume you're ussing an ArrayCollection as the dataProvider, tests have been made and when dealing with very large amount of data the inner workings of the AC can perform up to 20 times worse than an Array due to binding mechanisms.
    >

  • Advanced Data Grid Refresh Issue

    I'm using an advanced data grid which  displays data in a tree structure format (parents and child nodes).  The advanced data grid is a child component within a VBox and uses customized column renderers.   I'm running into an issue where the advanced data grid is rebuilding (calling all the renderers again) whenever I move the mouse (focus) into the Advanced Data Grid component.   The ADG component is binded to a data object.  I'm expecting the ADG to rebuild when the data object it's binded to gets updated.   In this case the bindable data object is not being updated.   Why is the data grid rebuilding and is there a way to prevent this from occurring?  I'm getting mouse over and mouse move events but they are not causing the ADG to rebuild.
    Thanks for your help !!!

    Can you give us a quick code sample where we can reproduce
    this issue?
    Thanks,
    Swaroop

  • Issues with Data Grid Combo Boxes

    Hi,
    I am trying to implement, 3 combo boxes for each row in extended data grid but unable to find the solution. Can someone please help?
    Problem in detail:
    The issue is after populating the data grid i want to give users 3 options  using 3 combo boxes(i.e each row in data grid will now have 3 options , which is basically converting 1 row into 3 rows with 3 options),so that they are able to do their computations.
    This is reallly urgent, any help would be highly appreciated.
    Thanks & Regards
    Pankaj

    "In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion."
    In the "Results" tab, Click Ctrl & Tab keys (at the same time) or with mouse click on any cell other than the first column (a sequence or rownum), you will be able to navigate using the arrow keys.
    "Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check."
    The 0.0134 seconds could be the result of the most recently executed successful statement. Check the Script Output tab for errors. Use F5 (Run Script option) instead of F9.
    "I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql."
    On the SQL statement (or code), Right Click -> Format SQL (or press Ctrl & B), proper formatting would help.
    I use version 1.0.0.15.57 and seems to be working allright.
    - Babu Rangasamy

  • Data grid within advanced data grid (Hiding and showing columns)

    Hi,
    I have a dta grid within advanced datagrid. When the row of advanced data grid is expanded, the datagrid opens up.
    I want to control the columns of datagrid based on the value of a field in advanced data grid. I want to show all the columns of the datagrid if the field value of advanced data grid is "X" else I want to show only few columns of the data grid.
    I will set the id for all the columns of the datagrid. Then I think I can write some code in a method to set the visibility of the columns and assign the function to item opening property of the advanced data grid.
    Please give me some ideas.
    Regards,
    Mahee   

    Hi,
    Please go through following links:
    http://www.cflex.net/showFileDetails.cfm?ObjectID=553
    http://flexmusings.wordpress.com/2009/08/03/hide-row-column-datagrid/
    http://www.java2s.com/Code/Flex/Grid/HidinganddisplayingDataGridcolumns.htm
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Issue with using formatted date value column in order by clause...

    Hi,
    1) Through a function I am listing all the months in a year.
    like JAN-2007, FEB-2007,MAR-2007......
    2) i am comparing these values against a date value column in a table.
    And if there are no values in a particular period it will return a null value (simply to say, i am using an outer join)
    3) The issue.....
    When join both the queries then the order of the dates is not mainted .....
    My requirement is......
    Jan-2007 = 3
    Feb-2007 = 5
    Mar-2007 = null
    etc.....
    should be acheived.
    But I end up in the alphabetical order of the months....
    like
    Apr-2007 = 5
    Aug-2007 = 10
    etc.....
    Can anybody let me know how can i acheive my resultant output to be ordered by the date and not by character.
    When I use the date column in the order by I run into an error....
    saying....
    ORA-01858: a non-numeric character was found where a numeric was expected
    Its a kind of urgent...
    Any help is appreciated....
    KK

    When I use a outer join as follows....
    "and upper(to_char(a.task_planned_start_date,'mon-rrrr')) = d.period_name(+)"
    All the null periods are ending at the bottom.It's standard behavoiur.
    Seems, you need to sort by a.task_planned_start_date.
    Look below:
    SQL> select e.ename, ec.ename from emp e, emp_copy ec
      2  where e.empno = ec.empno(+);
    ENAME      ENAME
    SMITH      SMITH
    ALLEN
    WARD       WARD
    JONES
    MARTIN     MARTIN
    BLAKE
    CLARK      CLARK
    SCOTT
    KING       KING
    TURNER
    ADAMS      ADAMS
    JAMES
    FORD       FORD
    MILLER
    14 rows selected.
    SQL> select e.ename, ec.ename from emp e, emp_copy ec
      2  where e.empno = ec.empno(+)
      3  order by ec.ename
      4  /
    ENAME      ENAME
    ADAMS      ADAMS
    CLARK      CLARK
    FORD       FORD
    KING       KING
    MARTIN     MARTIN
    SMITH      SMITH
    WARD       WARD
    JAMES
    TURNER
    ALLEN
    MILLER
    BLAKE
    JONES
    SCOTT
    14 rows selected.
    SQL> select e.ename, ec.ename from emp e, emp_copy ec
      2  where e.empno = ec.empno(+)
      3  order by e.ename
      4  /
    ENAME      ENAME
    ADAMS      ADAMS
    ALLEN
    BLAKE
    CLARK      CLARK
    FORD       FORD
    JAMES
    JONES
    KING       KING
    MARTIN     MARTIN
    MILLER
    SCOTT
    SMITH      SMITH
    TURNER
    WARD       WARD
    14 rows selected.Rgds.

Maybe you are looking for

  • Why does my photos need loading in the gallery

    my pictures are taking time to load and now they re not even loading i can see that exclamation mark at the bottom of the picture which is killing my picture clarity and i cannot even forward pctures over whatspp what should be done ? badly need help

  • Certificate error while accessing EWS

    Hi, While try to access the EWS web service, I get the following error microsoft.exchange.webservices.data.ServiceRequestException: The request failed. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpa

  • ERROR: capturing outparam - Oracle DB 'Date' via 'introspected procedure'

    Hi, We have an introspected stored proc (oracle db stored proc which originally returns Oracle 'Date' ). The introspected 'signature' has output params as 'Feugo.Lang.Time'. When we 'call' the procedure from an automatic activity, (just a bare minimu

  • Non-deductible tax configuration

    Hello, How to configure non-deductible cost? Is it something we can configure with certain percentages. I did search other threads regarding this issue and found below solution. 1. Open Administration -> Setup -> Financial -> Tax -> Tax Type 2. Doubl

  • Tecra M2 hangs, not doing complete startup, requires manual shutdown

    I have a tecra m2 which is giving the above problems. Note that once the notebook is recovered from the image, it works 100%. it is only after installing 3rd party programs that it is happening. the programs are as follows: StarOffice, NAV Corporate,