hello,
in my application programmatically add records to the table which are linked to my datacards, then performed a sort to the data table, but this causes a offset between the data and
datacards
how I can fix this? or which is the best way to add data programmatically to xamdatacards and sort both?
Hello,
Thank you for your post. I have been looking into your scenario and I have been trying to reproduce your issue without success. When I add new rows to the data table and sort it, no offset appears.
I am attaching the sample application(DataCardsDataTable.zip) that I have used for my test. Please provide me with some more details or modify it in order to meet exactly your scenario.
Looking forward to hearing from you.
Hi,
I analyzed my code and it seems that the problem is when insert a new record in the datatable and sort, the index of the activerecord and the index of the DataRecord no longer match, and this index is the one I use for get the data of the record, here is my code:
Private Sub xcards_SelectedItemsChanged(sender As Object, e As Infragistics.Windows.DataPresenter.Events.SelectedItemsChangedEventArgs) Handles xcards.SelectedItemsChanged
RegistroSeleccionado = xcards.ActiveRecord.Index
If PlantillaDS.Tables("PlantillaTurno").Rows(RegistroSeleccionado).Item("prog") <= 0 Then
grdIngresaPlaza.Width = 200
grdIngresaPlaza.IsEnabled =True
txtPlazaNueva.Text =""
Else
xcardsSeleccionado()
End If
End Sub
is this the right way to get the data in a record (through the associated dataset) or is there a way to get them from the fields of the selected card?
I am just checking, if you require any further assistance on the matter.