Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

smithjdst

@smithjdst
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MDI Application ...........
    S smithjdst

    based on what I see it must be that you activeForm has not be initialized and is null. Without more code can't be certain.

    C# help

  • DataGridView Calculated Column update when move to new row C#
    S smithjdst

    after looking a little more, it may be better to use the cellvaluechanged event... sample (note this was tested only in C# win32.forms, and the column ValueTypes are strings):

    private void dataGrid_CellValueChanged(object sender, DataGridViewCellEventArgs e) {
    /*check Changing cell is "not" in the "Total" Column,
    *would keep calling cell changed event, when the "Total" cell value changes*/
    if ((e.RowIndex >= 0) && e.ColumnIndex != DataGrid.Columns["Total"].Index) {
    //r = row of the changed Cell.
    int r = e.RowIndex;

          //get values from cells in the same row
          int Qty = 0;
          int.TryParse((string)DataGrid\["Quantity", r\].Value, out Qty);
    
          double Price = 0D;
          double.TryParse((string)DataGrid\["UnitPrice", r\].Value, out Price);
    
          //Calculate Total, Change cell value in "Total"
          DataGrid\["Total", r\].Value = Price \* Qty;
     }
    

    }

    C# csharp database sql-server visual-studio sysadmin

  • DataGridView Calculated Column update when move to new row C#
    S smithjdst

    Have you tried to update the values in the CellLeave event for your datagrid.

    C# csharp database sql-server visual-studio sysadmin
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups