Re: DataGrid.Binding()

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

From: Just D (no_at_spam.please)
Date: 07/26/04


Date: Sun, 25 Jul 2004 20:30:02 -0700

Hi Jeffry,

> Also, in question number 2, you are confusing a web control with an
> ADO.NET
> object. You cannot bind a DataTable with a custom object. A DataTable is
> a
> container object commonly used within a DataSet. A Datagrid can be bound
> TO
> a DataTable or other custom object or simply an array. Check out the SDK
> documentation on databinding.

You know, maybe the second part of the question was not correct. Thanks that
you corrected me.

What about the first question? If you receive data from a few database
tables using subqueries, JOIN, many other tricks, then do you parse this
information to your custom objects loading the whole data into your own
object and then deleting the original DataSet? Ok, I can imagine that, but
if you need to save the changes, made by user, then you need to compare what
has been changes, so you need flags in every sub object to detect if this
data is dirty and finally write this data? What do you think if you use a
database view to retrieve this complex data instead and save data back to
this view? In this case you could use the same DataSet to show and save a
changed data and use DataAdapter.Update() any headache. Is it good or bad?
Or I don't see something obvious? Maybe the custom objects are always
better?

Thanks,
Dmitri



Relevant Pages

  • Re: DataGrid.Binding()
    ... dataset to automate your updates back to the database, ... You cannot bind a DataTable with a custom object. ... > What about the first question? ... If you receive data from a few database ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Ado takes quite a lot of memory!
    ... >> Maybe Kuzkot needs a custom object instead of a database ... Regards, JohnH ...
    (borland.public.delphi.database.ado)
  • Re: DataGrid.Binding()
    ... strings to which to bind. ... Bindable controls can bind to any object that has ... You cannot bind a DataTable with a custom object. ... A Datagrid can be bound TO ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Binding custom data object to checkbox list?
    ... would declaratively bind that collection in the CheckBoxList tag above? ... anyway if the custom object has a property has a collection of boolean then ... like to show a checkboxlist within my formview to represent them. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Binding custom data object to checkbox list?
    ... would declaratively bind that collection in the CheckBoxList tag above? ... anyway if the custom object has a property has a collection of boolean then ... like to show a checkboxlist within my formview to represent them. ...
    (microsoft.public.dotnet.framework.aspnet)