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

? Trapping events from a dyanamically created Datagrid - VB .NET.. DOH!

Hi Guys,

Am putting together a WEB App with an ever nearing deadline :o( I've a
Master Datagrid (defined in the ASP page) containing in the second column a
(details) datagrid (dynamically generated with the ItemDataBound event for
the master). Got the basic code from the excellent article
http://www.dotnetjunkies.com/Tutoria...63C4C9BBC.dcik

Code frag as follows:

Private Sub DataGridInvSummary_OnItemDataBound(ByVal source As Object, ByVal
e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGridInvSummary.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
Dim DataGridInvLine As New DataGrid

Snipped...

e.Item.Cells(2).Controls.Add(DataGridInvLine)
End If
End Sub

I now want to trap the ItemDataBound event for the dyanically created
DataGrid DataGridInvLine and can't seem to make it work... all help really
really appreciated :o)

Thanks for taking the time to read this...

Shaun
Nov 21 '05 #1
1 1060
"news.zen.co.uk" <fr**@fred.com> schrieb:
I now want to trap the ItemDataBound event for the dyanically created
DataGrid DataGridInvLine and can't seem to make it work...


Take a look at the documentation on the 'AddHandler' and 'RemoveHandler'
statements.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2

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

Similar topics

4
by: Wugi | last post by:
I'm trying to find an equivalent of key-event trapping which is easy in QBasic. Several of my programs build up a geometric figure with two parameter line families, eg with two nested for..next...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
1
by: Balaji | last post by:
Hi guys, This is a subtle one. I'm looking for someone who can give me some insight relative to eventsfiring in the codebehind. I have created the dropdownlist dyanamically in the datagrid...
1
by: John Martin | last post by:
I've made an .NET application where the contents of a datagrid (dgr1) is changed when the user changes the selection in a drop-down list (drd1). This has works fine as a beginning. Then I want to...
0
by: Chris | last post by:
Ok, I think this is an easy one - I've just been staring at it too long. I'm creating a datagrid in asp.net/c# from scratch, i.e. nothing at all in the aspx page. I'm also creating all the...
8
by: OHM | last post by:
I know this is not purely a VB.NET question, but I thought I would ask tho ! First create a typed-dataset with an integer ID primary-key field and a string Name field. Then create a form with a...
4
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with a...
6
by: Steve Hershoff | last post by:
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost...
1
by: Elmo Watson | last post by:
Up until now, I've done all the work (gui/front end programming, classes, etc) I've done all my error trapping (try/catch) in the methods in the code behind. Now I've got an opportunity to do...
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
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
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
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...

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.