or
| try |
| { |
| this.Cursor = Cursors.WaitCursor; |
| grdSearchResults.SuspendUpdate(); |
| //remove all filters |
| foreach (GridViewDataColumn dc in grdSearchResults.MasterGridViewTemplate.Columns) |
| dc.Filter.StringValue = string.Empty; |
| //add new pax to current manifest |
| for (int i = 0; i < nb; i++) |
| paxList.AddNew(); |
| UpdateScreenState(); |
| grdSearchResults.Rows[paxList.Count - nb].IsCurrent = true; |
| grdSearchResults.Columns[0].IsCurrent = true; |
| grdSearchResults.GridElement.ScrollToRow(0); |
| if (grdSearchResults.CurrentCell != null) |
| ((GridDataCellElement)grdSearchResults.CurrentCell).BeginEdit(); |
| } |
| catch (Exception exc) |
| { |
| ExceptionPolicy.HandleException(exc, "Client Policy"); |
| } |
| finally |
| { |
| this.Cursor = Cursors.Default; |
| grdSearchResults.ResumeUpdate(); |
| } |
grdSearchResults.GridElement.BeginUpdate();
instead of SuspendUpdate but the grid throws an argument out of range exception stating that Value is out of range???






public void FillDropDownList(string connString) { String Query = "SELECT * FROM information_schema.tables where Table_Name like 'Table%'"; using (var cn = new SqlConnection(connString)) { cn.Open(); DataTable dt = new DataTable(); try { SqlCommand cmd = new SqlCommand(Query, cn); SqlDataReader myReader = cmd.ExecuteReader(); dt.Load(myReader); } catch (SqlException e) { //TODO } radDropDownList1.DataSource = dt; radDropDownList1.ValueMember = "TABLE_NAME"; radDropDownList1.DisplayMember = "TABLE_NAME"; } }radDropDownList1.Items.Add("Select a table...");radDropDownList1.SelectedIndex = 0;
private void radTextBox1_TextChanged(object sender, EventArgs e) { radGridView1.MasterTemplate.PageSize = Int32.Parse(radTextBox1.Text); }if (radTextBox1.Text != "") { radGridView1.MasterTemplate.PageSize = Int32.Parse(radTextBox1.Text); }