PC Review


Reply
Thread Tools Rate Thread

Create column in a Datagrid

 
 
ruca
Guest
Posts: n/a
 
      11th May 2004
Hi,
I have two different questions to ask:

QUESTION 1:
Can I create dinamically a column in a datagrid? How?
I have a datagrid that must have 5 columns, but in some very special cases I
have to add another column. How can I do this in code?


QUESTION 2:
When I Debug my Web application, the debug is very slow. Changes line (step
by step) is slow.
Can I fix in anyway this problem?
I already try to see if any process is running, but I can't find anything
special.
Suggestions are welcome.


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca


 
Reply With Quote
 
 
 
 
ruca
Guest
Posts: n/a
 
      11th May 2004
QUESTION 1:
I alredy get the solution. Here it is:
Dim col As New BoundColumn
col.HeaderText = [Header Label]
col.DataField = [FieldName]
col.Visible = True
col.ReadOnly = True
[datagrid name].Columns.Add(col)


QUESTION 2:
Waiting for your help



--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"ruca" <(E-Mail Removed)> escreveu na mensagem
news:(E-Mail Removed)...
> Hi,
> I have two different questions to ask:
>
> QUESTION 1:
> Can I create dinamically a column in a datagrid? How?
> I have a datagrid that must have 5 columns, but in some very special cases

I
> have to add another column. How can I do this in code?
>
>
> QUESTION 2:
> When I Debug my Web application, the debug is very slow. Changes line

(step
> by step) is slow.
> Can I fix in anyway this problem?
> I already try to see if any process is running, but I can't find anything
> special.
> Suggestions are welcome.
>
>
> --
> Programming ASP.NET with VB.NET
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      11th May 2004
QUESTION 1:
Look at the help for DataGrid.Columns property and the example in the help
for DataGridColumnCollection.
A note from the help:
Although you can programmatically add columns to the Columns collection,
it is easier to list the columns statically and then use the Visible
property to show or hide the column.
Eliyahu

"ruca" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> I have two different questions to ask:
>
> QUESTION 1:
> Can I create dinamically a column in a datagrid? How?
> I have a datagrid that must have 5 columns, but in some very special cases

I
> have to add another column. How can I do this in code?
>
>
> QUESTION 2:
> When I Debug my Web application, the debug is very slow. Changes line

(step
> by step) is slow.
> Can I fix in anyway this problem?
> I already try to see if any process is running, but I can't find anything
> special.
> Suggestions are welcome.
>
>
> --
> Programming ASP.NET with VB.NET
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
>
>



 
Reply With Quote
 
ruca
Guest
Posts: n/a
 
      11th May 2004
How can I access then to my dinamic column?

I try this, but doesn't work:

Dim str as String

str = Cstr(dg.SelectedItem.Cells(6).Text)

it says that it's out of range. I count the columns and I have 6 columns and
when I add dinamic column I'll have 7 columns, but I can't access the last
(it's dinamic)
How can I solve this?


--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca

"Eliyahu Goldin" <(E-Mail Removed)> escreveu na mensagem
news:(E-Mail Removed)...
> QUESTION 1:
> Look at the help for DataGrid.Columns property and the example in the help
> for DataGridColumnCollection.
> A note from the help:
> Although you can programmatically add columns to the Columns collection,
> it is easier to list the columns statically and then use the Visible
> property to show or hide the column.
> Eliyahu
>
> "ruca" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> > I have two different questions to ask:
> >
> > QUESTION 1:
> > Can I create dinamically a column in a datagrid? How?
> > I have a datagrid that must have 5 columns, but in some very special

cases
> I
> > have to add another column. How can I do this in code?
> >
> >
> > QUESTION 2:
> > When I Debug my Web application, the debug is very slow. Changes line

> (step
> > by step) is slow.
> > Can I fix in anyway this problem?
> > I already try to see if any process is running, but I can't find

anything
> > special.
> > Suggestions are welcome.
> >
> >
> > --
> > Programming ASP.NET with VB.NET
> > Thank's (if you try to help me)
> > Hope this help you (if I try to help you)
> > ruca
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create DataGrid column parser? =?Utf-8?B?b2xlaw==?= Microsoft Dot NET Framework Forms 2 30th Aug 2007 10:00 PM
how to create a vb.net combobox datagrid column =?Utf-8?B?Q1ZpbGxhbGJh?= Microsoft Dot NET 0 27th Aug 2005 10:03 PM
Create column in a Datagrid ruca Microsoft ASP .NET 3 11th May 2004 05:45 PM
how to create a tag in datagrid column jaYPee Microsoft VB .NET 0 28th Apr 2004 03:43 PM
How do I create an invisible column in the DataGrid Harry Keck Microsoft Dot NET Framework Forms 1 18th Aug 2003 08:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:37 AM.