473,385 Members | 1,392 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,385 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 2537
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.