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
400
Modify SelectCommand in code
posted

I hope this is an easy question, since I just started using Infragistics yesterday.

I created an application and put a Web Grid on a panel. I used the designer to create the data source, table and columns. The XML code, which I tweaked a little by hand, looks like this: 

</igtbl:UltraWebGrid><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CaxcBrandsConnectionString %>"

SelectCommand="SELECT [po_num], ltrim(str(app_ord_num)) + '-' + app_ord_type csc_order, cust_name, pg_Brand, dept, store_no, start_date, end_date, sum_amt_buyer FROM [tblBrowseHdr] WHERE cust_no = 3098 and start_date > '2008.03.01'" >

</asp:SqlDataSource>

The application runs fine. However, you notice I hard-coded the cust_no and start_date. What I would like to do is to be able to control this SelectCommand in C# code, so I can put parameters there and fill them in at run time.How should I revise the application so that I can access these properties at run time?

As you will notice, I am brand new at Infragistics.

Parents
No Data
Reply Children
No Data