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
70
How to delete the default null row generated on pageload
posted

On pageload we are displaying records in xamdatagrid along with the headers.

But when there are no records in the list then xamdatagrid is displaying the null record as a first item.

I tried to remove the null record with 

SourceList.SelectedItems.Records.Add(SourceList.Records[0]);
SourceList.ExecuteCommand(DataPresenterCommands.DeleteSelectedDataRecords);

But "SourceList.ExecuteCommand(DataPresenterCommands.DeleteSelectedDataRecords);" this line is throwing "ContextswitchDeadlock" error.

Kindly help me to delete the null record.

I can see the null record in "DataRecord" property of xamdatagrid. How to delete the null record from the datarecord.

When i make datasource of xamdatagrid to null then it is not displaying the headers also.

I need headers with empty records.

  • 138253
    Offline posted

    Hello Naresh,

     

    Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.

     

    Looking forward for your reply.

    XamDataGridEmptyDataSource.zip
  • 138253
    Offline posted

    Hello Naresh,

     

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.