I've tried the following without success.......
AddHandler DS1.Tables("dial").RowChanged, AddressOf after_row_insert
AddHandler CType(Me.dgDials.DataSource, DataTable).RowChanged,
AddressOf after_row_insert
the 2nd raises an "invalid cast" error, neither redirects to my
'after_row_insert' event.
Any ideas why this is not working?
Thanks 9 2690
Astro,
What does this look like
dgDials.Datasource = ????
Cor
the datasource is a dataview.........
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Ol**************@TK2MSFTNGP10.phx.gbl... Astro,
What does this look like dgDials.Datasource = ????
Cor
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*******************@tornado.rdc-kc.rr.com... the datasource is a dataview.........
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message news:Ol**************@TK2MSFTNGP10.phx.gbl... Astro,
What does this look like dgDials.Datasource = ????
Cor
i'll take a look - thanks ))
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:Oq**************@TK2MSFTNGP15.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*******************@tornado.rdc-kc.rr.com... the datasource is a dataview.........
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message news:Ol**************@TK2MSFTNGP10.phx.gbl... Astro,
What does this look like dgDials.Datasource = ????
Cor
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**************@TK2MSFTNGP15.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*******************@tornado.rdc-kc.rr.com... the datasource is a dataview.........
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message news:Ol**************@TK2MSFTNGP10.phx.gbl... Astro,
What does this look like dgDials.Datasource = ????
Cor
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(dgdials.datasource,data view)),
CurrencyManager)
I changed it here so watch typos,
I hope this helps,
Cor
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**************@TK2MSFTNGP10.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(dgdials.datasource,data view)), CurrencyManager)
I changed it here so watch typos,
I hope this helps,
Cor
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********************@tornado.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**************@TK2MSFTNGP10.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(dgdials.datasource,data view)), CurrencyManager)
I changed it here so watch typos,
I hope this helps,
Cor
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.rowchanges 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**************@tk2msftngp13.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********************@tornado.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**************@TK2MSFTNGP10.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(dgdials.datasource,data view)), CurrencyManager)
I changed it here so watch typos,
I hope this helps,
Cor
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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....
|
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
|
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...
|
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 .
...
|
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...
|
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...
|
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("", "",...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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: 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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |