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

adding serial no column in a bounded data grid

i want to show a serial no column in a data grid which is bounded to a data
table. Is it possible. does datagrid has some property to do this


Nov 18 '05 #1
3 2052
You can use the event named "OnItemDataBound" to create/Add serial numbers to the datagrid rows.

Sub RowSerial(s object, e as DataGridItemEventArgs)
If e.Item.ItemType <> ListItemType.Header Then
' Additon to cell 0 goes here
End If
End sub

Write further if more clarification are required.

Avneesh

Nov 18 '05 #2
Thanks it works for me
"Avneesh" <av*****@helloprojects.com> wrote in message
news:E9**********************************@microsof t.com...
You can use the event named "OnItemDataBound" to create/Add serial numbers to the datagrid rows.
Sub RowSerial(s object, e as DataGridItemEventArgs)
If e.Item.ItemType <> ListItemType.Header Then
' Additon to cell 0 goes here
End If
End sub

Write further if more clarification are required.

Avneesh

Nov 18 '05 #3
Check out this article
http://www.extremeexperts.com/Net/Co...eqNumber2.aspx

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Vikramaditya Singh" <vi*********@rediffmail.com> wrote in message
news:Og**************@TK2MSFTNGP12.phx.gbl...
i want to show a serial no column in a data grid which is bounded to a data table. Is it possible. does datagrid has some property to do this

Nov 18 '05 #4

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

Similar topics

3
by: Claudio Lapidus | last post by:
Hello Now perhaps this is a bit dumb, but... I just populated a new table via \copy. After that, I realize that perhaps is a good thing to have a row identifier in it, so I try clapidus=>...
2
by: Clayton Hamilton | last post by:
I have a DataGrid on a webform bound to a Datasource and can successfully use <ItemTemplate> to create edit/update/cancel functionality for user maintenance of data. I use separate logic to delete...
0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
6
by: Robert Schuldenfrei | last post by:
Dear NG, After being away from C# programming for a spell, I am trying my hand at what should be a simple task. I have been hitting my head against the wall this morning. I have a simple order...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
5
by: Aaron Ackerman | last post by:
I have a bound combobox the appears on a cell within the column of my bound grid when the user clicks on a cell n(In my vb.net WinForm app). I am trying to allow the adding of an item to that bound...
12
by: Prabu Subroto | last post by:
Dear my friends... I am using postgres 7.4 and SuSE 9.1. I want to use auto_increment as on MySQL. I look up the documentation on www.postgres.com and I found "serial" . But I don't know...
2
by: Roger Frei | last post by:
Hello ng, I have a datagrid that is bound to a datasource. That works good so far. Now I want to add another column to my grid dynamically. That also works good until the first postback. The...
0
by: capos | last post by:
Hi, I know this has been asked previously but I can't seem to find the correct solution to my problem. I have a dataGridView that is bound to one of my database tables, as soon as the form...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
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.