How to change current line with code

Thanks Jose.
This worked perfectly.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, October 14, 2015 11:34 AM
To: Vantage <vantage@yahoogroups.com>
Subject: Re: [Vantage] RE: How to change current line with code


If you just want to change the currently selected row? You can use the EpiDataView
EpiDataView edv = oTrans.Factory("MyDataView");
int i = 4; // new Row
edv.RaiseRowChanged(i,edv.Row);
edv.Notify(new EpiNotifyArgs(oTrans, i, EpiTransaction.NotifyType.Initialize));
edv.Notify(new EpiNotifyArgs(oTrans, i, edv.Column));


Jose C Gomez
Software Engineer

T: 904.469.1524 mobile
E: jose@...<mailto:jose@...>
http://www.josecgomez.com
[Image removed by sender.]<http://www.linkedin.com/in/josecgomez> [Image removed by sender.] <http://www.facebook.com/josegomez> [Image removed by sender.] <http://www.google.com/profiles/jose.gomez> [Image removed by sender.] <http://www.twitter.com/joc85> [Image removed by sender.] <http://www.josecgomez.com/professional-resume/> [Image removed by sender.] <http://www.josecgomez.com/feed/>

Quis custodiet ipsos custodes?

On Wed, Oct 14, 2015 at 10:09 AM, Joe Englert englertj@...<mailto:englertj@...> [vantage] <vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>> wrote:


I think you could do this in V9 by setting the grid's ActiveRow property. Maybe in V10?

From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>]
Sent: Wednesday, October 14, 2015 9:19 AM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com><mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>>
Subject: [Vantage] RE: How to change current line with code

Forgot to mention that I am on E10.0.700.4

[cid:076976.png@59439d20.4e8cef5e]

Joe Rojas
Director of Information Technology
(781) 408-9278<tel:%28781%29%20408-9278> Mobile
(781) 573-0291<tel:%28781%29%20573-0291> Local
(781) 232-5191<tel:%28781%29%20232-5191> Fax

[http://matsinc.com/images/e-mail-signatures/tagline.jpg%5d
[http://matsinc.com/images/e-mail-signatures/graphics/logo_matsinc.png%5d<http://matsinc.com> [http://matsinc.com/images/e-mail-signatures/graphics/icon_twitter.png%5d <http://twitter.com/Mats_Inc> [http://matsinc.com/images/e-mail-signatures/graphics/icon_facebook.png%5d <http://www.facebook.com/commercial.flooring> [http://matsinc.com/images/e-mail-signatures/graphics/icon_youtube.png%5d <http://www.youtube.com/user/MatsIncTV> [http://matsinc.com/images/e-mail-signatures/graphics/icon_pinterest.png%5d <http://www.pinterest.com/contractfloors/> [http://matsinc.com/images/e-mail-signatures/graphics/icon_blog.png%5d <http://matsinc.com/blog>

From: Joe Rojas
Sent: Wednesday, October 14, 2015 9:18 AM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: How to change current line with code

Hi All,

I have a scenario where I want to change the current (active) line of a PO.
For example, the PO has 4 lines and the user is on line 1.
Under certain conditions, I want to change the current line from line 1 to line 3 and have this reflected on the UI.

Any tips on how to code this?

Thanks.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]
Hi All,

I have a scenario where I want to change the current (active) line of a PO.
For example, the PO has 4 lines and the user is on line 1.
Under certain conditions, I want to change the current line from line 1 to line 3 and have this reflected on the UI.

Any tips on how to code this?

Thanks.



[cid:844dd9.png@e8a4ce68.45880ad2]


Joe Rojas
Director of Information Technology
(781) 408-9278 Mobile
(781) 573-0291 Local
(781) 232-5191 Fax


[http://matsinc.com/images/e-mail-signatures/tagline.jpg%5d
[http://matsinc.com/images/e-mail-signatures/graphics/logo_matsinc.png%5d<http://matsinc.com> [http://matsinc.com/images/e-mail-signatures/graphics/icon_twitter.png%5d <http://twitter.com/Mats_Inc> [http://matsinc.com/images/e-mail-signatures/graphics/icon_facebook.png%5d <http://www.facebook.com/commercial.flooring> [http://matsinc.com/images/e-mail-signatures/graphics/icon_youtube.png%5d <http://www.youtube.com/user/MatsIncTV> [http://matsinc.com/images/e-mail-signatures/graphics/icon_pinterest.png%5d <http://www.pinterest.com/contractfloors/> [http://matsinc.com/images/e-mail-signatures/graphics/icon_blog.png%5d <http://matsinc.com/blog>



[Non-text portions of this message have been removed]
Hi All,

E10.0.700.4

I have a scenario where I want to change the current (active) line of a PO.
For example, the PO has 4 lines and the user is on line 1.
Under certain conditions, I want to change the current line from line 1 to line 3 and have this reflected on the UI.

Any tips on how to code this?

Thanks.



[cid:5699d8.png@4d38f15c.45a8fc63]


Joe Rojas
Director of Information Technology
(781) 408-9278 Mobile
(781) 573-0291 Local
(781) 232-5191 Fax


[http://matsinc.com/images/e-mail-signatures/tagline.jpg%5d
[http://matsinc.com/images/e-mail-signatures/graphics/logo_matsinc.png%5d<http://matsinc.com> [http://matsinc.com/images/e-mail-signatures/graphics/icon_twitter.png%5d <http://twitter.com/Mats_Inc> [http://matsinc.com/images/e-mail-signatures/graphics/icon_facebook.png%5d <http://www.facebook.com/commercial.flooring> [http://matsinc.com/images/e-mail-signatures/graphics/icon_youtube.png%5d <http://www.youtube.com/user/MatsIncTV> [http://matsinc.com/images/e-mail-signatures/graphics/icon_pinterest.png%5d <http://www.pinterest.com/contractfloors/> [http://matsinc.com/images/e-mail-signatures/graphics/icon_blog.png%5d <http://matsinc.com/blog>



[Non-text portions of this message have been removed]
Forgot to mention that I am on E10.0.700.4


[cid:076976.png@59439d20.4e8cef5e]


Joe Rojas
Director of Information Technology
(781) 408-9278 Mobile
(781) 573-0291 Local
(781) 232-5191 Fax


[http://matsinc.com/images/e-mail-signatures/tagline.jpg%5d
[http://matsinc.com/images/e-mail-signatures/graphics/logo_matsinc.png%5d<http://matsinc.com> [http://matsinc.com/images/e-mail-signatures/graphics/icon_twitter.png%5d <http://twitter.com/Mats_Inc> [http://matsinc.com/images/e-mail-signatures/graphics/icon_facebook.png%5d <http://www.facebook.com/commercial.flooring> [http://matsinc.com/images/e-mail-signatures/graphics/icon_youtube.png%5d <http://www.youtube.com/user/MatsIncTV> [http://matsinc.com/images/e-mail-signatures/graphics/icon_pinterest.png%5d <http://www.pinterest.com/contractfloors/> [http://matsinc.com/images/e-mail-signatures/graphics/icon_blog.png%5d <http://matsinc.com/blog>

From: Joe Rojas
Sent: Wednesday, October 14, 2015 9:18 AM
To: vantage@yahoogroups.com
Subject: How to change current line with code

Hi All,

I have a scenario where I want to change the current (active) line of a PO.
For example, the PO has 4 lines and the user is on line 1.
Under certain conditions, I want to change the current line from line 1 to line 3 and have this reflected on the UI.

Any tips on how to code this?

Thanks.




[Non-text portions of this message have been removed]
I think you could do this in V9 by setting the grid's ActiveRow property. Maybe in V10?

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, October 14, 2015 9:19 AM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: [Vantage] RE: How to change current line with code



Forgot to mention that I am on E10.0.700.4


[cid:076976.png@59439d20.4e8cef5e]


Joe Rojas
Director of Information Technology
(781) 408-9278 Mobile
(781) 573-0291 Local
(781) 232-5191 Fax


[http://matsinc.com/images/e-mail-signatures/tagline.jpg%5d
[http://matsinc.com/images/e-mail-signatures/graphics/logo_matsinc.png%5d<http://matsinc.com> [http://matsinc.com/images/e-mail-signatures/graphics/icon_twitter.png%5d <http://twitter.com/Mats_Inc> [http://matsinc.com/images/e-mail-signatures/graphics/icon_facebook.png%5d <http://www.facebook.com/commercial.flooring> [http://matsinc.com/images/e-mail-signatures/graphics/icon_youtube.png%5d <http://www.youtube.com/user/MatsIncTV> [http://matsinc.com/images/e-mail-signatures/graphics/icon_pinterest.png%5d <http://www.pinterest.com/contractfloors/> [http://matsinc.com/images/e-mail-signatures/graphics/icon_blog.png%5d <http://matsinc.com/blog>

From: Joe Rojas
Sent: Wednesday, October 14, 2015 9:18 AM
To: vantage@yahoogroups.com
Subject: How to change current line with code

Hi All,

I have a scenario where I want to change the current (active) line of a PO.
For example, the PO has 4 lines and the user is on line 1.
Under certain conditions, I want to change the current line from line 1 to line 3 and have this reflected on the UI.

Any tips on how to code this?

Thanks.



[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]
If you just want to change the currently selected row? You can use the EpiDataView
EpiDataView edv = oTrans.Factory("MyDataView");
int i = 4; // new Row
edv.RaiseRowChanged(i,edv.Row);
edv.Notify(new EpiNotifyArgs(oTrans, i, EpiTransaction.NotifyType.Initialize));
edv.Notify(new EpiNotifyArgs(oTrans, i, edv.Column));


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, Oct 14, 2015 at 10:09 AM, Joe Englert englertj@... [vantage] <vantage@yahoogroups.com> wrote:
Â
<div>
  
  
  <p>I think you could do this in V9  by setting the grid&#39;s ActiveRow property.  Maybe in V10?<br>

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, October 14, 2015 9:19 AM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: [Vantage] RE: How to change current line with code

Forgot to mention that I am on E10.0.700.4

[cid:076976.png@59439d20.4e8cef5e]

Joe Rojas
Director of Information Technology
(781) 408-9278 Mobile
(781) 573-0291 Local
(781) 232-5191 Fax

[http://matsinc.com/images/e-mail-signatures/tagline.jpg]
[http://matsinc.com/images/e-mail-signatures/graphics/logo_matsinc.png]<http://matsinc.com> [http://matsinc.com/images/e-mail-signatures/graphics/icon_twitter.png] <http://twitter.com/Mats_Inc> [http://matsinc.com/images/e-mail-signatures/graphics/icon_facebook.png] <http://www.facebook.com/commercial.flooring> [http://matsinc.com/images/e-mail-signatures/graphics/icon_youtube.png] <http://www.youtube.com/user/MatsIncTV> [http://matsinc.com/images/e-mail-signatures/graphics/icon_pinterest.png] <http://www.pinterest.com/contractfloors/> [http://matsinc.com/images/e-mail-signatures/graphics/icon_blog.png] <http://matsinc.com/blog>

From: Joe Rojas
Sent: Wednesday, October 14, 2015 9:18 AM
To: vantage@yahoogroups.com
Subject: How to change current line with code

Hi All,

I have a scenario where I want to change the current (active) line of a PO.
For example, the PO has 4 lines and the user is on line 1.
Under certain conditions, I want to change the current line from line 1 to line 3 and have this reflected on the UI.

Any tips on how to code this?

Thanks.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

</div>
 


<div style="color:#fff;min-height:0;"></div>

Jose

Great code.  If there have been changes to the edv current row, will they be saved to the db?

Also what is the difference between
EpiDataView edv = oTrans.Factory("MyDataView");
and
EpiDataView edv = (EpiDataView)this.oTrans.EpiDataViews("MyDataView");

Thanks in advance

Dan Sirow
Independent Components Corp.

call oTrans.Update() first. But generally yes there are triggers on ChangeRow that call update automatically.

There isn't any difference in the result between the factory method and the other method

Its basically a wrapper around doing the same thing (a shortcut)


In object-oriented programming (OOP), a factory is an object for creating other objects – formally a factory is simply an object that returns an object from some method call, which is assumed to be "new".[a] More broadly, a subroutine that returns a "new" object may be referred to as a "factory", as in factory method or factory function. This is a basic concept in OOP, and forms the basis for a number of related software design patterns.
In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory method—either specified in an interface and implemented by child classes, or implemented in a base class and optionally overridden by derived classes—rather than by calling a constructor.

Here's what oTrans.Factory actually does

public EpiDataView Factory(string Table)
{
  EpiDataView view = null;
  if (((Table != null) && (this.colEpiDataViews != null)) && this.colEpiDataViews.Contains(Table))
  {
    view = (EpiDataView) this.colEpiDataViews[Table];
  }
  return view;
}



Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, Oct 14, 2015 at 12:44 PM, dansirow@... [vantage] <vantage@yahoogroups.com> wrote:
Â
<div>
  
  
  <p>Jose</p><div><br></div><div>Great code.  If there have been changes to the edv current row, will they be saved to the db?</div><div><br></div><div>Also what is the difference between</div><span><div><span style="color:rgb(63,63,63);font-family:verdana, sans-serif;">EpiDataView edv = oTrans.Factory(&quot;MyDataView&quot;);</span><br></div></span><div>and</div><div><span style="color:rgb(63,63,63);font-family:verdana, sans-serif;">EpiDataView edv = (EpiDataView)this.oTrans.EpiDataViews(&quot;MyDataView&quot;);</span><br></div><div><span style="color:rgb(63,63,63);font-family:verdana, sans-serif;"><br></span></div><div><span style="color:rgb(63,63,63);font-family:verdana, sans-serif;">Thanks in advance</span></div><div><span style="color:rgb(63,63,63);font-family:verdana, sans-serif;"><br></span></div><div><span style="color:rgb(63,63,63);font-family:verdana, sans-serif;">Dan Sirow</span></div><div><span style="color:rgb(63,63,63);font-family:verdana, sans-serif;">Independent Components Corp.</span></div><div><br></div><p></p>

</div>
 


<div style="color:rgb(255,255,255);min-height:0px;"></div>