473,386 Members | 1,823 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,386 software developers and data experts.

how to know if a datagrid column is a template column?

hello all,
i need to know, programatically, if a datagrid column is a template column,
at itemdatabound event.
somebody have a idea?

Thanks.

Dexter
__________________________________________________ __________________________

If (e.Item.ItemType = ListItemType.Header) Then
Dim quantidade = e.Item.Cells.Count
Dim a As Integer
For a = 0 To quantidade - 1

'Here i need to know if is a templatecolumn

Dim s As String = e.Item.Cells(a).Text
If s <> "" And s <> "&nbsp;" Then
e.Item.Cells(a).Text =
pergunta_nome_coluna(viewstate("Tabela"), s)
End If
Next
End If
__________________________________________________ __________________________
Nov 19 '05 #1
1 1046
myGrid.Columns(a).GetType()

Eliyahu

"Dexter" <pr******@yahoo.com.br> wrote in message
news:ee**************@TK2MSFTNGP09.phx.gbl...
hello all,
i need to know, programatically, if a datagrid column is a template column, at itemdatabound event.
somebody have a idea?

Thanks.

Dexter
__________________________________________________ __________________________
If (e.Item.ItemType = ListItemType.Header) Then
Dim quantidade = e.Item.Cells.Count
Dim a As Integer
For a = 0 To quantidade - 1

'Here i need to know if is a templatecolumn

Dim s As String = e.Item.Cells(a).Text
If s <> "" And s <> "&nbsp;" Then
e.Item.Cells(a).Text =
pergunta_nome_coluna(viewstate("Tabela"), s)
End If
Next
End If
__________________________________________________ __________________________

Nov 19 '05 #2

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

Similar topics

10
by: ShadowsOfTheBeast | last post by:
hi all i am trying to bind data to my datagrid from a listbox which i think it should work but an error is coming up saying i have to bind to a datasource that implements the Inumerable or...
0
by: Andrea Trevisan | last post by:
That's a revival of a known thing I suppose.I hope it's useful. My problem was: I want to have a DataGrid with two Template columns: first with TextBox,second with Button.I want to fire an event...
2
by: reiks | last post by:
My select query is a s follows select qty from sales; My datagrid as two template columns with textboxex in Item template.I want to use second template column as a compute column in my...
4
by: Stephan Bour | last post by:
Hi, I have a datagrid databound to a SQL query. I'd like to allow editing of some columns but not all. Is there a way to turn off the conversion of the datagrid cells to textboxes for some columns...
2
by: CW | last post by:
In an earlier thread, I was asking for help on "Invalid attempt to FieldCount when reader is closed" error when I was using a dataset rather than a datareader to bind to a datagrid. After...
2
by: saleek | last post by:
Hi, I am trying to figure out why my datagrid has stopped firing the page and sort commands. Scenario: I originally had template columns in my datagrid and had set up custom bi-directional...
1
by: Ken Varn | last post by:
I have a problem where my DataGrid would not maintain the ViewState of my databound rows. I finally narrowed down the problem. If my first column is a template column, the view state for the...
6
by: Scott McDaniel | last post by:
I'm using Visual Studio 2005 with the .NET 2.0.50727 framework, and we're using the standard Datagrid control bound to a SQL Server. We have two groups of users - "full edit" users, and "view...
2
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat...
2
by: neoret | last post by:
Hello. I need some help on how to add a radiobutton to every row in the first column in a datagrid. The datasource to the datagrid is a dataTable. I loop through this table to add rows and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.