|
 |
ado_dotnet thread: datagrid using in ado.net
Message #1 by "Peter Gesswagner" <peter.gesswagner@l...> on Tue, 18 Feb 2003 17:03:47 +0100 (Westeuropäische Normalzeit)
|
|
--------------Boundary-00=_BYHI6RO0000000000000
Content-Type: Text/Plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
=0D
=0D
Hi=0D
=0D
I'm a beginner in .NET=0D
I've some troubles using the datagrid. The datagrid is bound to an
SQL-Database and everything works well. All columns where shown and I can
navigate through the grid. But... there is one thing I'm very confusing.
I
cannot define the width of the columns in the datagrid. =0D
F.i. the first column should be 1cm, the second 3cm and the third 5cm. I
cannot manage this. My grid has 3 columns with each the same default
columnwidth.=0D
=0D
Looking ASP.NET I found a wizzard defining the various columns. But in AD
O
NET I didn't find anything like this.=0D
=0D
Perhaps you can help me and answer my question:=0D
=0D
HOW CAN I DEFINE THE COLUMNWIDTH - EACH COLUMN A DIFFERENT ONE - IN A
DATAGRID IN ADO.NET?=0D
=0D
many thanks in advance=0D
=0D
=0D
=2E
Message #2 by "Brian Smith" <bsmith@l...> on Tue, 18 Feb 2003 17:04:25 -0000
|
|
In the designer, look at the TableStyles property of the DataGrid. Each
TableStyle (for a different Table) contains a collection of ColumnStyles
wherein you define width, format etc. The designer will build the code
for you.
brian
-----Original Message-----
From: Peter Gesswagner [mailto:peter.gesswagner@l...]
Sent: Tue, 18 Feb 2003 16:04
To: ADO.NET
Subject: [ado_dotnet] datagrid using in ado.net
Hi
I'm a beginner in .NET
I've some troubles using the datagrid. The datagrid is bound to an
SQL-Database and everything works well. All columns where shown and I
can navigate through the grid. But... there is one thing I'm very
confusing. I cannot define the width of the columns in the datagrid.
F.i. the first column should be 1cm, the second 3cm and the third 5cm. I
cannot manage this. My grid has 3 columns with each the same default
columnwidth.
Looking ASP.NET I found a wizzard defining the various columns. But in
ADO.NET I didn't find anything like this.
Perhaps you can help me and answer my question:
HOW CAN I DEFINE THE COLUMNWIDTH - EACH COLUMN A DIFFERENT ONE - IN A
DATAGRID IN ADO.NET?
many thanks in advance
.
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
Message #3 by "Ludington, Kruse" <kruse.ludington@c...> on Tue, 18 Feb 2003 18:48:50 -0000
|
|
Look at the DataGridColumnStyle class, and the below web site for more help...
Once you have the code working, then replace the design-time sdettings with calls to functions that set these properties, and call
these functions in your constructor. Then you could call these functions at runtime, thereby making your grid much more flexible.
The best resource I have found as examples for this is the Datagrid FAQ web site under syncfusion.com. They also have examples there
of how to disallow column width resizing by the end user, how to show comboboxes or bitmaps in grid cells, how to select an entire
row when you click on a cell, etc. (none of which is supported by the plain msft datagrid out of the box), etc...
- Kruse
-----Original Message-----
From: Brian Smith <bsmith@l...>
To: ADO.NET <ado_dotnet@p...>
Sent: Tue Feb 18 12:04:25 2003
Subject: [ado_dotnet] RE: datagrid using in ado.net
In the designer, look at the TableStyles property of the DataGrid. Each
TableStyle (for a different Table) contains a collection of ColumnStyles
wherein you define width, format etc. The designer will build the code
for you.
brian
-----Original Message-----
From: Peter Gesswagner [mailto:peter.gesswagner@l...]
Sent: Tue, 18 Feb 2003 16:04
To: ADO.NET
Subject: [ado_dotnet] datagrid using in ado.net
Hi
I'm a beginner in .NET
I've some troubles using the datagrid. The datagrid is bound to an
SQL-Database and everything works well. All columns where shown and I
can navigate through the grid. But... there is one thing I'm very
confusing. I cannot define the width of the columns in the datagrid.
F.i. the first column should be 1cm, the second 3cm and the third 5cm. I
cannot manage this. My grid has 3 columns with each the same default
columnwidth.
Looking ASP.NET I found a wizzard defining the various columns. But in
ADO.NET I didn't find anything like this.
Perhaps you can help me and answer my question:
HOW CAN I DEFINE THE COLUMNWIDTH - EACH COLUMN A DIFFERENT ONE - IN A
DATAGRID IN ADO.NET?
many thanks in advance
.
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
===
Fast Track ADO.NET with C# is a concise introduction to the concepts, techniques, and libraries that you will need in order to start
using ADO.NET in your applications. The book covers DataSets and Typed DataSets, accessing data using DataReaders and DataAdaptors,
the close relationship between ADO.NET and XML, how and where to use ADO.NET in your enterprise applications, and how to use Web
Services and ADO.NET to easily pass data between applications.
http://www.wrox.com/books/1861007604.htm
This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information.
No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately
delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or
indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. CREDIT SUISSE
GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE
FIRST BOSTON reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are
those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views
of any such entity.
Unless otherwise stated, any pricing information given in this message is indicative only, is subject to change and does not
constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.
Message #4 by "Ludington, Kruse" <kruse.ludington@c...> on Tue, 18 Feb 2003 19:15:31 -0000
|
|
GridColumnStyle has the properties you need to update, DataGridTableStyle contains a GridColumnStyle
for each column, DatagridTableStyle is the assigned to your datagrid. Hope this helps.
- Kruse
-----Original Message-----
From: Ludington, Kruse <kruse.ludington@c...>
To: 'ado_dotnet@p...' <ado_dotnet@p...>
Sent: Tue Feb 18 13:48:50 2003
Subject: Re: [ado_dotnet] RE: datagrid using in ado.net
Look at the DataGridColumnStyle class, and the below web site for more help...
Once you have the code working, then replace the design-time sdettings with calls to functions that set these properties, and call
these functions in your constructor. Then you could call these functions at runtime, thereby making your grid much more flexible.
The best resource I have found as examples for this is the Datagrid FAQ web site under syncfusion.com. They also have examples there
of how to disallow column width resizing by the end user, how to show comboboxes or bitmaps in grid cells, how to select an entire
row when you click on a cell, etc. (none of which is supported by the plain msft datagrid out of the box), etc...
- Kruse
-----Original Message-----
From: Brian Smith <bsmith@l...>
To: ADO.NET <ado_dotnet@p...>
Sent: Tue Feb 18 12:04:25 2003
Subject: [ado_dotnet] RE: datagrid using in ado.net
In the designer, look at the TableStyles property of the DataGrid. Each
TableStyle (for a different Table) contains a collection of ColumnStyles
wherein you define width, format etc. The designer will build the code
for you.
brian
-----Original Message-----
From: Peter Gesswagner [mailto:peter.gesswagner@l...]
Sent: Tue, 18 Feb 2003 16:04
To: ADO.NET
Subject: [ado_dotnet] datagrid using in ado.net
Hi
I'm a beginner in .NET
I've some troubles using the datagrid. The datagrid is bound to an
SQL-Database and everything works well. All columns where shown and I
can navigate through the grid. But... there is one thing I'm very
confusing. I cannot define the width of the columns in the datagrid.
F.i. the first column should be 1cm, the second 3cm and the third 5cm. I
cannot manage this. My grid has 3 columns with each the same default
columnwidth.
Looking ASP.NET I found a wizzard defining the various columns. But in
ADO.NET I didn't find anything like this.
Perhaps you can help me and answer my question:
HOW CAN I DEFINE THE COLUMNWIDTH - EACH COLUMN A DIFFERENT ONE - IN A
DATAGRID IN ADO.NET?
many thanks in advance
.
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
===
Fast Track ADO.NET with C# is a concise introduction to the concepts, techniques, and libraries that you will need in order to start
using ADO.NET in your applications. The book covers DataSets and Typed DataSets, accessing data using DataReaders and DataAdaptors,
the close relationship between ADO.NET and XML, how and where to use ADO.NET in your enterprise applications, and how to use Web
Services and ADO.NET to easily pass data between applications.
http://www.wrox.com/books/1861007604.htm
This message is for the named person's use only. It may contain sensitive and private proprietary or legally privileged information.
No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, please immediately
delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or
indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. CREDIT SUISSE
GROUP and each legal entity in the CREDIT SUISSE FIRST BOSTON or CREDIT SUISSE ASSET MANAGEMENT business units of CREDIT SUISSE
FIRST BOSTON reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are
those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views
of any such entity.
Unless otherwise stated, any pricing information given in this message is indicative only, is subject to change and does not
constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.
|
|
 |