473,396 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ExecCommand and DHTMLEDLib.DEInsertTableParamClass

dd
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.DEInsertTableParamClass oTableParam = new
DHTMLEDLib.DEInsertTableParamClass();
oTableParam.NumCols = 3;
oTableParam.NumRows = 3;
oTableParam.TableAttrs = "align=\"left\" border=\"1\" width=\"100%\"";
ctlEdit.ExecCommand(DHTMLEDLib.DHTMLEDITCMDID.DECM D_INSERTTABLE,
DHTMLEDLib.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref oTableParam);

The problem is that this method expects ref object as a parameter where I
use oTableParam. But oTableParam is actually DEInsertTableParamClass. 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?
Jul 19 '05 #1
1 2539
How about keeping oTableParam as is, but then:

object oOther = oTableParam;
ctlEdit.ExecCommand(
DHTMLEDLib.DHTMLEDITCMDID.DECMD_INSERTTABLE,
DHTMLEDLib.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT,
ref oOther);

--
John Saunders
Internet Engineer
jo***********@surfcontrol.com

"dd" <so*****@somewhere.com> wrote in message
news:yk*******************@news20.bellglobal.com.. .
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.DEInsertTableParamClass oTableParam = new
DHTMLEDLib.DEInsertTableParamClass();
oTableParam.NumCols = 3;
oTableParam.NumRows = 3;
oTableParam.TableAttrs = "align=\"left\" border=\"1\" width=\"100%\"";
ctlEdit.ExecCommand(DHTMLEDLib.DHTMLEDITCMDID.DECM D_INSERTTABLE,
DHTMLEDLib.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref oTableParam);

The problem is that this method expects ref object as a parameter where I
use oTableParam. But oTableParam is actually DEInsertTableParamClass. 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?

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: E J | last post by:
Does anyone know of a way to wrap custom tags around selected text using execCommand or otherwise? I am developing a rich text editor for use in a web site and while there are a few decent ones...
3
by: Patrick S | last post by:
I am using IE 6.0. On a page, I have placed a contenteditable div which I want to use as a Rich Text Area. I am using the execCommand method of the document to control bold, italics,...
2
by: Rafal Konopka | last post by:
I've read MS documentation, I've searched the discussion threads, I cannot invoke the SaveAs command from a web page. I tried <a href="javascript:window.execCommand(\"SaveAs\");"><click here</a>...
4
by: am75 | last post by:
Hi everybody, I'm developing web pages for content management using iframes, through which users can edit html portions... I found execCommand to apply simple formats (bold, italic...) to text....
1
by: dd | last post by:
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...
0
by: SAL | last post by:
Below is my javaScript function that I am having trouble with. When I set the bUserInterface parameter to FALSE in the follow statement, "document.execCommand("CreateLink","false", oSource)", the...
23
by: abdalimohd | last post by:
hi all, i m developing an html editor for my web page since i cannot trace out the enter key press for the available html editors for asp.net app. now i have done everything that i need with this...
6
by: mrobinson86 | last post by:
Hey guys, wondered if anybody could help me out with a pretty simple piece of code that has been driving me crazy for the past few days? I am trying to create a client side self sustaining message...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.