473,385 Members | 1,355 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.

vb.net ItemDataBound equivalent

In C#, I use the following to bind ItemDataBound to a DataGrid:
grid.ItemDataBound += new DataGridItemEventHandler(OnContentItemDataBound);

Does anyone know the equivalent of this in vb.net?

Thanks,
Ken
Apr 13 '06 #1
2 2129
AddHandler grid.ItemDataBound, AddressOf OnContentItemDataBound
or you can add the handles keyword to the end of the OnContentItemDataBound
function signature, e.g.,

Private Sub OnContentItemDataBound(ByVal sender As Object, ByVal e As
DataGridItemEventArgs) Handles grid.ItemDataBound

End Sub
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Ken Slight" wrote:
In C#, I use the following to bind ItemDataBound to a DataGrid:
grid.ItemDataBound += new DataGridItemEventHandler(OnContentItemDataBound);

Does anyone know the equivalent of this in vb.net?

Thanks,
Ken

Apr 13 '06 #2
Phillip,

Thanks a lot. That worked great.
Ken
"Phillip Williams" wrote:
AddHandler grid.ItemDataBound, AddressOf OnContentItemDataBound
or you can add the handles keyword to the end of the OnContentItemDataBound
function signature, e.g.,

Private Sub OnContentItemDataBound(ByVal sender As Object, ByVal e As
DataGridItemEventArgs) Handles grid.ItemDataBound

End Sub
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Ken Slight" wrote:
In C#, I use the following to bind ItemDataBound to a DataGrid:
grid.ItemDataBound += new DataGridItemEventHandler(OnContentItemDataBound);

Does anyone know the equivalent of this in vb.net?

Thanks,
Ken

Apr 13 '06 #3

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

Similar topics

2
by: Steve Klett | last post by:
Hi- I am developing a hierarchical navigation system. I have a DataList with the root level items, on the ItemDataBound event, I check for the selected item, when found I'm adding an additional...
3
by: Clouds | last post by:
Hi ! How do I add the dynamic event handler for a dropdownlist present in the itemtemplate of a datalist !! I am doing it in the itemdatabound event of the datalist but it doesnt work... I am...
1
by: Roy | last post by:
Hey all, This is a fairly broad question, but why is it that my datagrid hits the ItemDataBound event 3 times? Basically, I placed a response.write in all sub and functions in my codebehind and...
0
by: KJ | last post by:
I noticed the following behavior: With 2 repeaters nested, such as: <asp:repeater id=rptrParentRepeater runat="server"> <ItemTemplate> <asp:Repeater id="rptrChildRepeater" runat="server"...
4
by: Girish | last post by:
Im trying to create a grid within a grid programmatically. Ive been successful in doing this but I need the embedded grid to fire its ItemDataBound event so I can handle it. The event does not seem...
2
by: samir dsf | last post by:
hi I had been using this datagrid for long. all well...but suddenly the itemdatabound event is not at all getting called...i dont see my links..initally it worked well here is the page_load...
1
by: needin4mation | last post by:
Hi, I have a datalist. In this datalist I have a datagrid. The datalist is the master. The datagrid is the detail. It works fine. I populate the datagrid inside of the datalist using the...
1
by: greenb | last post by:
I'm using the ItemDataBound event of the DataGrid to highlight cells that are outside an acceptable range. Each row has a button column (CommandName='Select'), that is used to display addtional...
5
by: Nathan Sokalski | last post by:
I have a control that I want displayed in all items except the last one. I figured the best way to do this was to determine whether the current item was the last from within the ItemDataBound event...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
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?

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.