Hello
I've few questions regarding ADO & C#:
1) Is it possible to view tata from multiple tables in the Datagrid control
? Most of the examples I see are only for 1 table.
2) In Comboboxes, can we display multiple fields ? For example in a Form of
customers, we have a combo box to select the customer you want to change, so
in that combo box, when they drop down, can we have it to display "First
Name, Last Name, Customer ID, Customer type" but its databound field is
"Customer ID". I used to be able to do that in Access, C# is supposed to be
powerful but how do I do it ?
3) If you copy an access database into MSDE or SQL and it has autogenerate
fields, both in SQL & Access, how do we addresss that efficiently ?
Any insight into the above questions would be helpful & very appreciated.
Thank You 2 1199
You can view data from multiple tables in a datagrid. One way is to add a
new table to the dataset you are using that contains the columns you need.
Then fill the new table manually. If you need full functionality in the
datagrid (not only view but edit/update/delete) then you can define a custom
dataadapter.
In a similar fashion you can build a synthetic table with a select that
combines the first and last name and bind that table to the combo box.
I am not sure what your sql/access question. There are many issues with
identitiy fields and datasets; if you are copying data you sometimes need to
turn the identity field off in the sql table during the copy.
Hope this helps
"Hemang Shah" wrote: Hello
I've few questions regarding ADO & C#:
1) Is it possible to view tata from multiple tables in the Datagrid control ? Most of the examples I see are only for 1 table.
2) In Comboboxes, can we display multiple fields ? For example in a Form of customers, we have a combo box to select the customer you want to change, so in that combo box, when they drop down, can we have it to display "First Name, Last Name, Customer ID, Customer type" but its databound field is "Customer ID". I used to be able to do that in Access, C# is supposed to be powerful but how do I do it ?
3) If you copy an access database into MSDE or SQL and it has autogenerate fields, both in SQL & Access, how do we addresss that efficiently ?
Any insight into the above questions would be helpful & very appreciated.
Thank You
Thank You Bob
are there any demo samples which I can look at, to understand this better ?
Thank You
"Bob1739" <Bo*****@discussions.microsoft.com> wrote in message
news:23**********************************@microsof t.com... You can view data from multiple tables in a datagrid. One way is to add a new table to the dataset you are using that contains the columns you need. Then fill the new table manually. If you need full functionality in the datagrid (not only view but edit/update/delete) then you can define a custom dataadapter.
In a similar fashion you can build a synthetic table with a select that combines the first and last name and bind that table to the combo box.
I am not sure what your sql/access question. There are many issues with identitiy fields and datasets; if you are copying data you sometimes need to turn the identity field off in the sql table during the copy.
Hope this helps "Hemang Shah" wrote:
Hello
I've few questions regarding ADO & C#:
1) Is it possible to view tata from multiple tables in the Datagrid control ? Most of the examples I see are only for 1 table.
2) In Comboboxes, can we display multiple fields ? For example in a Form of customers, we have a combo box to select the customer you want to change, so in that combo box, when they drop down, can we have it to display "First Name, Last Name, Customer ID, Customer type" but its databound field is "Customer ID". I used to be able to do that in Access, C# is supposed to be powerful but how do I do it ?
3) If you copy an access database into MSDE or SQL and it has autogenerate fields, both in SQL & Access, how do we addresss that efficiently ?
Any insight into the above questions would be helpful & very appreciated.
Thank You This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kevin |
last post by:
Hi Al
When I have a text box, list box, and a datagrid, how does a CurrencyManager relate to all these controls(seeing as though the datagrid uses Complex binding and textbox and list box use...
|
by: jason |
last post by:
Hello everyone,
I have some general questions about the DataTable object, and how it
works. Moderately new to C#, I have plenty of texts describing the
language, but not so much to reference...
|
by: ASP Yaboh |
last post by:
1. If I use an ArrayList as my data source, how do I construct the accessor
methods? That is, forget about properties for a moment, if I wanted the 5th
item in the ArrayList, I would write the...
|
by: Kevin Swanson |
last post by:
I'm writing what should be a very simple app against an Oracle database. The
app has a number of user controls, any one of which is loaded into a main
display page using the loadControl method,...
|
by: Noor |
last post by:
Hi everyone.
Im kinda newbie to .net programming and very confused after seeing too many
options for building database applicaton.
I have few question for you people and want answers to them....
|
by: Dave McKie |
last post by:
Hi all,
I'm somewhat new the DotNet platform....I've used VB6 as well as VBA.
I have a couple of basic questions:
What are the majority of programmers using?
Data components such as...
|
by: J055 |
last post by:
Hi
I have a Business class called User which returns a DataRow for individual
user accounts using accountID as a parameter (i.e.
User.Retrieve(accountID)). The ObjectDataSource doesn't complain...
|
by: Dirk |
last post by:
Hello,
I have a problem to use databinding with my business layer classes. My
data class does not have simple properties (string, int or datetime),
instead, all my properties are objects of the...
|
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= |
last post by:
Hello to all,
I want to know if DataBinding in asp.net 2,0 is better than to fill up the
values of the controls of the following form:
this.miControlTextBox.Text = valorParaControlTextbox;
...
|
by: Mark B |
last post by:
I have a Datagrid working fine, outputting:
Group
Most Popular Product Code
--------
-------------------------------
Earth.New Zealand
32
Earth.New Zealand
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |