EDIT-IN-PLACE 
Author Message
 EDIT-IN-PLACE

Hello,

I have browser generated as Edit-In-Place with three
columns; these columns are editable but sometimes
I would like to dynamically disable one column, but I don't
know how to do this - I don't know how to adress this column...

Thanks



Sat, 10 Dec 2005 23:40:12 GMT  
 EDIT-IN-PLACE
Hi
Read the Lesson 11 in Learning Clarion. Search around page 155 and you will
find everything you nead here and much more
What you are looking for is the embed point
EditInPlace::PRE:FieldName.TakeEvent priority 7500
Here you can do everything you nead for each field to edit

--
Ole-Morten Heien
HD Software
www.hdsoftware.no

ICQ: 72785878


Quote:

> Hello,

> I have browser generated as Edit-In-Place with three
> columns; these columns are editable but sometimes
> I would like to dynamically disable one column, but I don't
> know how to do this - I don't know how to adress this column...

> Thanks



Sun, 11 Dec 2005 02:40:22 GMT  
 EDIT-IN-PLACE
Try and take a look at the EIP Template from www.audkus.dk

In this template it is just a matter of checking a check box for the column
and it is disabled. If you want to do it dynamically you just place a
criteria in the template that's all.

Steffen


Quote:

> Hello,

> I have browser generated as Edit-In-Place with three
> columns; these columns are editable but sometimes
> I would like to dynamically disable one column, but I don't
> know how to do this - I don't know how to adress this column...

> Thanks



Sun, 11 Dec 2005 03:31:42 GMT  
 EDIT-IN-PLACE
Check the GetEdit method

If
Match(Who(Brwx.q,Self.ListControl{Proplist:FieldNo,Self.Column}),'Prefix:Fie
ld',Match:Nocase)
  If somecondition
   Return 0
 End
End

A template I wrote once to handle conditionalEIP looks like this

#Extension(ConditionalEIP,'Conditionally disable column for
eip1'),Req(BrowseUpdateButtons(ABC))
#Button('Condition'),Multi(%EIPConditions,%EipCondition),Inline
 #Prompt('Condition',Expr),%EipCondition
  #Button('Fields'),Multi(%DisableFields,%DisableField&' - '
&%EnableIt),inline
      #Prompt('Fields',Field),%DisableField
      #Prompt('Enable or Disable',Option),%EnableIt
      #Prompt('Enable',Radio)
      #Prompt('Disable',Radio)
      #Endbutton
#EndBUtton

#At(%BrowserEIPManagerMethodCodeSection,%ActiveTemplateParentInstance,'GetEd
it','(),Byte'),Priority(7500)

If ReturnValue
   Case True
   #For(%EipConditions)
      #For(%DisableFields)
  Of
Match(Who(%ManagerName.q,Self.ListControl{Proplist:FieldNo,Self.Column}),'%D
isableField',Match:Nocase)
       #If(%EnableIt='Enable')
          ReturnValue= Choose(%EipCondition,True,False) !Check condition
       #Else
         ReturnValue= Choose(%EipCondition,False,True) !Check condition
      #EndIf
     #EndFor
   #EndFor
  End!Case
 End!If

#EndAT



Quote:

> Hello,

> I have browser generated as Edit-In-Place with three
> columns; these columns are editable but sometimes
> I would like to dynamically disable one column, but I don't
> know how to do this - I don't know how to adress this column...

> Thanks



Sun, 11 Dec 2005 03:59:54 GMT  
 EDIT-IN-PLACE
Hi all,

Quote:

> I have browser generated as Edit-In-Place with three
> columns; these columns are editable but sometimes
> I would like to dynamically disable one column, but I don't
> know how to do this - I don't know how to adress this column...

  Use the interface and class below, in the InitCotrols method, before the
parent call

   if (Self.Column = column number you want)
     if (condition = disable column)
       Self.IEipBrowse.DisableColumn(column number)
    else
       Self.IEipBrowse.EnableColumn(EIPClass, column number)
    end
   Self.Field = 1
  end

  EIPClass will typically be the class generated by the templates but maybe
any valid EIP class.

    Dennis

include file

IEipBrowse      interface
DisableColumn     procedure(byte colId)
EnableColumn      procedure(EditClass eipCtrl, byte colId)
SetTextColor      procedure(long colId, long ctrlClr)
                end

BrowseEipImpClass
class(BrowseClass),implements(IEipBrowse),module('BrwBase.clw'),type,link('B
rwBase.clw',_ABCLinkMode_),dll(_ABCDllMode_)
                  end

 souurce file

BrowseEipImpClass.IEipBrowse.DisableColumn procedure(byte colId)

  code

  get(Self.Eip.Eq, colId)
  if (errorcode() = noError)
    Self.Eip.Eq.Control &= null
    put(Self.Eip.Eq)
 end

  return

BrowseEipImpClass.IEipBrowse.EnableColumn PROCEDURE(EditClass eipCtrl, byte
colId)

 code

  get(Self.Eip.Eq, colId)
  if (errorcode() = noError)
    Self.Eip.Eq.Control &= eipCtrl
    put(self.Eip.eq)
  end

  return



Sun, 11 Dec 2005 07:39:42 GMT  
 EDIT-IN-PLACE
correction,

  you don'tneed to test for column number,

      if (condition = disable column)
        Self.IEipBrowse.DisableColumn(column number)
     else
        Self.IEipBrowse.EnableColumn(EIPClass, column number)
     end
    Self.Field = 1

 Dennis



Sun, 11 Dec 2005 08:44:31 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. place control in edit in place

2. Edit drop list Edit in place - problem

3. Edit in Place- Combo Box

4. Edit in place

5. Updating Edit in Place

6. Edit in place and dict rules

7. Edit in place - legacy templates

8. Drop Boxes in Edit In Place

9. Edit in Place embedded point

10. Using Edit In Place on a browse for a child file

11. Edit in Place (again ! )

12. Edit in place problem

 

 
Powered by phpBB® Forum Software