ExecCommand and DHTMLEDLib.DEInsertTableParamClass

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dd

    ExecCommand and DHTMLEDLib.DEInsertTableParamClass

    Cannot figure it out. If somebody can help, I'd appreciate it.
    I am using DHTML Edit control from C# for editing HTML pages. I am trying to
    insert a table into an HTML page and I keep getting an error. Here is the
    code:
    DHTMLEDLib.DEIn sertTableParamC lass oTableParam = new
    DHTMLEDLib.DEIn sertTableParamC lass();
    oTableParam.Num Cols = 3;
    oTableParam.Num Rows = 3;
    oTableParam.Tab leAttrs = "align=\"le ft\" border=\"1\" width=\"100%\"" ;
    ctlEdit.ExecCom mand(DHTMLEDLib .DHTMLEDITCMDID .DECMD_INSERTTA BLE,
    DHTMLEDLib.OLEC MDEXECOPT.OLECM DEXECOPT_DODEFA ULT, ref oTableParam);

    The problem is that this method expects ref object as a parameter where I
    use oTableParam. But oTableParam is actually DEInsertTablePa ramClass. This
    does not compile. When I used this

    object oTableParam = null; //or object oTableParam = "";
    It compiles but gives an exception.

    Casting an object to oTableParam does not work either.

    Does anyone know how to overcome this?


  • John Saunders

    #2
    Re: ExecCommand and DHTMLEDLib.DEIn sertTableParamC lass

    How about keeping oTableParam as is, but then:

    object oOther = oTableParam;
    ctlEdit.ExecCom mand(
    DHTMLEDLib.DHTM LEDITCMDID.DECM D_INSERTTABLE,
    DHTMLEDLib.OLEC MDEXECOPT.OLECM DEXECOPT_DODEFA ULT,
    ref oOther);

    --
    John Saunders
    Internet Engineer
    john.saunders@s urfcontrol.com

    "dd" <someone@somewh ere.com> wrote in message
    news:ykwVa.3171 $Cx4.478083@new s20.bellglobal. com...[color=blue]
    > Cannot figure it out. If somebody can help, I'd appreciate it.
    > I am using DHTML Edit control from C# for editing HTML pages. I am trying[/color]
    to[color=blue]
    > insert a table into an HTML page and I keep getting an error. Here is the
    > code:
    > DHTMLEDLib.DEIn sertTableParamC lass oTableParam = new
    > DHTMLEDLib.DEIn sertTableParamC lass();
    > oTableParam.Num Cols = 3;
    > oTableParam.Num Rows = 3;
    > oTableParam.Tab leAttrs = "align=\"le ft\" border=\"1\" width=\"100%\"" ;
    > ctlEdit.ExecCom mand(DHTMLEDLib .DHTMLEDITCMDID .DECMD_INSERTTA BLE,
    > DHTMLEDLib.OLEC MDEXECOPT.OLECM DEXECOPT_DODEFA ULT, ref oTableParam);
    >
    > The problem is that this method expects ref object as a parameter where I
    > use oTableParam. But oTableParam is actually DEInsertTablePa ramClass. This
    > does not compile. When I used this
    >
    > object oTableParam = null; //or object oTableParam = "";
    > It compiles but gives an exception.
    >
    > Casting an object to oTableParam does not work either.
    >
    > Does anyone know how to overcome this?
    >
    >[/color]


    Comment

    • John Saunders

      #3
      Re: ExecCommand and DHTMLEDLib.DEIn sertTableParamC lass

      How about keeping oTableParam as is, but then:

      object oOther = oTableParam;
      ctlEdit.ExecCom mand(
      DHTMLEDLib.DHTM LEDITCMDID.DECM D_INSERTTABLE,
      DHTMLEDLib.OLEC MDEXECOPT.OLECM DEXECOPT_DODEFA ULT,
      ref oOther);

      --
      John Saunders
      Internet Engineer
      john.saunders@s urfcontrol.com

      "dd" <someone@somewh ere.com> wrote in message
      news:ykwVa.3171 $Cx4.478083@new s20.bellglobal. com...[color=blue]
      > Cannot figure it out. If somebody can help, I'd appreciate it.
      > I am using DHTML Edit control from C# for editing HTML pages. I am trying[/color]
      to[color=blue]
      > insert a table into an HTML page and I keep getting an error. Here is the
      > code:
      > DHTMLEDLib.DEIn sertTableParamC lass oTableParam = new
      > DHTMLEDLib.DEIn sertTableParamC lass();
      > oTableParam.Num Cols = 3;
      > oTableParam.Num Rows = 3;
      > oTableParam.Tab leAttrs = "align=\"le ft\" border=\"1\" width=\"100%\"" ;
      > ctlEdit.ExecCom mand(DHTMLEDLib .DHTMLEDITCMDID .DECMD_INSERTTA BLE,
      > DHTMLEDLib.OLEC MDEXECOPT.OLECM DEXECOPT_DODEFA ULT, ref oTableParam);
      >
      > The problem is that this method expects ref object as a parameter where I
      > use oTableParam. But oTableParam is actually DEInsertTablePa ramClass. This
      > does not compile. When I used this
      >
      > object oTableParam = null; //or object oTableParam = "";
      > It compiles but gives an exception.
      >
      > Casting an object to oTableParam does not work either.
      >
      > Does anyone know how to overcome this?
      >
      >[/color]


      Comment

      Working...