A better solution is to create a DataGridTableStyle for your table and only
add the columns that you desire to the DataGridTableStyle. This allows you
to have any number of rows in your datatable that are not actually
displayed in the DataGrid.
David Wrighton
.NET Compact Framework
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Mikael" <
[email protected]>
| Sender: "Mikael" <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| Subject: Re: Datagrid
| Date: Mon, 15 Sep 2003 14:17:29 -0700
| Lines: 30
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcN7zsTqggyZZkTxT9uvOCFibKVP7A==
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:33407
| NNTP-Posting-Host: tk2msftngxa09.phx.gbl 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Alex,
|
| Why not set the column with to "-1" to remove the vertical
| grid lines of the removed columns?
|
| Regards,
| Mikael
|
| >-----Original Message-----
| >Either set the particular column width to 0, or better
| yet cast
| >dataGrid.DataSource to DataView and use:
| >DataRow row = (dataGrid.DataSource as DataView)
| [dataGrid.CurrentRow].Row;
| >This will give you direct access to the data table rows.
| >
| >| >> Is there any way for me to fill a row in the datagrid,
| >> from a database, and hide a column? I want to be able
| to
| >> retrieve the key for the row without displaying it but
| be
| >> able to access it when selected so that I can access
| that
| >> key in the database (using SQLCE).
| >
| >
| >.
| >
|