Performing Arithmetic on DataTable Columns

  • Thread starter Thread starter George Durzi
  • Start date Start date
Nevermind, I discovered the Compute method.

float flMax =
(float)m_dsSegments.Tables["Calculations"].Compute("Max(Score)",
string.Empty);
 
If your contents are bound to a dataset why don't you just use the dataset
ds.Tables[0].Compute("Max(["+strColumnName+"])",String.Empty)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top