By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,187 Members | 1,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,187 IT Pros & Developers. It's quick & easy.

Bound DataGrid with new custom columns

P: n/a
I have a VB.NET Windows application with bound DataGrid control with it’s
DataSource property set to a DataSet object. The DataSet object is created
from an XML Schema. I would like to define some new columns in the DataGrid
that are not yet in the DataSet object that are populated based on a given
critera and values in the existing DataSet object.

I added the new columns to the XML Schema and created a DataGridTableStyle
that contains DataGridTextBoxColumn objects to hide some columns of the grid.

First question: Do all DataGridTextBoxColumn objects must have it's Mapping
property set, thereby, forcing me to add the new columns also to the DataSet?

Second Question: Is there an event or a delegate that can be defined that is
trapped for each row or column instance of the DataSet when it is in the
process of being filled? Or is there another way I can trap each column as it
is being filled?

Is this the best way to do what I am trying to do?

--
Greg
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Greg,

You can forever use add a column to a datatable (a dataset is only a
collection of datatables and has no columns).

Here a very simple sample on our site how you can add a column and direct
use an expression. (This is a very simple one, you can of course use as well
styles)

http://www.windowsformsdatagridhelp....3-a3539697edbd

I hope this helps,

Cor
Nov 21 '05 #2

P: n/a
It did not help me. What if the formula in the example is a complex formula
that must be processed in the application? Such as looking up values based on
a given critera?
--
Greg
"Cor Ligthert [MVP]" wrote:
Greg,

You can forever use add a column to a datatable (a dataset is only a
collection of datatables and has no columns).

Here a very simple sample on our site how you can add a column and direct
use an expression. (This is a very simple one, you can of course use as well
styles)

http://www.windowsformsdatagridhelp....3-a3539697edbd

I hope this helps,

Cor

Nov 21 '05 #3

P: n/a
Greg,
It did not help me. What if the formula in the example is a complex
formula
that must be processed in the application? Such as looking up values based
on
a given critera?
--

You can forever set values in a column using a loop. (for each or for index)

I hoop this helps,

Cor
Nov 21 '05 #4

P: n/a
Thucks
--
Greg
"Cor Ligthert [MVP]" wrote:
Greg,
It did not help me. What if the formula in the example is a complex
formula
that must be processed in the application? Such as looking up values based
on
a given critera?
--

You can forever set values in a column using a loop. (for each or for index)

I hoop this helps,

Cor

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.