hi
I have a form with 2 datagrids showing related table data in a master /
child or order / order details type relationship. I would like to auto
select the row in the order details table which contains the highest priced
item. My thoughts were to get the currency manager from the orderdetails
table and iterate thru each row and keep track of the highest item and row
and select that when done. I have found that for some reason the currency
manager of the order details table is always a position 0 regardless of what
is actually showing in the order details datagrid.
What am I doing wrong?
Thanks !! 10 1878
D,
Are you sure you are getting the correct currency mananger? When you
are getting the currency manager, you need to get the manager which is
returned to you by using the DataRelation as the key, not the child data
table (which is why the position is probably always zero).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message
news:uF******** ******@TK2MSFTN GP15.phx.gbl... hi
I have a form with 2 datagrids showing related table data in a master / child or order / order details type relationship. I would like to auto select the row in the order details table which contains the highest priced item. My thoughts were to get the currency manager from the orderdetails table and iterate thru each row and keep track of the highest item and row and select that when done. I have found that for some reason the currency manager of the order details table is always a position 0 regardless of what is actually showing in the order details datagrid.
What am I doing wrong?
Thanks !!
I thought of that but I must have the syntax wrong because I'm getting
exceptions
_dsTests.Relati ons.Add("MyTest Relation",
_dsCombinations .Tables["Tests"].Columns["ID"],
_dsCombinations .Tables["DailyTotal s"].Columns["ID"]);
later...
CurrencyManager myCurrencyManag er =
(CurrencyManage r)this.BindingC ontext["MyTestRelation "];
cast not valid
CurrencyManager myCurrencyManag er =
(CurrencyManage r)this.BindingC ontext["Tests.MyTestRe lation"];
cast not valid
Thanks
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. D,
Are you sure you are getting the correct currency mananger? When you are getting the currency manager, you need to get the manager which is returned to you by using the DataRelation as the key, not the child data table (which is why the position is probably always zero).
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:uF******** ******@TK2MSFTN GP15.phx.gbl... hi
I have a form with 2 datagrids showing related table data in a master / child or order / order details type relationship. I would like to auto select the row in the order details table which contains the highest priced item. My thoughts were to get the currency manager from the orderdetails table and iterate thru each row and keep track of the highest item and row and select that when done. I have found that for some reason the currency manager of the order details table is always a position 0 regardless of what is actually showing in the order details datagrid.
What am I doing wrong?
Thanks !!
D,
Don't pass the string with the data relation name to the BindingContext.
Rather, pass the data relation itself, and you should get it.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message
news:eX******** ******@TK2MSFTN GP12.phx.gbl... I thought of that but I must have the syntax wrong because I'm getting exceptions
_dsTests.Relati ons.Add("MyTest Relation", _dsCombinations .Tables["Tests"].Columns["ID"], _dsCombinations .Tables["DailyTotal s"].Columns["ID"]); later... CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext["MyTestRelation "]; cast not valid CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext["Tests.MyTestRe lation"]; cast not valid
Thanks
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. D,
Are you sure you are getting the correct currency mananger? When you are getting the currency manager, you need to get the manager which is returned to you by using the DataRelation as the key, not the child data table (which is why the position is probably always zero).
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:uF******** ******@TK2MSFTN GP15.phx.gbl... hi
I have a form with 2 datagrids showing related table data in a master / child or order / order details type relationship. I would like to auto select the row in the order details table which contains the highest priced item. My thoughts were to get the currency manager from the orderdetails table and iterate thru each row and keep track of the highest item and row and select that when done. I have found that for some reason the currency manager of the order details table is always a position 0 regardless of what is actually showing in the order details datagrid.
What am I doing wrong?
Thanks !!
I'm afraid I'm still getting an invalid cast exception error when trying to
do
CurrencyManager myCurrencyManag er =
(CurrencyManage r)this.BindingC ontext[_dsTests.Relati ons["MyTestRelation "]];
I have a feeling that I'm going to have to get current id from the Tests
table and seek out the highest totals in the DailyTotals manually.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:uC******** ******@TK2MSFTN GP12.phx.gbl... D,
Don't pass the string with the data relation name to the BindingContext. Rather, pass the data relation itself, and you should get it.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:eX******** ******@TK2MSFTN GP12.phx.gbl...I thought of that but I must have the syntax wrong because I'm getting exceptions
_dsTests.Relati ons.Add("MyTest Relation", _dsCombinations .Tables["Tests"].Columns["ID"], _dsCombinations .Tables["DailyTotal s"].Columns["ID"]); later... CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext["MyTestRelation "]; cast not valid CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext["Tests.MyTestRe lation"]; cast not valid
Thanks
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. D,
Are you sure you are getting the correct currency mananger? When you are getting the currency manager, you need to get the manager which is returned to you by using the DataRelation as the key, not the child data table (which is why the position is probably always zero).
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:uF******** ******@TK2MSFTN GP15.phx.gbl... hi
I have a form with 2 datagrids showing related table data in a master / child or order / order details type relationship. I would like to auto select the row in the order details table which contains the highest priced item. My thoughts were to get the currency manager from the orderdetails table and iterate thru each row and keep track of the highest item and row and select that when done. I have found that for some reason the currency manager of the order details table is always a position 0 regardless of what is actually showing in the order details datagrid.
What am I doing wrong?
Thanks !!
D,
What is the type that is returned when you key on the relation? What
does the debugger tell you?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message
news:eu******** *****@TK2MSFTNG P15.phx.gbl... I'm afraid I'm still getting an invalid cast exception error when trying to do
CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext[_dsTests.Relati ons["MyTestRelation "]];
I have a feeling that I'm going to have to get current id from the Tests table and seek out the highest totals in the DailyTotals manually.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:uC******** ******@TK2MSFTN GP12.phx.gbl... D,
Don't pass the string with the data relation name to the BindingContext. Rather, pass the data relation itself, and you should get it.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:eX******** ******@TK2MSFTN GP12.phx.gbl...I thought of that but I must have the syntax wrong because I'm getting exceptions
_dsTests.Relati ons.Add("MyTest Relation", _dsCombinations .Tables["Tests"].Columns["ID"], _dsCombinations .Tables["DailyTotal s"].Columns["ID"]); later... CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext["MyTestRelation "]; cast not valid CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext["Tests.MyTestRe lation"]; cast not valid
Thanks
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. D,
Are you sure you are getting the correct currency mananger? When you are getting the currency manager, you need to get the manager which is returned to you by using the DataRelation as the key, not the child data table (which is why the position is probably always zero).
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:uF******** ******@TK2MSFTN GP15.phx.gbl... > hi > > I have a form with 2 datagrids showing related table data in a master > / child or order / order details type relationship. I would like to > auto select the row in the order details table which contains the > highest priced item. My thoughts were to get the currency manager from > the orderdetails table and iterate thru each row and keep track of the > highest item and row and select that when done. I have found that for > some reason the currency manager of the order details table is always > a position 0 regardless of what is actually showing in the order > details datagrid. > > What am I doing wrong? > > Thanks !! > > > > > > > >
I'm not sure where to look for that, I mean I catch the exception but I
don't see where it reads about the actual object. After reading MSDN a bit I
tried casting it to a propertymanager which workd but I'm not sure what to
do next. More reading I guess.
Any thoughts?
Thanks for your help.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:ek******** ******@TK2MSFTN GP12.phx.gbl... D,
What is the type that is returned when you key on the relation? What does the debugger tell you?
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:eu******** *****@TK2MSFTNG P15.phx.gbl... I'm afraid I'm still getting an invalid cast exception error when trying to do
CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext[_dsTests.Relati ons["MyTestRelation "]];
I have a feeling that I'm going to have to get current id from the Tests table and seek out the highest totals in the DailyTotals manually.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:uC******** ******@TK2MSFTN GP12.phx.gbl... D,
Don't pass the string with the data relation name to the BindingContext. Rather, pass the data relation itself, and you should get it.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:eX******** ******@TK2MSFTN GP12.phx.gbl... I thought of that but I must have the syntax wrong because I'm getting exception s
_dsTests.Relati ons.Add("MyTest Relation", _dsCombinations .Tables["Tests"].Columns["ID"], _dsCombinations .Tables["DailyTotal s"].Columns["ID"]); later... CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext["MyTestRelation "]; cast not valid CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext["Tests.MyTestRe lation"]; cast not valid
Thanks
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. > D, > > Are you sure you are getting the correct currency mananger? When > you are getting the currency manager, you need to get the manager > which is returned to you by using the DataRelation as the key, not the > child data table (which is why the position is probably always zero). > > Hope this helps. > > > -- > - Nicholas Paldino [.NET/C# MVP] > - mv*@spam.guard. caspershouse.co m > > "D" <Da**@nothing.n et> wrote in message > news:uF******** ******@TK2MSFTN GP15.phx.gbl... >> hi >> >> I have a form with 2 datagrids showing related table data in a master >> / child or order / order details type relationship. I would like to >> auto select the row in the order details table which contains the >> highest priced item. My thoughts were to get the currency manager >> from the orderdetails table and iterate thru each row and keep track >> of the highest item and row and select that when done. I have found >> that for some reason the currency manager of the order details table >> is always a position 0 regardless of what is actually showing in the >> order details datagrid. >> >> What am I doing wrong? >> >> Thanks !! >> >> >> >> >> >> >> >> > >
D,
Did you try looking in the debugger? Before you make the assignment,
paste:
this.BindingCon text[_dsTests.Relati ons["MyTestRelation "]]
Into the watch window.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message
news:ex******** ******@TK2MSFTN GP10.phx.gbl... I'm not sure where to look for that, I mean I catch the exception but I don't see where it reads about the actual object. After reading MSDN a bit I tried casting it to a propertymanager which workd but I'm not sure what to do next. More reading I guess.
Any thoughts?
Thanks for your help.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:ek******** ******@TK2MSFTN GP12.phx.gbl... D,
What is the type that is returned when you key on the relation? What does the debugger tell you?
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:eu******** *****@TK2MSFTNG P15.phx.gbl... I'm afraid I'm still getting an invalid cast exception error when trying to do
CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext[_dsTests.Relati ons["MyTestRelation "]];
I have a feeling that I'm going to have to get current id from the Tests table and seek out the highest totals in the DailyTotals manually.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:uC******** ******@TK2MSFTN GP12.phx.gbl... D,
Don't pass the string with the data relation name to the BindingContext. Rather, pass the data relation itself, and you should get it.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:eX******** ******@TK2MSFTN GP12.phx.gbl... >I thought of that but I must have the syntax wrong because I'm getting >exceptio ns > > _dsTests.Relati ons.Add("MyTest Relation", > _dsCombinations .Tables["Tests"].Columns["ID"], > _dsCombinations .Tables["DailyTotal s"].Columns["ID"]); > later... > CurrencyManager myCurrencyManag er = > (CurrencyManage r)this.BindingC ontext["MyTestRelation "]; > cast not valid > CurrencyManager myCurrencyManag er = > (CurrencyManage r)this.BindingC ontext["Tests.MyTestRe lation"]; > cast not valid > > Thanks > > > "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> > wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. >> D, >> >> Are you sure you are getting the correct currency mananger? When >> you are getting the currency manager, you need to get the manager >> which is returned to you by using the DataRelation as the key, not >> the child data table (which is why the position is probably always >> zero). >> >> Hope this helps. >> >> >> -- >> - Nicholas Paldino [.NET/C# MVP] >> - mv*@spam.guard. caspershouse.co m >> >> "D" <Da**@nothing.n et> wrote in message >> news:uF******** ******@TK2MSFTN GP15.phx.gbl... >>> hi >>> >>> I have a form with 2 datagrids showing related table data in a >>> master / child or order / order details type relationship. I would >>> like to auto select the row in the order details table which >>> contains the highest priced item. My thoughts were to get the >>> currency manager from the orderdetails table and iterate thru each >>> row and keep track of the highest item and row and select that when >>> done. I have found that for some reason the currency manager of the >>> order details table is always a position 0 regardless of what is >>> actually showing in the order details datagrid. >>> >>> What am I doing wrong? >>> >>> Thanks !! >>> >>> >>> >>> >>> >>> >>> >>> >> >> > >
its propertymanager .
and its bindtype is DataRelation.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:uH******** ********@TK2MSF TNGP15.phx.gbl. .. D,
Did you try looking in the debugger? Before you make the assignment, paste:
this.BindingCon text[_dsTests.Relati ons["MyTestRelation "]]
Into the watch window.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:ex******** ******@TK2MSFTN GP10.phx.gbl... I'm not sure where to look for that, I mean I catch the exception but I don't see where it reads about the actual object. After reading MSDN a bit I tried casting it to a propertymanager which workd but I'm not sure what to do next. More reading I guess.
Any thoughts?
Thanks for your help.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:ek******** ******@TK2MSFTN GP12.phx.gbl... D,
What is the type that is returned when you key on the relation? What does the debugger tell you?
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:eu******** *****@TK2MSFTNG P15.phx.gbl... I'm afraid I'm still getting an invalid cast exception error when trying to do
CurrencyManager myCurrencyManag er = (CurrencyManage r)this.BindingC ontext[_dsTests.Relati ons["MyTestRelation "]];
I have a feeling that I'm going to have to get current id from the Tests table and seek out the highest totals in the DailyTotals manually.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:uC******** ******@TK2MSFTN GP12.phx.gbl... > D, > > Don't pass the string with the data relation name to the > BindingContext. Rather, pass the data relation itself, and you should > get it. > > > -- > - Nicholas Paldino [.NET/C# MVP] > - mv*@spam.guard. caspershouse.co m > > "D" <Da**@nothing.n et> wrote in message > news:eX******** ******@TK2MSFTN GP12.phx.gbl... >>I thought of that but I must have the syntax wrong because I'm getting >>exception s >> >> _dsTests.Relati ons.Add("MyTest Relation", >> _dsCombinations .Tables["Tests"].Columns["ID"], >> _dsCombinations .Tables["DailyTotal s"].Columns["ID"]); >> later... >> CurrencyManager myCurrencyManag er = >> (CurrencyManage r)this.BindingC ontext["MyTestRelation "]; >> cast not valid >> CurrencyManager myCurrencyManag er = >> (CurrencyManage r)this.BindingC ontext["Tests.MyTestRe lation"]; >> cast not valid >> >> Thanks >> >> >> "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> >> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. >>> D, >>> >>> Are you sure you are getting the correct currency mananger? When >>> you are getting the currency manager, you need to get the manager >>> which is returned to you by using the DataRelation as the key, not >>> the child data table (which is why the position is probably always >>> zero). >>> >>> Hope this helps. >>> >>> >>> -- >>> - Nicholas Paldino [.NET/C# MVP] >>> - mv*@spam.guard. caspershouse.co m >>> >>> "D" <Da**@nothing.n et> wrote in message >>> news:uF******** ******@TK2MSFTN GP15.phx.gbl... >>>> hi >>>> >>>> I have a form with 2 datagrids showing related table data in a >>>> master / child or order / order details type relationship. I would >>>> like to auto select the row in the order details table which >>>> contains the highest priced item. My thoughts were to get the >>>> currency manager from the orderdetails table and iterate thru each >>>> row and keep track of the highest item and row and select that when >>>> done. I have found that for some reason the currency manager of the >>>> order details table is always a position 0 regardless of what is >>>> actually showing in the order details datagrid. >>>> >>>> What am I doing wrong? >>>> >>>> Thanks !! >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> > >
D,
That's not right then. What exactly is your data source? The property
manager is used when you bind to objects, not lists.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l... its propertymanager .
and its bindtype is DataRelation.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:uH******** ********@TK2MSF TNGP15.phx.gbl. .. D,
Did you try looking in the debugger? Before you make the assignment, paste:
this.BindingCon text[_dsTests.Relati ons["MyTestRelation "]]
Into the watch window.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:ex******** ******@TK2MSFTN GP10.phx.gbl... I'm not sure where to look for that, I mean I catch the exception but I don't see where it reads about the actual object. After reading MSDN a bit I tried casting it to a propertymanager which workd but I'm not sure what to do next. More reading I guess.
Any thoughts?
Thanks for your help.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in message news:ek******** ******@TK2MSFTN GP12.phx.gbl... D,
What is the type that is returned when you key on the relation? What does the debugger tell you?
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard. caspershouse.co m
"D" <Da**@nothing.n et> wrote in message news:eu******** *****@TK2MSFTNG P15.phx.gbl... > I'm afraid I'm still getting an invalid cast exception error when > trying to do > > CurrencyManager myCurrencyManag er = > (CurrencyManage r)this.BindingC ontext[_dsTests.Relati ons["MyTestRelation "]]; > > I have a feeling that I'm going to have to get current id from the > Tests table and seek out the highest totals in the DailyTotals > manually. > > > "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> > wrote in message news:uC******** ******@TK2MSFTN GP12.phx.gbl... >> D, >> >> Don't pass the string with the data relation name to the >> BindingContext. Rather, pass the data relation itself, and you should >> get it. >> >> >> -- >> - Nicholas Paldino [.NET/C# MVP] >> - mv*@spam.guard. caspershouse.co m >> >> "D" <Da**@nothing.n et> wrote in message >> news:eX******** ******@TK2MSFTN GP12.phx.gbl... >>>I thought of that but I must have the syntax wrong because I'm >>>gettin g exceptions >>> >>> _dsTests.Relati ons.Add("MyTest Relation", >>> _dsCombinations .Tables["Tests"].Columns["ID"], >>> _dsCombinations .Tables["DailyTotal s"].Columns["ID"]); >>> later... >>> CurrencyManager myCurrencyManag er = >>> (CurrencyManage r)this.BindingC ontext["MyTestRelation "]; >>> cast not valid >>> CurrencyManager myCurrencyManag er = >>> (CurrencyManage r)this.BindingC ontext["Tests.MyTestRe lation"]; >>> cast not valid >>> >>> Thanks >>> >>> >>> "Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> >>> wrote in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. >>>> D, >>>> >>>> Are you sure you are getting the correct currency mananger? >>>> When you are getting the currency manager, you need to get the >>>> manager which is returned to you by using the DataRelation as the >>>> key, not the child data table (which is why the position is >>>> probably always zero). >>>> >>>> Hope this helps. >>>> >>>> >>>> -- >>>> - Nicholas Paldino [.NET/C# MVP] >>>> - mv*@spam.guard. caspershouse.co m >>>> >>>> "D" <Da**@nothing.n et> wrote in message >>>> news:uF******** ******@TK2MSFTN GP15.phx.gbl... >>>>> hi >>>>> >>>>> I have a form with 2 datagrids showing related table data in a >>>>> master / child or order / order details type relationship. I would >>>>> like to auto select the row in the order details table which >>>>> contains the highest priced item. My thoughts were to get the >>>>> currency manager from the orderdetails table and iterate thru each >>>>> row and keep track of the highest item and row and select that >>>>> when done. I have found that for some reason the currency manager >>>>> of the order details table is always a position 0 regardless of >>>>> what is actually showing in the order details datagrid. >>>>> >>>>> What am I doing wrong? >>>>> >>>>> Thanks !! >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: rittersporn |
last post by:
I want to model relations between "Groups" and
also annotate the relations!
My solution so far:
Group
- GroupName : Text | PRIMARY_KEY
- Titel : Text
- Info : Memo
|
by: Tim Marshall |
last post by:
HI all, Access 2003, Jet back end.
Rather than annoy my users in a particular app by having relationships
with enforced relational integrity refuse to delete a record with
related records, I'm using cascade delete. When I use a continuous form
and a record is deleted, Access provides a warning that there are
related records, do you want to continue (an aside - anyone know how to
trap that warning on the form on error event?). However,...
|
by: Pete Davis |
last post by:
I have written a custom databound grid control that we've been using
successfully for months, but one of our developers has just run into a
problem that I can't figure out.
The code for setting it up is as follows:
DataSet dataSet = new DataSet( "TestSet" );
DataTable tableParent = dataSet.Tables.Add( "TableParent" );
tableParent.Columns.Add( "ID", typeof( Int32 ) );
|
by: Kris Bethea via DotNetMonster.com |
last post by:
Greetings,
I have a VB.NET program that I am trying to convert to C# (my office
decided that we are going to use C# from now on).
I've only been working with C# for about a month now, so this has been
quite the learning experience for me.
The following code is from my VB.NET program and it selects the Call Number
from my datagrid and then uses that information to populate another form.
|
by: web1110 |
last post by:
I created a class derived from a DataGridTextBoxColumn.
I have it working through looking at various examples on the net.
To update the underlying DataGrid, I had to overload the Edit method which
provided the CurrencyManager and row number required for SetColumnAtRow
method.
My question is, exactly is the CurrencyManager? I've used it, but I don't
understand it.
| |
by: Christopher Weaver |
last post by:
I have a CM bound to a table like this:
cMgrSort = (CurrencyManager)this.BindingContext;
Under certain circumstances I need to find a specific row in that table
DataRow r = dsSortOrders.Tables.Rows.Find(SortOrder);
When that happens, I need the CM.Position to reflect that row so that
everything stays in sync. How can I ensure that this happens?
|
by: Jeremy |
last post by:
I have a dataset containing 2 tables. A is the master table, B is a lookup
table. There is a combobox bound to B, which updates a value in a FK field
in A.
my currencymanager is created thus:
cmB= CType(frm.BindingContext(DsClient1.Tables("B")), CurrencyManager)
The cbx has these settings:
cbx.valuemember=b.primarykey
cbx.displaymember=b.name
|
by: Brian Richardson |
last post by:
Hi,
Please can anyone kindly offer some suggestions as to why the
CurrencyManager might not refresh.
I am using the CurrencyManager to navigate through a DataView. I am aware
that there is an issue when adding a new record with using bound CheckBoxes
('http://support.microsoft.com/default.aspx?scid=kb;en-us;326440'). Due to
this problem, I have decided to drop the DataBindings from my controls, clear
the values, and attempt to...
|
by: Rich |
last post by:
Hello,
Following an example at
http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker)
on binding a dataRelation to a Datagridview for sqlClient, I was able to
view rows in datagridview2 that corresponded to a selected row in
datagridview1. Great article/example.
|
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...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
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...
|
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...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
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...
| |