Page 1 of 1

Filling a DataGridView with a dataset using parameters

Posted: Tue 28 Jul 2015 18:57
by garling
I created a dataset to my SQLite db and I set up a parameter to retrieve data from it. How do I fill by datagrid view with the dataset using a parameter?

This is what I have used before to fill with out a parameter:

Code: Select all

orderHeaderSurfaceDataGridView.DataSource = dsPendingOrders1.Tables[1];
            dsPendingOrders1.Fill();
How would I pass a parameter in?

Re: Filling a DataGridView with a dataset using parameters

Posted: Fri 31 Jul 2015 16:57
by Shalex

Code: Select all

orderHeaderSurfaceDataGridView.DataSource = dsPendingOrders1.Tables[1];
(dsPendingOrders1.Tables[1] as Devart.Data.SQLite.SQLiteDataTable).SelectCommand.Parameters["p"].Value = "some value";
dsPendingOrders1.Fill();
Is that what you need? If not, please send us a small test project so that we can better understand a scenario you want to implement.

Re: Filling a DataGridView with a dataset using parameters

Posted: Wed 05 Aug 2015 17:07
by garling
I have it working now thanks.