Google Skupine ne podpirajo več novih objav ali naročnin v storitvi Usenet. Zgodovinsko vsebino si je še vedno mogoče ogledati.
Dismiss

hiding default datagrid column that shows record at

1 ogled
Preskoči na prvo neprebrano sporočilo

VM

neprebran,
4. avg. 2003, 17:17:314. 8. 03
do
How can I eliminate or hide the first column in a datagrid? This is the
column that doesn't have any data; it just points to the record the user's
in (the column with the horizontal arrow).
Thanks,
VM


codewriter

neprebran,
4. avg. 2003, 20:37:164. 8. 03
do
You can use styles for DataGrid:
DataGridTableStyle oStyle = new DataGridTableStyle();
DataGridTextBoxColumn oColumn = new DataGridTextBoxColumn();
oColumn.Width = 0;
oStyle.GridColumnStyles.Add(oColumn);
this.dataGrid1.TableStyles.Add(oStyle);


"VM" <None> wrote in message news:O2YCRXsW...@TK2MSFTNGP10.phx.gbl...

Lewis Wang [MSFT]

neprebran,
5. avg. 2003, 09:02:075. 8. 03
do
Hi ,

You can do this in the datagrid Property Builder(in VS.NET IDE):

1. Right click on the datagrid, select Property Builder.

2. Choose the Columns tab, set "Create columns automatically at run time"
to false. Add several columns you want to show in the datagrid. Fill the
Data Fied Textbox with a field name in the datatable which is bound to the
datagrid.

Does this answer your question? Please let me know if you need more
information

Best Regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "VM" <None>
| Subject: hiding default datagrid column that shows record at
| Date: Mon, 4 Aug 2003 16:17:31 -0500
| Lines: 7
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <O2YCRXsW...@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: 136.145.40.130
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:174094
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

VM

neprebran,
6. avg. 2003, 00:11:386. 8. 03
do
Thanks for the info but that's not the column I'm talking about. If you go
to this MSDN page
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html
/vbconintroductiontothedatagridcontrol.asp ) and look at the image of the
datagrid, you'll see that the first 'column' has the arrow and the asterisk
(*) but no data. How can I hide this column?
VM

"VM" <None> wrote in message news:O2YCRXsW...@TK2MSFTNGP10.phx.gbl...

Lewis Wang [MSFT]

neprebran,
6. avg. 2003, 09:20:296. 8. 03
do
Hi,

If you want to hide the first column which don't show data in WinForm's
datagrid control, then we just need to set dataGrid.RowHeadersVisible
=false;

Does this answer your question? Please let me know if you need more
information

Best regards,
Lewis

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "VM" <None>
| References: <O2YCRXsW...@TK2MSFTNGP10.phx.gbl>
| Subject: Re: hiding default datagrid column that shows record at
| Date: Tue, 5 Aug 2003 23:11:38 -0500
| Lines: 18


| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

| Message-ID: <uEmIXj8W...@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: cvx-ppp-66-50-133-25.coqui.net 66.50.133.25
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:174479
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

0 novih sporočil