summary - devexpress grid control custom sum on specified columns -


I am trying to sum some column values ​​through cell selection (3 columns are affected). . It works, but trees sum values ​​are always the same for all three columns

I'm trying this:

  private sub gvIktato_CustomSummaryCalculate (ByVal this object as a result, Gavai e DevExpress.Data.CustomSummaryEventArgs) handles gvIktato.CustomSummaryCleculate Dim GridView as View = CType (sender, Gridwu) if e. Sumiri Process = Custom Sumini Process See if again. Aiselsels (e. Rohandl, gvIktato.Columns ( "NETTO")) then e.TotalValue = Convert.ToDecimal (e.TotalValue) + Convert.ToDecimal (View.GetRowCellValue (e.RowHandle, "NETTO")) if View. IsCellSelected (e.RowHandle, gvIktato.Columns ( "brutto")) then e.TotalValue = Convert.ToDecimal (e.TotalValue) + Convert.ToDecimal (View.GetRowCellValue (e.RowHandle, "brutto")) if View.IsCellSelected (e.RowHandle, gvIktato.Columns ( "SKONTO_OSSZEG")), followed by e Kulwu = convert. ToDecimal (e. Kulwu) + convert. ToDecimal (see. GETRowCellValue (e.RowHandle, "SKONTO_OSSZEG")) end If end sub < / Code> 

I should rewrite the code, then I get the correct sum value for each column ?

I know, I should differentiate between columns,

thanks

You need to use the property.
Here is an example:

  private sub gvIktato_CustomSummaryCalculate (ByVal) gvIktato as this object, ByVal e DevExpress.Data.CustomSummaryEventArgs as .CustomSummaryCalculate dim before handling GridSummaryItem = TryCast (e.Item, GridSummaryItem) item Exit sub end if something is not also choose seriously GridView = CTYPE (this, GridView) dim FIELDNAME string = item.FieldName from in episode FIELDNAME episode "NETTO" as "Brutto", "SKONTO_OSSZEG" If e.SummaryProcess = CustomSummaryProcess.Calculate then View.IsCellSelected (e.RowHandle, V iew.Columns (FIELDNAME)), followed by e Expand = Convert. ToDecimal (e. Kulwu) + convert. ToDecimal (e.FieldValue) and and and and and and and stitched and end  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -