Hi!
How is it possible to add a new row on a grid that is connected with a DataSet that currently has a “DefaultView”-filtering?
I have look at MSDN, and tried to “translate” it to Xceed grid language but without success.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconmodifyingdatausingdataview.asp
I would like to do following but the “Dim” line results in an exception “Specified cast is not valid.” Ok, it does not seems that it is possible for the system to merge a DataRowView into a DataRow – but what is the workaround then ?
Dim newrow As Xceed.Grid.DataRow = xGrid1.DataSource.DefaultView.AddNew()
newrow.Cells(“GroupID”).Value = g_CurrentGroupID
newrow.EndEdit()
xGrid1.SelectedRows.Clear()
xGrid1.SelectedRows.Add(newrow)
xGrid1.Scroll(Xceed.Grid.ScrollDirection.BottomPage)
Relies on your expertice…
Best Regards
Benjamin T
Imported from legacy forums. Posted by BenjaminT (had 2256 views)