473,385 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Creation and Positioning DataGrid Columns at runtime.

Hello,
I need to create a DataGrid that looks something like this...

<HyperLinkColumn><ButtonColumn><Data><Data><Button Column>

but I can only seem to produce a DataGrid as below...

<HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>

Can anyone help?
Many thanks in advance.

Alan
Nov 19 '05 #1
5 1205
Alan,

What happens if you just change the order of the columns in the .aspx file?

Eliyahu

"Alan Seunarayan" <so****@ntlw0rld.c0m> wrote in message
news:u5*****************@newsfe6-win.ntli.net...
Hello,
I need to create a DataGrid that looks something like this...

<HyperLinkColumn><ButtonColumn><Data><Data><Button Column>

but I can only seem to produce a DataGrid as below...

<HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>

Can anyone help?
Many thanks in advance.

Alan

Nov 19 '05 #2
it needs to be done in the 'Code-Behind'.

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Alan,

What happens if you just change the order of the columns in the .aspx
file?

Eliyahu

"Alan Seunarayan" <so****@ntlw0rld.c0m> wrote in message
news:u5*****************@newsfe6-win.ntli.net...
Hello,
I need to create a DataGrid that looks something like this...

<HyperLinkColumn><ButtonColumn><Data><Data><Button Column>

but I can only seem to produce a DataGrid as below...

<HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>

Can anyone help?
Many thanks in advance.

Alan


Nov 19 '05 #3
in the ItemDataBound event of a DataGrid add the following....

TableCell deleteCell = e.Item.Cells[1]; // rendered ButtonColumn

e.Item.Cells.Add(deleteCell);

"Alan Seunarayan" <so****@ntlw0rld.c0m> wrote in message
news:u5*****************@newsfe6-win.ntli.net...
Hello,
I need to create a DataGrid that looks something like this...

<HyperLinkColumn><ButtonColumn><Data><Data><Button Column>

but I can only seem to produce a DataGrid as below...

<HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>

Can anyone help?
Many thanks in advance.

Alan

Nov 19 '05 #4
Are you creating column dynamically? What happens if you change the column
creating order?

Eliyahu

"Alan Seunarayan" <so****@ntlw0rld.c0m> wrote in message
news:yP****************@newsfe1-win.ntli.net...
it needs to be done in the 'Code-Behind'.

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Alan,

What happens if you just change the order of the columns in the .aspx
file?

Eliyahu

"Alan Seunarayan" <so****@ntlw0rld.c0m> wrote in message
news:u5*****************@newsfe6-win.ntli.net...
Hello,
I need to create a DataGrid that looks something like this...

<HyperLinkColumn><ButtonColumn><Data><Data><Button Column>

but I can only seem to produce a DataGrid as below...

<HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>

Can anyone help?
Many thanks in advance.

Alan



Nov 19 '05 #5
Post the code where you are creating the columns

"Alan Seunarayan" wrote:
in the ItemDataBound event of a DataGrid add the following....

TableCell deleteCell = e.Item.Cells[1]; // rendered ButtonColumn

e.Item.Cells.Add(deleteCell);

"Alan Seunarayan" <so****@ntlw0rld.c0m> wrote in message
news:u5*****************@newsfe6-win.ntli.net...
Hello,
I need to create a DataGrid that looks something like this...

<HyperLinkColumn><ButtonColumn><Data><Data><Button Column>

but I can only seem to produce a DataGrid as below...

<HyperLinkColumn><ButtonColumn><ButtonColumn><Data ><Data>

Can anyone help?
Many thanks in advance.

Alan


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called...
5
by: AC | last post by:
Any reason i'm having trouble with: DataGrid1.Columns(7).ItemStyle.HorizontalAlign = HorizontalAlign.Right I'm trying to directly set the column alignment of a datagrid created at runtime.. ...
2
by: Johnson Smith | last post by:
Question is related to ASP.Net and controlling the position of these controls. I am using html table to placce my web controls. I am displaying same datagrid and calendar controls at clicks of...
8
by: Hanson | last post by:
I have a datagrid control in an aspx page. The datagrid columns will be dynamically generated according to the pre-page's search condition, I want to hide some columns in the datagrid. is that...
3
by: John E. | last post by:
I have a datatable that I am binding to a C# ASP.NET 1.1 web page datagrid. I also want to put an "Edit" column on the datagrid. However, whenever I use the following code, it puts the Edit...
2
by: Steve Pierce | last post by:
I am having some issues with a runtime dropdownlist in a datagrid. The issue is that I cannot get ViewState to fill the selected index of a runtime dropdown properly on postback. I do not want to...
5
by: Gary Blakely | last post by:
I'm giving this post another try - it can't be too difficult for everyone.... In the program below, the web page has dataGrid1. the only thing that has been done to it at design time is to...
4
by: gh | last post by:
I create the columns for the asp.net datagrid at runtime and populates them. I have a template column for checkboxs I created at runtime as well. The user selects the product they want by...
7
by: GaryDean | last post by:
(one of our developers posted this and it got no answer so I'm giving it another try) I'm converting a DataGrid utility component that previously used the columns array to function as it has in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.