Exemple #1
0
 private void radVirtualGrid1_CellValuePushed(object sender, VirtualGridCellValuePushedEventArgs e)
 {
     try
     {
         this.nwindDataSet.Products.Rows[e.RowIndex][this.fields[e.ColumnIndex]] = e.Value;
     }
     catch (Exception)
     {
         //Indicate error
     }
 }
Exemple #2
0
        private void RvgCustomers_CellValuePushed(object sender, VirtualGridCellValuePushedEventArgs e)
        {
            switch (e.ColumnIndex)
            {
            case 0:
                ((List <Customer>)CustomerViewModel.GetAllEntities())[e.RowIndex].CustomerId = Convert.ToInt64(e.Value.ToString());
                break;

            case 1:
                ((List <Customer>)CustomerViewModel.GetAllEntities())[e.RowIndex].FirstName = e.Value.ToString();
                break;

            case 2:
                ((List <Customer>)CustomerViewModel.GetAllEntities())[e.RowIndex].LastName = e.Value.ToString();
                break;

            case 3:
                ((List <Customer>)CustomerViewModel.GetAllEntities())[e.RowIndex].PhoneNumber = e.Value.ToString();
                break;

            case 4:
                ((List <Customer>)CustomerViewModel.GetAllEntities())[e.RowIndex].Email = e.Value.ToString();
                break;

            case 5:
                ((List <Customer>)CustomerViewModel.GetAllEntities())[e.RowIndex].Address = e.Value.ToString();
                break;

            case 6:
                ((List <Customer>)CustomerViewModel.GetAllEntities())[e.RowIndex].IsActive = Convert.ToByte(e.Value.ToString());
                break;

            default:
                break;
            }
        }