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
1284
Saving DisplayLayout in Database
posted

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

Parents
  • 37774
    posted

    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

Reply Children