private void clearData() { btn_del.Enabled = false; Panel1.Visible = false; // cleargrid dgrid_Proc.DataSource = null; dgrid_Proc.DataBind(); GridView_other.DataSource = null; GridView_other.DataBind(); GridView_opn.DataSource = null; GridView_opn.DataBind(); GridView_Iado.DataSource = null; GridView_Iado.DataBind(); GridView_trck_chn.DataSource = null; GridView_trck_chn.DataBind(); }
void fillGrid_tch() { string did = ddl_dist.SelectedValue; string depid = ddl_IC.SelectedValue; string gid = ddlgodown.SelectedValue; string qrychk = "select * from SCSC_Truck_challan where Dist_ID='" + did + "' and Depot_Id='" + depid + "' and Dispatch_Godown='" + gid + "' "; mobj = new MoveChallan(ComObj); DataSet dschk = mobj.selectAny(qrychk); if (dschk == null) { } else { if (dschk.Tables[0].Rows.Count > 0) { GridView_trck_chn.DataSource = dschk.Tables[0]; GridView_trck_chn.DataBind(); } else { GridView_trck_chn.DataSource = null; GridView_trck_chn.DataBind(); } } }