Exemplo n.º 1
0
        private void InsertRowNew()
        {
            int index = tabControl1.SelectedIndex;

            GridDataBoundGrid dbg = tabControl1.SelectedTab.Controls.OfType <GridDataBoundGrid>().First();

            ds.Tables[index.ToString()].Rows.Add("");
            dbg.Refresh();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
 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();
         }
     }
 }