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
4695
Object reference not set to an instance of an object.
posted

Dear all,

I have below code and don't know why in datasource=, it throw exception??

DataSet ds1 = new DataSet();
            ds1.Tables.Add(this.itemListTable);
            ds1.Tables.Add(this.productListTable);
            ds1.Tables.Add(this.categoryListTable);
            ds1.Relations.Add(ds1.Tables["List1"].Columns["PromoCode"], ds1.Tables["ProductInfo"].Columns["PromoCode"]);
            ds1.Relations.Add(ds1.Tables["List1"].Columns["PromoCode"], ds1.Tables["CategoryInfo"].Columns["PromoCode"]);

            this.ultraGrid1.DataSource = ds1;   // throw exception here