DataGrid.Binding()

Tech-Archive recommends: Fix windows errors by optimizing your registry

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


Date: Sun, 25 Jul 2004 19:25:36 -0700

Hi,

If anybody needs to show some data retrieved from the database table, what
method is more preferrable?

1. DataSet ds = ...;
    DataGrid.Data.Source.ds;
    DataGrid.Bind();

2. Write a custom object, fill it with the DataSet data and ÅÒÕÔ try to bind
the DataGrid or DataTable and this custom object?

I usually don't allow users to change anything irectly in the DataGrid, but
I allow to select a row and then show a set of TextBoxes, DropDown lists
etc. to correct/enter data. Is it a good approach or it's better to allow
userworking with the DataGrid directly and then Update this DataSet or
whatever?

Thanks,
Dmitri



Relevant Pages

  • update with textboxes
    ... I trying to do an aplicattion where it shows the data from a sql server ... database and you can save the changes. ... When I use a datagrid I haven´t any ... I use the DataBindings of the textboxes to link with the dataSet. ...
    (microsoft.public.dotnet.languages.csharp)
  • :cry: Saving datatables into database
    ... the user will be able to type in texts in all ... textboxes. ... type will be shown in the datagrid. ... All the while the datagrid is disconnected to the database its ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How to save textbox.text to the dataset when its bound to datagri
    ... My understanding is that if you change the text in a bound text box and then move the input focus elsewhere, the change must be automatically propagated to the underlying data source. ... The textboxes are bind to the same dataset table as the datagrid ... I want to save the changes that user make in the textboxes when they select ... to the dataset and update to the database is not working. ...
    (microsoft.public.dotnet.languages.csharp)
  • 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: Propagating Datagrid Changes to a Database
    ... > and Data Access Layer) defining a data layer ... > from a database and to update a modified Sector table. ... After updating the dataset through the datagrid, ... a couple of textboxes and a few buttons to effect actions. ...
    (microsoft.public.dotnet.framework.adonet)