Dynamically canging the read only status of a control

There is also a wizard that will generate the sample code for you to modify the extended properties.

Carson


--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> The read-only is not generally on the control but on the dataView
> edvQuoteHed.dataView.Table.Columns("Number01").ExtendedProperties("ReadOnly"
> ) = "True"
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Thu, Dec 20, 2012 at 3:52 AM, nbuckman@... <
> nbuckman@...> wrote:
>
> > **
> >
> >
> >
> > Hello,
> >
> > the C# code below is not working. Can anyone easily see where I have gone
> > wrong?
> >
> > private void edvOrderDtl_EpiViewNotification(EpiDataView view,
> > EpiNotifyArgs args)
> > {
> > // ** Argument Properties and Uses **
> > // view.dataView[args.Row]["FieldName"]
> > // args.Row, args.Column, args.Sender, args.NotifyType
> > // NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow,
> > NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
> >
> > if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
> > {
> > if ((args.Row > -1))
> > {
> > EpiDataView edvOrderDtl =
> > ((EpiDataView)(this.oTrans.EpiDataViews["OrderDtl"]));
> > System.Data.DataRow edvOrderDtlRow = edvOrderDtl.CurrentDataRow;
> >
> > EpiNumericEditor numKitDisc = default(EpiNumericEditor);
> > numKitDisc =
> > (EpiNumericEditor)csm.GetNativeControlReference("7dd65656-d0e5-4d85-840f-a7ad2cd5b67d");
> >
> > if (edvOrderDtlRow["KitFlag"] == "P")
> > {
> > numKitDisc.ReadOnly = false;
> > }
> > else
> > {
> > numKitDisc.ReadOnly = true;
> > }
> > }
> > }
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Hello,

the C# code below is not working. Can anyone easily see where I have gone wrong?


private void edvOrderDtl_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// ** Argument Properties and Uses **
// view.dataView[args.Row]["FieldName"]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes

if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
{
if ((args.Row > -1))
{
EpiDataView edvOrderDtl = ((EpiDataView)(this.oTrans.EpiDataViews["OrderDtl"]));
System.Data.DataRow edvOrderDtlRow = edvOrderDtl.CurrentDataRow;

EpiNumericEditor numKitDisc = default(EpiNumericEditor);
numKitDisc = (EpiNumericEditor)csm.GetNativeControlReference("7dd65656-d0e5-4d85-840f-a7ad2cd5b67d");

if (edvOrderDtlRow["KitFlag"] == "P")
{
numKitDisc.ReadOnly = false;
}
else
{
numKitDisc.ReadOnly = true;
}
}
}
The read-only is not generally on the control but on the dataView
edvQuoteHed.dataView.Table.Columns("Number01").ExtendedProperties("ReadOnly"
) = "True"


*Jose C Gomez*
*Software Engineer*
*
*
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Dec 20, 2012 at 3:52 AM, nbuckman@... <
nbuckman@...> wrote:

> **
>
>
>
> Hello,
>
> the C# code below is not working. Can anyone easily see where I have gone
> wrong?
>
> private void edvOrderDtl_EpiViewNotification(EpiDataView view,
> EpiNotifyArgs args)
> {
> // ** Argument Properties and Uses **
> // view.dataView[args.Row]["FieldName"]
> // args.Row, args.Column, args.Sender, args.NotifyType
> // NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow,
> NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
>
> if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
> {
> if ((args.Row > -1))
> {
> EpiDataView edvOrderDtl =
> ((EpiDataView)(this.oTrans.EpiDataViews["OrderDtl"]));
> System.Data.DataRow edvOrderDtlRow = edvOrderDtl.CurrentDataRow;
>
> EpiNumericEditor numKitDisc = default(EpiNumericEditor);
> numKitDisc =
> (EpiNumericEditor)csm.GetNativeControlReference("7dd65656-d0e5-4d85-840f-a7ad2cd5b67d");
>
> if (edvOrderDtlRow["KitFlag"] == "P")
> {
> numKitDisc.ReadOnly = false;
> }
> else
> {
> numKitDisc.ReadOnly = true;
> }
> }
> }
>
>
>


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