Hello,
I've two questions to DataCards:
1. I want to show only one card. What's the best way to do this?Is it possible to use a DataCard-Item without a XamDataCards-Form-Object or had I use a XamDataCards-Object and fill this with only one Item?
2. I want to place my own Button with new functionality in the header of each card. Is it possible? How? ;o)
Greets and many, many thanks...
Marco
Hi Marco,
I just wanted to know if you were able to solve your issue based on Alex's suggestions or you still need help? Just let me know.
Thank you.
Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Hi Dimi,
yes, I've solved it. ;o)Thank you for your question.
Greetings from Germany...Marco
Hi,
I have the same thing. How do i modifiy the content of the header?
Also is there an event for header mouse click? so when the user clicks on the header of the card it will do something
My XamDataCards are bound to a datatable datasource.
I use the cardHeader_Loaded event to create a button on each dataCard header.
I have 2 issues:
1. When i am scrolling in xamdataCards area, the cards content is changed but the header (the button content is not changed). How can i load the CardHeader_Loaded event with the right parameters each time i scroll in dataCards.
2. When my dataSource is changed i need to update the button Conent in each XamDataCards with the right data . Probably using the CardHeader_Loaded event. But i don't know how to call this event with the right parameters (how do i loop throught datacards and convert each dataCard to cardHeaderPresenter).
BTW,
The code for creating the button is:
Border border = Utilities.GetDescendantFromName((sender as Infragistics.Windows.DataPresenter.CardHeaderPresenter), "Bd") as Border;
Grid container = border.Child as Grid;
Infragistics.Windows.DataPresenter.CardViewCard card = Utilities.GetAncestorFromType(sender as Infragistics.Windows.DataPresenter.CardHeaderPresenter, typeof(Infragistics.Windows.DataPresenter.CardViewCard), true) as Infragistics.Windows.DataPresenter.CardViewCard;
string name = ((card.Content as Infragistics.Windows.DataPresenter.RecordPresenter).Record as Infragistics.Windows.DataPresenter.DataRecord).Cells["equipment"].Value.ToString();
Button btn = new Button { Content = name };
You can modify the content of the card’s header by creating a style for the CardHeaderPresenter and set the Template property.
In order to identify if the user clicks on the card header you can use a style for the CardHeaderPresenter with EventSetter for the MouseLeftButtonDown event and in its event handler you can make the card to do something.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support