Hi
I am working on a .NET 2.0 application using UltraWingrid.
I am saving the layout of the grid as follows.
Private GridLayoutsTable As New DataTable
Dim MS As New IO.MemoryStream() Me.grdData.DisplayLayout.Save(MS, Infragistics.Win.UltraWinGrid.PropertyCategories.All)
Dim LayoutArray() As Byte LayoutArray = MS.ToArray()
GridLayoutsTable.Rows.Add(New Object() {Nothing, "MyGridLayout", LayoutArray})
I am getting an error as "Input array is longer than the number of columns in this table."
How to Save the layout values to Database and Load it again?
Thanks
Ashok
The error looks like you're trying to add three cells to the row when in fact there are only two columns in the table; you need to make sure that you define the columns. With that being said, are you planning on serializing multiple different layouts at the same time? If not, using a DataTable might not make any sense and you would be better off passing the byte array to the DB directly through whichever means you prefer.
-Matt
Hi Matt
Thanks for your reply. How byte array can be saved to database?
I save layout properties in a memory stream and then convert it into a byte array.
The length of the byte array is more that ten thousand. Can you suggest how these many can be saved in the Database?
Can you send some sample code or article on this?