Hello,
I have a xamDataGrid that I build from my other post : http://ko.infragistics.com/community/forums/t/96774.aspx
I still have an issue to display all values, but I have a more urgent issue about the refresh.
My datasource change twice by each minute.
I have the initialized method from this article : http://ko.infragistics.com/community/blogs/blagunas/archive/2012/10/24/xamdatagrid-dynamically-create-and-data-bind-columns-with-an-editor-of-your-choice.aspx
But, I don't have a refresh method that clear old fiels and add new one. I have one field hard coded, others are dynamic.
Could you help me to refresh my grid ?
Regards
Hello teamtim,
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.
I have been looking into your issue and it seems that I am missing something from your scenario. Would you please provide me with more detailed information about the functionality you want to achieve? Having this information would help me further investigate this matter for you.
Looking forward to hearing from you.
I'm able to do one thing of two.
I want to change the numbers of colums, but after 2 clicks, there is only two colums.
Thanks for your help
Thank you for the provided sample application.
I have been looking into it and what I can suggest is to use the RemoveAt method of the Fields collection of the XamDataGrid. If you would like to remove all Fields, that have Period in their Labels - on the button click you loop through the Field and check if the "Period" string is present. If yes you can remove that Field.
Here is a code snippet of the above mentioned functionality:
for (Int32 i = 0; i < staffMember.Periods.Count; i++)
{
if (this.Values.FieldLayouts[0].Fields[i].Label.ToString().Contains("Period"))
this.Values.FieldLayouts[0].Fields.RemoveAt(i);
}
Please do not hesitate to let me know if you have any further questions on this matter.
I attach the project with one button.
The aim is to clear all dynamic fields and insert new from the viewModel.