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
229
Cardview
posted

Hi,
I have a form that shows orders and order-details. This works fine.
Problem is how to show the orders in cardview and the details in listview.
If I set
this.ultraGrid1.DisplayLayout.Bands[0].CardView = true
only the orders are shown.

This is my code:


            String connectionstring = @"MultipleActiveResultSets=True
;Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=HavenSql;Data Source=ERIKCOMPAQ\PRESARIO;";
            String Invoice = "SELECT * FROM INVOICE WHERE ID=1";
            String InvoiceRow = "SELECT * FROM INVOICE_ROW WHERE
INVOICE_ID=1";
            SqlConnection con = new SqlConnection(connectionstring);
            SqlDataAdapter oDataAdapter = new SqlDataAdapter(Invoice, con);
            DataSet ds = new DataSet();
            oDataAdapter.Fill(ds, "Invoice");
            oDataAdapter = new SqlDataAdapter(InvoiceRow, con);
            oDataAdapter.Fill(ds, "Invoice_Row");
            ds.Relations.Add("Invoices_rows",
                ds.Tables["Invoice"].Columns["ID"],
                ds.Tables["Invoice_Row"].Columns["Invoice_ID"]);
            this.ultraGrid1.SetDataBinding(ds, "INVOICE");
            UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
            band.CardView = true;


Any suggestions are appreciated.


Erik