Accessing button properties in datagrid row?

Hi
I ve a datagrid which has a button in each row called "Select". When the user clicks the button it calls a function which saves the row details in an array. I also want to change the label and icon of the button but don't know how to access it?
I ve tried giving each button a unique ID but I "is not a valid identifier" so I m really not sure how to access each button from my main script, anyone help?
Cheers in advance
Shaun

Hi
Thanks for replying, I m still unsure of how to access the properties of a button in a row? I currently have the code below and am struggling to access the properties of the 'Add' button so I can change the label and icon?
Cheers
Shaun
        <mx:columns>
                            <mx:DataGridColumn headerText="Group" dataField="groupName" width="130" editable="false" sortable="false" />
                            <mx:DataGridColumn headerText="Article Number" dataField="articleNumber" width="200" editable="false" sortable="false" />
                            <mx:DataGridColumn headerText="Article Name" dataField="slideTitle" width="230" editable="false" sortable="false" />
                            <mx:DataGridColumn headerText="Colourway" dataField="colourway" width="218" editable="false" sortable="false" />
                            <mx:DataGridColumn editable="false" paddingLeft="5" sortable="false">
                                <mx:itemRenderer>
                                    <mx:Component>
                                        <mx:VBox>
                                            <mx:Button label="Add" icon="@Embed(source='assets/icons/add.png')">
                                                <mx:click>
                                                    <![CDATA[
                                                        outerDocument.addItemToCart(data);
                                                    ]]>
                                                </mx:click>
                                            </mx:Button>                                               
                                        </mx:VBox>
                                    </mx:Component>
                                </mx:itemRenderer>
                            </mx:DataGridColumn>

Similar Messages

  • Accessing button properties in an array of clusters ...

    I have a situation whose solution is eluding me.
    I built an array of clusters (15 of clusters in the array). Each cluster is a boolean LED control and a path control.
    The array is wired to various VIs. One of these VIs is supposed to
    select a path from the array and then change the color of the LED that
    is clustered with that path. The path part works because I am reading
    the value of that array element. The problem is that I don't know how
    to get to the associated LED properties.
    I have used several approaches, but in all cases: when I change the color of the target LED, all 15 LEDs change color.
    Inside of a while loop with indexing enabled, I have unbundled the
    current cluster and then tried to apply a property node to the LED
    element but all LEDs change color.
    So the question is - How do I access the individual LED properties in an array of clusters?

    In an array only the values can be different for different elements. The properties are the same for all elements.
    You can work around this by using a color box, which has the color as the value.
    Here is an example of a color box customized to look like a LED with an explanation of how it was created.
    Try to take over the world!

  • Insert String array as label content in datagrid row through radio button C# wpf?

    I have written some code for inserting label at runtime having its content set to a string array and then insert that label into a datagrid row . All of this will initiate when certain radiobuttons are checked. code is working perfectly fine. But i need
    to improve this code as i am learning C#, wpf and datagrid. I know there can be a certain way to improve this code. 
    This code will be a nightmare when there are 50 radiobuttons. 
    can it be improve and how it can be? if u can explain that will be very kind of you  
    Xaml Code:
    <Grid>
    <RadioButton x:Name="rb_1" Content="RadioButton" HorizontalAlignment="Left" Margin="351,85,0,0" VerticalAlignment="Top" GroupName="1" />
    <RadioButton x:Name="rb_2" Content="RadioButton" HorizontalAlignment="Left" Margin="351,105,0,0" VerticalAlignment="Top" GroupName="1"/>
    <RadioButton x:Name="rb_3" Content="RadioButton" HorizontalAlignment="Left" Margin="351,120,0,0" VerticalAlignment="Top" GroupName="1" />
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,159,0,0" VerticalAlignment="Top" GroupName="2" />
    <RadioButton x:Name="rb_4" Content="RadioButton" HorizontalAlignment="Left" Margin="351,179,0,0" VerticalAlignment="Top" GroupName="2"/>
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,199,0,0" VerticalAlignment="Top" GroupName="2" />
    <Button Content="Button" HorizontalAlignment="Left" Margin="713,60,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_2"/>
    <DataGrid x:Name="datagrid_" HorizontalAlignment="Left" Margin="549,85,0,0" VerticalAlignment="Top" Height="253" Width="399" />
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,226,0,0" VerticalAlignment="Top" GroupName="3" />
    <RadioButton x:Name="rb_6" Content="RadioButton" HorizontalAlignment="Left" Margin="351,246,0,0" VerticalAlignment="Top" GroupName="3"/>
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,266,0,0" VerticalAlignment="Top" GroupName="3" />
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,298,0,0" VerticalAlignment="Top" GroupName="4" />
    <RadioButton x:Name="rb_8" Content="RadioButton" HorizontalAlignment="Left" Margin="351,318,0,0" VerticalAlignment="Top" GroupName="4"/>
    <RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="351,338,0,0" VerticalAlignment="Top" GroupName="4" />
    </Grid>
    Code Behind:
    public partial class MainWindow : Window
    public MainWindow()
    InitializeComponent();
    DataTable dt;
    DataRow dr;
    string[] str = new string[4];
    int location = 0;
    int count = 0;
    private void Window_Loaded(object sender, RoutedEventArgs e)
    dt = new DataTable("emp");
    DataColumn dc1 = new DataColumn("Factors", typeof(string));
    DataColumn dc2 = new DataColumn("Non_Compliant", typeof(string));
    dt.Columns.Add(dc1);
    dt.Columns.Add(dc2);
    datagrid_.ItemsSource = dt.DefaultView;
    private void Button_Click_2(object sender, RoutedEventArgs e)
    if (count >= 1)
    datagrid_.ItemsSource = dt.DefaultView;
    dt.Clear();
    str[0] = "Load Path1";
    str[1] = "Load Path2";
    str[2] = "Load Path3";
    str[3] = "Load Path4";
    int j = 0;
    if (rb_2.IsChecked == true)
    j = 0;
    int k = 0;
    dr = dt.NewRow();
    Label label = new Label();
    label.Height = 28;
    label.Width = 100;
    label.HorizontalAlignment = HorizontalAlignment.Center;
    label.VerticalAlignment = VerticalAlignment.Center;
    label.Content = str[j];
    dr[k] = label.Content;
    dt.Rows.Add(dr);
    datagrid_.ItemsSource = dt.DefaultView;
    location += 34;
    if (rb_4.IsChecked == true)
    j = 1;
    int k = 0;
    dr = dt.NewRow();
    Label label = new Label();
    label.Height = 28;
    label.Width = 100;
    label.HorizontalAlignment = HorizontalAlignment.Center;
    label.VerticalAlignment = VerticalAlignment.Center;
    label.Content = str[j];
    dr[k] = label.Content;
    dt.Rows.Add(dr);
    datagrid_.ItemsSource = dt.DefaultView;
    location += 34;
    if (rb_6.IsChecked == true)
    j = 2;
    int k = 0;
    dr = dt.NewRow();
    Label label = new Label();
    label.Height = 28;
    label.Width = 100;
    label.HorizontalAlignment = HorizontalAlignment.Center;
    label.VerticalAlignment = VerticalAlignment.Center;
    label.Content = str[j];
    dr[k] = label.Content;
    dt.Rows.Add(dr);
    datagrid_.ItemsSource = dt.DefaultView;
    location += 34;
    if (rb_8.IsChecked == true)
    j = 3;
    int k = 0;
    dr = dt.NewRow();
    Label label = new Label();
    label.Height = 28;
    label.Width = 100;
    label.HorizontalAlignment = HorizontalAlignment.Center;
    label.VerticalAlignment = VerticalAlignment.Center;
    label.Content = str[j];
    dr[k] = label.Content;
    dt.Rows.Add(dr);
    datagrid_.ItemsSource = dt.DefaultView;
    location += 34;
    count++;

    @Usamakhan1990,
    Use usercontrol with label and checkbox is reasonable for a datagrid control if you don't want to have too much code for those radio buttons. So I agree with andy here with that usercontrol.
    So is it required that your radiobutton should be outside the datagrid?
    Anyway, I think you already know that you can bind data to columns yourself. So please check the following thread:
    http://stackoverflow.com/questions/22922533/how-do-i-automagically-bind-a-string-array-to-a-wpf-datagrid
    <DataGrid Name="_dataGrid" Grid.Row="0" AutoGenerateColumns="False">
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column 1" Binding="{Binding [0]}"/>
    <DataGridTextColumn Header="Column 2" Binding="{Binding [1]}"/>
    </DataGrid.Columns>
    </DataGrid>
    Or define the columns from code, in case you have dynamic number of columns, for example :
    string[][] array = fs.CSVToStringArray();
    for (int i = 0; i < array[0].Length; i++)
    var col = new DataGridTextColumn();
    col.Header = "Column " + i;
    col.Binding = new Binding(string.Format("[{0}]", i));
    _dataGrid.Columns.Add(col);
    this.ExternalData._dataGrid.ItemsSource = array;
    And for Radio button part, please see here:
    http://stackoverflow.com/questions/397556/how-to-bind-radiobuttons-to-an-enum
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Cannot set Flash button properties from sprite behaviour

    I'm puzzled...
    I'd like to set Flash button properties from behaviors on the
    sprite
    itself (unselect all buttons with a sendAllSprites, for
    example) but
    only this sample script works :
    on mouseEnter me
    sprite(spriteNum).selected = true
    end
    those ones won't:
    on mouseEnter me
    me.selected = true
    end
    on mouseEnter me
    selected = true
    end
    It must but obvious but I can't get it to work...
    Thanks.
    PJ

    The selected property is a property of the sprite. You need
    to
    reference the sprite specifically when you access it.
    When you are using
    me.selected=true
    the 'me' is referring to the current instance of the
    behaviour that is
    running. It is not referring to the sprite itself. Therefore,
    you need
    to use
    sprite(me.spriteNum).selected=true
    so that you correctly reference the sprite.
    You can use the syntax
    me.property=true
    only if the property in question is a property in that
    *script*.

  • Moving datagrid rows up and down

    I have a datagrid and I want to be able to move one row at a time, up or down. What would be the best way to make this happen? Is there a built in function for this?
    I currently want to be able to select a row and then push an up or down button to move it. Could I just take the dataProvider and get the items current index and do an addItemAt(new index);
    Thanks for your help.

    Hi,
    I have written this code simply for the up. You can write similarly for the down. Pls check this code.Let  me know if you have any issue.
    MainApplication.mxml
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >
    <mx:Script>
        <![CDATA[
            import mx.controls.Alert;
            import mx.collections.ArrayCollection;
            [Bindable]
            private var ac : ArrayCollection = new ArrayCollection([
            {name : 'Smith',age : '45'},
            {name : 'Jake',age : '44'},
            {name : 'Carls',age : '43'},
            {name : 'Robert',age : '33'},
            public function up():void
                if(dg.selectedIndex == -1)
                    Alert.show("Select the row which you want to up.");
                    return;
                if(dg.selectedIndex == 0)return;
                var selectedRowInx : Number = dg.selectedIndex;
                var itemToShift : Object = ac.getItemAt(selectedRowInx) as Object;
                ac.addItemAt(itemToShift,dg.selectedIndex-1);
                ac.removeItemAt(dg.selectedIndex);
                dg.invalidateDisplayList();
        ]]>
    </mx:Script>
       <mx:DataGrid id="dg" width="350" dataProvider="{ac}">
          <mx:columns>
             <mx:DataGridColumn dataField="name" />
             <mx:DataGridColumn dataField="age" />
          </mx:columns>
       </mx:DataGrid>
    <mx:Button label="Up the Row" click="up()"/>
    </mx:Application>

  • How to display data in ComboBox when click on DataGrid Row.

    Hi!
         I am new to Adobe Flex. I am building one Project that was related to Comapny and Customer. First I created Company Master. Then I create Customer Master successfully and My Backkend is SQLite Database.
         My Problem is I have two files one is CustomerMaster and second one is CustomerForm.
         In CustomerMaster I have a datagrid in that data was displaying thru Array Collection. When ever we doublick on datagrid row it's displayed a CompanyForm. CompanyForm  contains TextFiled and ComboBox. TextFiled populating data but Combobox doesnot. It display always prompt message.
          Please help.
    Thanks,
    Sree Kumar

    Hi! Vibhuti Gosavi,
                          First of all thanks for your quick reply. Already I saw that link.
    Actually, In CustomerForm successfully store the information into the database. While retrieving the data problem cames. Sample Code:
    CustomerMaster:
    private function createItem():void
                                            openTab(new Object());
                                  public function openTab(customer:Object):void
                                            var children:Array = tn.getChildren();
                                            var length:int = children.length;
                                            for (var i:int = 0; i<length; i++)
                                                      if (children[i].customer.customerId == customer.customerId)
                                                                tn.selectedIndex = i;
                                                                return;
                                            var form:CustomerForm = new CustomerForm();
                                            tn.addChild(form);
                                            form.customer = customer;
                                            form.dao = dao;
                                            form.addEventListener(CustomerEvent.CREATE, customerChangeHandler),
                                                      form.addEventListener(CustomerEvent.UPDATE, customerChangeHandler),
                                                      form.addEventListener(CustomerEvent.DELETE, customerChangeHandler),
                                                      tn.selectedChild = form;
                                  private function customerChangeHandler(event:CustomerEvent):void
                                            customerArrayList = dao.findByCustomerAll();
                                            if (event.type == CustomerEvent.DELETE)
                                                      tn.removeChild(event.target as CustomerForm);
                        ]]>
              </fx:Script>
              <mx:Canvas id="container" left="12" right="12" top="12" bottom="12">
                        <mx:Canvas left="0" top="2" right="0" height="33">
                                  <mx:Button id="AddCustomer" x="1" width="108" height="32" click="createItem()"
                                                         icon="@Embed('assets/icon_plus.png')" label="Add Customer" toolTip="Add Customer"
                                                         verticalCenter="-1"/>
                        </mx:Canvas>
                        <code:SuperTabNavigator id="tn" x="0" y="39" width="681" height="197"/>
                        <mx:DataGrid id="customerList" x="1" y="262" width="680" height="231"
                                                       dataProvider="{customerArrayList}"
                                                       doubleClick="openTab(customerList.selectedItem)" doubleClickEnabled="true">
                                  <mx:columns>
                                            <mx:DataGridColumn dataField="customerId" headerText="Id"/>
                                            <mx:DataGridColumn dataField="customerName" headerText="Name" />
                                            <mx:DataGridColumn dataField="companyName" headerText="companyName" />
                                  </mx:columns>
                        </mx:DataGrid>
              </mx:Canvas>
    CustomerForm:
    public function set customer(customer:Object):void
                                            this._customer = customer;
                                  public function get customer():Object
                                            return this._customer;
                                  private function saveCustomer():void
                                            if (Validator.validateAll(customerValidators).length>0)
                                                      return;
                                            _customer.customerName = customerName.text;
                                             _customer.companyName = companyName.text;
                                            if (_customer.customerId > 0)
                                                      updateCustomer();
                                            else
                                                      insertCustomer();
                                  private function insertCustomer():void
                                            try
                                                      Alert.show(_customer.normalPkts);
                                                      dao.insertCustomer(_customer);
                                                      customerId.text = _customer.customerId;
                                                      dispatchEvent(new CustomerEvent(CustomerEvent.CREATE, _customer, true));
                                                      var alertText:String="Company Created Successfully!";
                                                      Alert.show(alertText,"",4,null,null,ConfirmMessage);
                                            catch (error:SQLError)
                                                      var alertErrorCreate:String="Company not Created...";
                                                      Alert.show(alertErrorCreate+"\n"+error.details,"",4,null,null,ErrorMessage);
                                  private function updateCustomer():void
                                            try
                                                      dao.updateCustomer(_customer);
                                                      dispatchEvent(new CustomerEvent(CustomerEvent.UPDATE, _customer, true));
                                                      var alertText:String="Company Updated Successfully!";
                                                      Alert.show(alertText,"",4,null,null,ConfirmMessage);
                                            catch (error:SQLError)
                                                      var alertErrorText:String="Company not Updated...";
                                                      Alert.show(alertErrorText+"\n"+error.details,"",4,null,null,ErrorMessage);
                                  private function deleteItem():void
                                            try
                                                      dao.deleteCustomer(_customer);
                                                      dispatchEvent(new CustomerEvent(CustomerEvent.DELETE, _customer, true));
                                            catch (error:SQLError)
                                                      Alert.show(error.details, "Error");
                        ]]>
              </mx:Script>
       <mx:Grid x="10" y="10" width="665" height="130" verticalAlign="middle">
                        <mx:GridRow width="665" height="100%">
                                  <mx:GridItem width="85" height="100%">
                                            <mx:Label width="85" text="Customer Id:"/>
                                  </mx:GridItem>
                                  <mx:GridItem width="115" height="100%">
                                            <mx:TextInput id="customerId" text="{_customer.customerId}" editable="false" width="115"/>
                                  </mx:GridItem>
                                  <mx:GridItem width="102" height="100%">
                                            <mx:Label width="102" text="Company Name:"/>
                                  </mx:GridItem>
                                  <mx:GridItem width="100" height="100%">
                                            <mx:ComboBox id="companyName" dataProvider="{companyIdList}" labelField="companyName"
                                                                           prompt="Select..." text="{_customer.companyName}" width="100"/>
                                  </mx:GridItem>
                          <mx:GridItem width="230" height="100%" horizontalAlign="center" verticalAlign="middle">
                                            <mx:Button label="Save" click="saveCustomer()"/>
                                            <mx:Button label="Delete" click="deleteItem()"/>
                                  </mx:GridItem>
                        </mx:GridRow>
              </mx:Grid>
    =====================================================================
    I have two ArrayCollections 1) companyIdList (CustomerForm)
                                              2) customerArrayList(CustomerMaster)
    please go through the bold text. Please focus on two dataProviders. These dataproviders are binding for One Combo Field.
    Thanks,
    Sree Kumar
    Message was edited by: sreekumar1976

  • LOV button navigation in multi row block

    We have two fields in a multirow block, Role Type and Parent Role Type(which is a LOV button). When the current row selector is on a Role Type row all Parent Role Type LOV buttons for all the rows change only the current selected row. With Designer we set Keyboard/Mouse navigable properties to Yes(in the OLB) which fixed it but with Headstart these properties do not fix this problem. Any info and suggestions would be appreciated. Thanks.

    Ok, now I understand.
    Unfortunately, you have run into some standard forms behavior that doesn't work the way you want it to. The LOV button is not navigable, because your cursor needs to be sitting in the data item when the call to the LOV is made. Since this button is not navigable, the cursor will not move to the current record when you press the button. (Actually, the button is identical on each record.)
    Possible solutions:
    1 - use only 1 button in an overflow below. (Create your own action item instead of using the LOV button preference.)
    2 - don't use a button at all. (Headstart provides the LOV toolbar button.
    3 - Try generating the lov as a poplist. (See Oracle Designer online help).
    4 - Use the new Oracle Look and Feel (available only on the web) to create a button in the field ('...').
    Regards,
    Lauri

  • Sharepoint 2010 foundation list open(export) to Access button disable?

    1. Why In sharepoint 2010 foundation list "Open with Access" button is disabled?
    2. Some PCs don't even able to see the "Open with Access" button in datasheet view?

    It is a external list
    Please firstly make sure you have installed Assess 2010 properly.
    And please check if the issue occured in all lists or just one list.
    Click File menu after you open the Access, you will see Open. There will open a windows, in the file type dropdownlist(the default value is "All Files(*.*)"), you can select "Microsoft SharePoint Foundation"
    http://community.office365.com/en-us/f/154/t/201186.aspx
    . Check if the add-on has been enabled by clicking
    Internet Options of IE, then selecting Programs > Manage add-ons. Here’s the screenshot for your reference.
    http://answers.flyppdevportal.com/categories/sharepoint2010/sharepoint2010general.aspx?ID=9afe0617-3dc0-49d2-919f-659bf80fde38
    The problem stems from having done a custom installation of Office Professional Plus 2010 and only installing Access.
    If you are doing a custom installation, you must expand Office Tools and Microsoft SharePoint Foundation Support. Under Microsoft SharePoint Foundation Support, there is another Microsoft SharePoint Foundation Support. Set this to Run from My Computer,
    and the Open with Access button will work.
    If this helped you resolve your issue, please mark it Answered

  • Two radio buttons in a single row of a table

    Hi All,
    Can we have two radio buttons in a single row of ADF TABLE.
    My requirement is that i have a list of submitted records. The user can approve or reject the records.
    All the records are displayed in the table. there will be two columns in the table(Approve , Reject) The user can approve the first record and reject the second record and so on....
    using table selectOne we can select only one row. Using radio buttons how to select the multiple records, at the same time grouping is done between the two columns(radio buttons) in the table

    Hi,
    I don't think that you can do this with radio buttons. The usecase is more for chackboxes. It would have been a usecase for radio buttons if there was a single column with 3 possible options
    - pending
    - approved
    - rejected
    Frank

  • How to access System properties in xml file

    hi,
    i want to read system properties in my xml file using ${} .
    I tried it but did not find any way.But when i use log4j if i set some variable in
    System properties that properties is read by the log4j.properties .
    I am writing a simple program that read a xml properties file file
    try {
                props   = new Properties();
                fis     = new FileInputStream(xmlFile);
                props.loadFromXML(fis);
    }before reading this file i set some properties and accessing this properties from that xml .but i cant.
    Thanks

    sabre150 wrote:
    fun_with_java wrote:
    can you give some example?Not really - I would have to write the code for you and I'm not getting paid for writing your code.Thanks for your kindness.
    I dont ask you to write the code.Need some help to start it .Actually i dont have knowledge that
    whether xml file automatically read it or i have prase the system property manually. Now i got the way to
    access system property in xml..
    Ok thanks again..
    Thanks & Regards

  • When clicking on datagrid row it throws me exception - WPF C#

    Whenever I try to double click my datagrid row to edit it, I throws me a few exceptions which doesn't say anything to me. Hovever if
    I set the whole datagrid to IsReadOnly to true, I want have the problem, but I need the second and third columns editable.
    XAML
    <DataGrid x:Name="clientList" HorizontalAlignment="Left" Height="225" Margin="11,126,0,0" VerticalAlignment="Top" Width="349" IsSynchronizedWithCurrentItem="False" AutoGenerateColumns="False" HorizontalGridLinesBrush="#FFB9B9B9" VerticalGridLinesBrush="#FF8B8B8B" GridLinesVisibility="Horizontal" CellStyle="{StaticResource Body_Content_DataGrid_Centering}">
    <DataGrid.Resources>
    <LinearGradientBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" StartPoint="0,0" EndPoint="0,1" >
    <GradientStop Color="#66240000" Offset="0"/>
    <GradientStop Color="#CC240000" Offset="0.65"/>
    </LinearGradientBrush>
    </DataGrid.Resources>
    <DataGrid.Columns>
    <DataGridTextColumn Width="30" Header="Id" IsReadOnly="True" Binding="{Binding Id}"/>
    <DataGridTextColumn Width="100" Header="Company" IsReadOnly="False" Binding="{Binding Company}"/>
    <DataGridTextColumn Width="130" Header="Name, Surname" IsReadOnly="False" Binding="{Binding Name}"/>
    <DataGridTemplateColumn Header="Actions" CellTemplate="{StaticResource myTemplate}"/>
    </DataGrid.Columns>
    </DataGrid>
    C#
    clientList.Items.Add(new DataClients { Id = 1, Company = "My Company", Name = "Jane Roe"});
    Exceptions
    Exception:Thrown: "'EditItem' is not allowed for this view."(System.InvalidOperationException)
    Exception:Thrown: "The string was not recognized as a valid DateTime. There is an unknown word starting at index 0." (System.FormatException)

    You need to set the ItemsSource property of the clientList DataGrid to a collection of DataClients objects that supports editing. HashSet<DataClients> does not for example but List<DataClients> and ObservableCollection<DataClients> does.
    You could call the ToList() method on the collection that you set as the ItemsSource for the DataGrid to convert it to a List<DataClients>:
    clientList.ItemsSource = yourCollection.ToList();
    The "The string was not recognized as a valid DateTime" error message should be pretty self-explanatory. You are trying to convert a string which doesn't contain a valid date or time value to a DateTime value somewhere, perhaps in the 'myTemplate'.
    There is nothing in the DataClients class that you have posted that will cause this exception to be thrown so it is impossible for anyone to tell.
    But please only ask one question per thread and then start a new thread if you have a new question.
    Please also remember to mark helpful posts as answer to close your threads.

  • Button in a table row to get value of a column.

    Hello,
    I am following [this thread|Re: Problem with getting table element's table row] to get the value of a column up on button click (the button is in the same row).
    Here is the code in wdDoModify ()
    if (firstTime)
              IWDButton button = (IWDButton) view.getElement("TableCellEditor");
              button.mappingOfOnAction().addSourceMapping("ScheduledCourses", "row");
    Here is the code in the button action()
    public void onActionRegisterStudent(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.gfc.hr.training.wdp.IPrivateCourseRegistrationCompView.IScheduledCoursesElement row )
        //@@begin onActionRegisterStudent(ServerEvent)
         wdContext.nodeScheduledCourses().setLeadSelection(row.index());
        //@@end
    The context node for the table is "ScheduledCourses"
    When I click the button, I get an exception....
    com.sap.tc.webdynpro.services.exceptions.WDIllegalArgumentException: Parameter ScheduledCourses not found

    Hi Srinivas,
    Assuming you have a node 'ScheduledCourses' with two attributes 'courseId' and 'courseName' and you want to display the 'courseName' on click of the button placed in a particular row of the table, please try the following (Most of them you have already done, if i am not wrong. I am listing the entire steps so that you can check whether you have missed any thing). 
    1. Place a Table UI element and bind the datatsource property to the node 'ScheduledCourses'
    2. Insert a new column in the table and for the column insert a table cell editor and select 'Button' from the list.
    3. select the button(table cell editor) and create an action for the button. While creating an action create a parameter with name 'courseElement' and type as IPrivate<ViewName>.IScheduledCoursesElement (Interface representing element of ScheduledCourses node)
    3. In wdDoModifyView() write the following code
        if(firstTime){
             IWDButton button=(IWDButton)view.getElement("Button1");
             button.mappingOfOnAction().addSourceMapping("nodeElement","courseElement");
    Here "Button1" is the id of the button inserted in the table column. The string "nodeElement" should be written as such and "courseElement" is the name of the parameter which we have created for the action of the button.
    4. Now in the action created for the button try to print the courseName as shown
    wdComponentAPI.getMessageManager().reportSuccess(courseElement.getCourseName());
    Regards,
    Shabeer

  • How can I access the properties of Microsoft files (excel, ppt, and word)

    Hi,
    How can I access the properties of common Microsoft file formats (Excel, Word, and Powerpoint) from a Java program. You can access/modify the properties of each document type using File->Properties in each MS application. The properties are essentially name/value pairs.
    Basically, I need to write a java program that scans a directory and accesses the properties in each of the MS files in the directory.
    thanks,
    -john

    By api. That is only way to establish a contract with the MS programs you want to interface with, unless you write an api yourself! I've used POI and it was an awesome way to use Excel in java. I created an excel spreadsheet from the results of a sql query from a batch program and then it was automatically emailed using javamail to my client. I had a lot of VBA experience with Excel, Word, and Outlook and it didn't take me long to get used to using Jakarta-POI.
    Now I see there is Jakarta-POI-HWPF which works with MS Word documents. Go to: http://jakarta.apache.org/poi/

  • Not Able to Access the Properties of Workspace and Target

    Hello
    I have install PB 11.2 Build 9027 on my laptop ( Winows 7 (64 bit))). PowerBuilde is open and able to see the existing code.
    But when I am trying to access the properties of Workspace or target for Source code control Setup, Properties will not come and nothing happen, I am not able to view the properties of Workspace and targets.
    One more think I notice ,when I was trying to create new application (File > New > Target Tab > Application)  then window will not open.
    Please provide me some suggestion on this issue.
    Thanks
    Amit Maheshwari

    Hi,
    You might find a much larger audience for technical questions if you open a discussion at the PowerBuilder Developer Center
    PowerBuilder Developer Center
    Thanks,
    Ben

  • Why can't I see an export value option in my radio button properties? I am using Acrobat X pro.

    Why can't I see an export value option in my radio button properties? I am using Acrobat X pro.

    Thanks so much. Thought it was just the name of the button and did not realize it was the value. Now able to use them for calculations.

Maybe you are looking for