Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Tina #1
Create Columns at run time
if you place a datagrid on a form and then, in Property builder, check the
box saying Create Columns at run time. An then do a SQL Select into a
datatable, and then bind the datatable to the grid, the grid displays
correctly. BUT, the columns array is empty. The grid displays just fine.
There are cells and rows but no columns.
I want to make some of the columns non visible but I can't because there are
no columns.
Why is this?
Thanks,
Tina
Tina Guest
-
Dynamically create datagrid columns
I am trying to write a user control that is essentially a DataGrid with some custom functionality. My grid is to be bound to a custom collection.... -
Create Columns Automatically at Runtime
We have been having some unexplainable datagrid issues and questions on this subject and our messages have largely been ignored when posting to this... -
How To Create Columns?
Im using CF6.1 and Access. I want to run a query or somehting that will allow me to create columns in access. Im designing a setup page for my app,... -
create dynamic columns
Any one knows how to display sentence in 3 colums in coldfusion . Thank you! -
Hidden columns in execution time
Hi, I have one datagrid where the columns are mounted in execution time and use a column template where exists a link. One necessary to make that... -
Scott M. #2
Re: Create Columns at run time
If the columns are going to be made automatically at run-time, then you
can't modify them at design-time.
If you are going to want to configure aspects of the columns yourself, then
you'll need to un-check "Create columns automatically at run time." and
manually add columns yourself.
I suggest adding Bound columns first and configuring each to be bound to the
appropriate data field from your data source. After they are created and
working, I would then click the link in the bottom of the Property Builder
to "Convert to Template Column", so that you can get even more control over
the configuration of the columns.
"Tina" <tinamseaburn@nospammeexcite.com> wrote in message
news:etkkuquxFHA.3384@TK2MSFTNGP10.phx.gbl...> if you place a datagrid on a form and then, in Property builder, check the
> box saying Create Columns at run time. An then do a SQL Select into a
> datatable, and then bind the datatable to the grid, the grid displays
> correctly. BUT, the columns array is empty. The grid displays just fine.
> There are cells and rows but no columns.
>
> I want to make some of the columns non visible but I can't because there
> are no columns.
>
> Why is this?
> Thanks,
> Tina
>
Scott M. Guest
-
Tina #3
Re: Create Columns at run time
I Can't do what you say because my program is a SQLTable Update Utility. I
don't know what the columns will be at design time.
I'm "Creating the columns at run time" via a databind which does indeed
create the grid correctly but the Columns array is nothing i.e.
Datagrid1.columns(0) is out of bounds.
It seems the columns array should be there. the Headertext is even there
which is an attribute of the columns in the array.
What is really odd is related to another thread you replied to where my
datagrid was empty in a subsequent button click event. It was because I had
the Create columns checkbox checked!!!!!!!! When I unchecked it, my grid
had all of its rows and data in the button event. I think thats a bug in
the grid componnet.
T
"Scott M." <s-mar@nospam.nospam> wrote in message
news:u4zPlGwxFHA.3300@TK2MSFTNGP09.phx.gbl...> If the columns are going to be made automatically at run-time, then you
> can't modify them at design-time.
>
> If you are going to want to configure aspects of the columns yourself,
> then you'll need to un-check "Create columns automatically at run time."
> and manually add columns yourself.
>
> I suggest adding Bound columns first and configuring each to be bound to
> the appropriate data field from your data source. After they are created
> and working, I would then click the link in the bottom of the Property
> Builder to "Convert to Template Column", so that you can get even more
> control over the configuration of the columns.
>
>
>
> "Tina" <tinamseaburn@nospammeexcite.com> wrote in message
> news:etkkuquxFHA.3384@TK2MSFTNGP10.phx.gbl...>>> if you place a datagrid on a form and then, in Property builder, check
>> the box saying Create Columns at run time. An then do a SQL Select into
>> a datatable, and then bind the datatable to the grid, the grid displays
>> correctly. BUT, the columns array is empty. The grid displays just
>> fine. There are cells and rows but no columns.
>>
>> I want to make some of the columns non visible but I can't because there
>> are no columns.
>>
>> Why is this?
>> Thanks,
>> Tina
>>
>
Tina Guest



Reply With Quote

