Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
995
How do i select a field
posted

Before i begin I am very new to WPF and the xamDataCard object  - so be gentle.

I have bound the xamDataCard object to a datatable and it all appears as intended.

My problem lies where i need get the data from the ClientID field of the datacard when ever the datacard is selected.

I was thinking something like

MessageBox.Show(XamDataCards1.ActiveRecord.field("ClientID").Value.ToString)

Parents
No Data
Reply
  • 7305
    Verified Answer
    posted

     

    Hello,

    The ClientID, per your screenshot, does not contain single value. It represents a collection of cells. When any given card is activated by selecting it  you can retrieve the cell values of the selected card.

    There is detail help topic on Accessing the Cell Values in RecordActivated event in our online documentation. I recommend reading it first, and if you have any questions feel free to ask. Here is the article:

    http://help.infragistics.com/NetAdvantage/WPF/current/CLR4.0/?page=xamDataPresenter_Accessing_Cell_Values_in_the_RecordActivated_Event.html

    Note: In the help article there is a code snippet that shows you how to retrieve the record and access the cells in the record. Keep in mind that if you have the filters enabled, as it shows in your screenshot, you would need to ensure the record type is not a FilterRecord otherwise you would get an exception when you try to reference the cells. At the beginning you can do something like:

    if (e.Record is FilterRecord) return;

     

    Sam

     

Children