This is what I need to do...

C

coleenholley

Here is the format of the datagrid/table I need to create. Since the static data is not the same for each row, I'm at a loss as to how to populate that column...?

Static Data Dynamic Read Only Dynamic Read Only Calculated Field
Each 1234 5678 6912
Item in 5678 9101 14779
This 9101 1234 10335
Column 1234 5678 6912
is different 5678 9101 14779

Totals across 22925 30792 53717

Any suggestions, samples in VB would be appreciated. I know how to get the Bound columns for the dynamic data to be read only, but I can't find samples in VB on how to do the calculated field column or the Footer totals...I've found lots in C#, but I need VB....TIA

Coleen
 
K

Ken Tucker [MVP]

Hi,

Quick example on how to add a calculated column to a dataset.

Dim dc As DataColumn

dc = New DataColumn("Price")

dc.DataType = System.Type.GetType("System.Decimal")

dc.Expression = "Quantity * Each"

dsInvoicesData.Tables(0).Columns.Add(dc)

dc = Nothing



Ken
 

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

Top