473,668 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

trying to capture rowchanged event for datagrid without success


I've tried the following without success.......

AddHandler DS1.Tables("dia l").RowChang ed, AddressOf after_row_inser t
AddHandler CType(Me.dgDial s.DataSource, DataTable).RowC hanged,
AddressOf after_row_inser t
the 2nd raises an "invalid cast" error, neither redirects to my
'after_row_inse rt' event.
Any ideas why this is not working?
Thanks
Nov 21 '05 #1
9 2702
Astro,

What does this look like
dgDials.Datasou rce = ????

Cor
Nov 21 '05 #2

the datasource is a dataview....... ..

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:Ol******** ******@TK2MSFTN GP10.phx.gbl...
Astro,

What does this look like
dgDials.Datasou rce = ????

Cor

Nov 21 '05 #3
Astro,

You can not use an event from a datatable with a dataview, however see this
sample, it will have the same (better) effect.

Currencymanager event

http://www.windowsformsdatagridhelp....6-9cc458453630

I hope this helps,

Cor
"astro" <as***@mnrr.com > schreef in bericht
news:uE******** ***********@tor nado.rdc-kc.rr.com...

the datasource is a dataview....... ..

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:Ol******** ******@TK2MSFTN GP10.phx.gbl...
Astro,

What does this look like
dgDials.Datasou rce = ????

Cor


Nov 21 '05 #4
i'll take a look - thanks ))

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:Oq******** ******@TK2MSFTN GP15.phx.gbl...
Astro,

You can not use an event from a datatable with a dataview, however see
this sample, it will have the same (better) effect.

Currencymanager event

http://www.windowsformsdatagridhelp....6-9cc458453630

I hope this helps,

Cor
"astro" <as***@mnrr.com > schreef in bericht
news:uE******** ***********@tor nado.rdc-kc.rr.com...

the datasource is a dataview....... ..

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:Ol******** ******@TK2MSFTN GP10.phx.gbl...
Astro,

What does this look like
dgDials.Datasou rce = ????

Cor



Nov 21 '05 #5
Your fine example works when the object of interest is the dataview....but I
am interested in a child table's row change event....

let me explain the scenario:

I have a customer table. I have a dataview for this table that my
textboxes, comboboxes, etc. are bound to. This is not a defaultview, it is
a custom dataview that I filter, sort and searh on.

I have a datagrid which is bound to the relation between the dataview and a
child table. I want to trap the rowchange event of this datagrid. It's
datasource is dv1 (my dataview), it's datamember is the relation between the
parent and child table: companydial.

I think the currenyManager idea will work.....just don't know how to point
it to this 'child' datagrid.

Any ideas?
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:Oq******** ******@TK2MSFTN GP15.phx.gbl...
Astro,

You can not use an event from a datatable with a dataview, however see
this sample, it will have the same (better) effect.

Currencymanager event

http://www.windowsformsdatagridhelp....6-9cc458453630

I hope this helps,

Cor
"astro" <as***@mnrr.com > schreef in bericht
news:uE******** ***********@tor nado.rdc-kc.rr.com...

the datasource is a dataview....... ..

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:Ol******** ******@TK2MSFTN GP10.phx.gbl...
Astro,

What does this look like
dgDials.Datasou rce = ????

Cor



Nov 21 '05 #6
Astro,

I think the currenyManager idea will work.....just don't know how to point
it to this 'child' datagrid.

Any ideas?

Almost the same as in your first post in this thread.

Dim cma As CurrencyManager = DirectCast _
(BindingContext (DirectCast(dgd ials.datasource ,dataview)),
CurrencyManager )

I changed it here so watch typos,

I hope this helps,

Cor
Nov 21 '05 #7
thanks - that works for the rowchange on the dataview...but not when I
change rows in the dial datagrid....

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:uG******** ******@TK2MSFTN GP10.phx.gbl...
Astro,

I think the currenyManager idea will work.....just don't know how to
point it to this 'child' datagrid.

Any ideas?

Almost the same as in your first post in this thread.

Dim cma As CurrencyManager = DirectCast _
(BindingContext (DirectCast(dgd ials.datasource ,dataview)),
CurrencyManager )

I changed it here so watch typos,

I hope this helps,

Cor

Nov 21 '05 #8
Astro,

This does something more than the rowchange in a datagrid. This fires when
there is a selected rowchange in the datagrid even when the datarow in the
table is not changed.

Cor

"astro" <as***@mnrr.com > schreef in bericht
news:gK******** ************@to rnado.rdc-kc.rr.com...
thanks - that works for the rowchange on the dataview...but not when I
change rows in the dial datagrid....

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:uG******** ******@TK2MSFTN GP10.phx.gbl...
Astro,

I think the currenyManager idea will work.....just don't know how to
point it to this 'child' datagrid.

Any ideas?

Almost the same as in your first post in this thread.

Dim cma As CurrencyManager = DirectCast _
(BindingContext (DirectCast(dgd ials.datasource ,dataview)),
CurrencyManager )

I changed it here so watch typos,

I hope this helps,

Cor


Nov 21 '05 #9
thanks for your diligent replies Cor........

I"m taking a break from this approach....... ...in working through this
problem I think I have a better idea of the coupling between the grid and
the underlying data table. It seems to be better to trap & save the row
changes at the table.rowchange s event then hooking into the grid events via
a reference to a currency manager..
-)
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:eC******** ******@tk2msftn gp13.phx.gbl...
Astro,

This does something more than the rowchange in a datagrid. This fires when
there is a selected rowchange in the datagrid even when the datarow in the
table is not changed.

Cor

"astro" <as***@mnrr.com > schreef in bericht
news:gK******** ************@to rnado.rdc-kc.rr.com...
thanks - that works for the rowchange on the dataview...but not when I
change rows in the dial datagrid....

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:uG******** ******@TK2MSFTN GP10.phx.gbl...
Astro,
I think the currenyManager idea will work.....just don't know how to
point it to this 'child' datagrid.

Any ideas?

Almost the same as in your first post in this thread.

Dim cma As CurrencyManager = DirectCast _
(BindingContext (DirectCast(dgd ials.datasource ,dataview)),
CurrencyManager )

I changed it here so watch typos,

I hope this helps,

Cor



Nov 21 '05 #10

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

Similar topics

2
3210
by: Nick | last post by:
I have a windows application wherein I have focus on a datagrid. Now when i hit the down arrow, I want to capture the event. However, my datagrid.KeyDown event handle is not getting invoked at all. This is actually the first time I'm ever having to use this event of the datagrid. Just wanted to know if this does not work? And if it doesn't, then what's the workaround? Cheers! Nick
5
4484
by: Uma Muthu | last post by:
Hello Everyone, How can I capture the event of closing the IE browser from within an ASP.NET web application? TIA, Uma
4
4809
by: Bill Manring | last post by:
I need to capture the event when the user closes the browser in my application. I have some code in the session_End event, which works fine when the session times out, but I need to end the session immediately when the user closes the browser. Does anyone know a way of doing this? -- Thanks,
7
1518
by: Beffmans | last post by:
Hi I wonder if there was something like a an event for an asp.net datagrid which fire swhen you change (part of) that row? I am trying to mark rows which have been changed to update later . ch B. *** Sent via Developersdex http://www.developersdex.com ***
19
3481
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred to here as page_2). I need to cache the value of the link's text (hyperlink.text property) so that I can use it in the page_load event of page_2. I've thought of using a hidden field and then calling Request.Form("hdnClickedLinkText") in the...
8
1406
by: Aaron Smith | last post by:
If I add a handler to the row changed event of a datatable, it fires when a row has been added, but when in the event, it hasn't actually added the row yet... Is there a way around this? How can I make sure that the row has been added to the dataset during this event? Or is there another one I have to hook into? Thanks, Aaron -- ---
1
1743
by: astro | last post by:
I am trapping the rowchanged event on a table. I have the following code: If e.Action = DataRowAction.Add Then ds.Merge(CType(sender, DataTable).Select("", "", System.Data.DataViewRowState.Added)) The funny thing is - the merge operation captures No rows.
0
1227
by: crferguson | last post by:
I've been looking in every place I can to find a solution for this and I believe I've pieced a solid one together so I thought I'd share since I've found so much help on these groups... This is for winforms only as I haven't tried anything like this in ASP... - I've added a boolean property to the form in the General Declarations section:
10
2961
by: amiga500 | last post by:
Hello, I have one basic simple question. When I have multiple records in the datagrid as follows: Code Product 1 Product 2 Product 3 11111 A B C 22222 D E F 33333 G H I 44444 J K L
0
8459
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8374
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8575
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2784
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.