private void InsertRowNew() { int index = tabControl1.SelectedIndex; GridDataBoundGrid dbg = tabControl1.SelectedTab.Controls.OfType <GridDataBoundGrid>().First(); ds.Tables[index.ToString()].Rows.Add(""); dbg.Refresh(); }
private void InsertRowAfter() { int tabCIndex = tabControl1.SelectedIndex; GridDataBoundGrid dbg = tabControl1.SelectedTab.Controls.OfType <GridDataBoundGrid>().First(); DataRow dr; dr = ds.Tables[tabCIndex.ToString()].NewRow(); int index = dbg.CurrentCell.RowIndex; ds.Tables[tabCIndex.ToString()].Rows.InsertAt(dr, index); dbg.Refresh(); }
private void HandleFilter(string filterState, string queryState, string queryString) { if (filterState == "Row") { if (queryState == "Like") { GridDataBoundGrid dbg = tabControl1.SelectedTab.Controls.OfType <GridDataBoundGrid>().First(); DataView dv = ((DataTable)dbg.DataSource).DefaultView; dv.RowFilter = queryString; dbg.Refresh(); } } }