/// <summary> /// Funtion to fill datagridview /// </summary> public void GridFill() { try { BatchSP spBatch = new BatchSP(); DataTable dtblBatch = new DataTable(); dtblBatch = spBatch.BatchSearch(txtBatch.Text.Trim(), cmbProductName.Text); dgvBatch.DataSource = dtblBatch; } catch (Exception ex) { MessageBox.Show("B7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }