Hi... i am using xamdatagrid in which i have add button.if i click on add button a new window open in with textbox.Based on input i am displaing in xamdatagrid.But latest is going bottom.how i can i avoid it..the latest one should come first in xamdatagrid.Plz help me to solve this...
hi..... i can do like this? Cases.Insert(0,addDLSPCaseViewModel); where cases is observable collection adding to the property containing view-model in this i have name and date.if for today's date i have 3 name the last inserted value will sit in fourth position.how can i make it first position.
Hello,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your reply. If you are adding the records in the XamDataGrid through your DataSource, you can choose where the record will appear in the XamDataGrid, by choosing the position of the item in the collection bound to the grid. For example if you insert an item to your source collection at position 3, the record corresponding to the item will appear as third record in the XamDataGrid. If you use the Add method of your collection to add new item, the item is added as last in the collection and the XamDataGrid displays the record at the last position.
Please let me know if you need any further assistance on the matter.
Hi... thanks... Should i change the view model? Is it any other way to do in xamdatagrid(in xaml or xaml.cs) other than changing in ViewModel datacontext.
Thank you for your post. I have been looking into it and if I understand correctly you have a window which is used to add a new record in a XamDataGrid and you wish the newly added record to appear at the first position of the XamDataGrid. If this is correct, I can suggest using the Insert method of your collection in order to add the item in the data source, in order to show the record at the top of the grid. I have created a sample application that shows how you can implement this scenario.