Re: Calculated Fields in Strongly Typed DataSets?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Though there is calculated field support built in DataTable (through
DataColumn.Expression) I would recommend to:
- add necessary column(s) do DataTable
- handle updating yourself (using RowChanged/ColumnChanged) events

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Tore" <tbostrup at agfirst> wrote in message
news:OfUaSBkFGHA.3036@xxxxxxxxxxxxxxxxxxxxxxx
> We have an XSD schema/object graph that for the most part reflects our
> database. I'm running into an issue where this granularity doesn't always
> match the need for using data from multiple datatables. For example, I
> have
> a master datatable with several detail datatables, and I would like to
> create (declare if I can) a "composite" containing column values from the
> master, as well as columns from other datatables along with aggregate
> values
> of data in yet other datatables.
>
> In reality, this resulting data will be displayed in a grid (one column
> will
> be updatable) and consurrently bound to other controls.
>
> If I was writing stored procedures and handcoding every operation, this
> would be quite straight forward, but I am trying to work with the object
> graph/schema approach.
>
> Is there a way to do this in the schema itself?
>
> What would be the best way to achieve this? Would I need to create
> derived
> DataViews and programmatically add expression columns? And would I have
> to
> implement the "external" accesses in event handlers?
>
> TIA,
> Tore.
>
>


.



Relevant Pages

  • Re: Possible reasons application is locking up?
    ... That would be the asynchronous methods - the kind which doing something you ... Ilya ... I am in fact sometimes updating ... datatables other than the immediatly bound datatable. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Binding a grid to master/detail related datatables
    ... then I will have to program the updating manually ... The above SQL Query should give you the data you need. ... Say I have three datatables that are linked ... parent table again for each row. ...
    (microsoft.public.dotnet.general)
  • Re: dataset and locks
    ... > I have three datatables, which are related as described below. ... > not put any constraints on the table, the are never written to a ... > datbase, the problem I am having is updating them programaticcally, ... and I seem to be running into a deadlock ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: DataAdapter Update
    ... Can you use the Update Method of a DataAdpter to refresh a DataSet's ... > DataTable or is it solely used for updating the DataBase Table using a ... It is to update the database using a datatable or a datatable inside a ... datatables and relations between them. ...
    (microsoft.public.dotnet.languages.vb)