Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / November 2004



Tip: Looking for answers? Try searching our database.

Dispalying Exported HTML from an MSFlexGrid

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
charles@home.com - 28 Nov 2004 15:32 GMT
I want to export a table in HTML from my
MSFlexGrid which I might save to a text file.
The file structure is simple and will display in any browser.

However I would like to know if I can 'export'
the text then build and display an HTML page
without saving the data to disk...i.e.....can I display
the HTML directly from say a text box and / or , can I call
the default browser and 'pass' the html directly to it.

Thanks

CharlesW
Randy Day - 28 Nov 2004 16:09 GMT
> I want to export a table in HTML from my
> MSFlexGrid which I might save to a text file.
> The file structure is simple and will display in any browser.

That shouldn't be too hard; just write a sub to read
each cell of the grid into a string, inserting the
appropriate tags in between. It might be a bit finicky
to get exactly right, but it's not technically difficult.

Then you can put it anywhere the browser can read it...

> However I would like to know if I can 'export'
> the text then build and display an HTML page
> without saving the data to disk...i.e.....can I display
> the HTML directly from say a text box and / or , can I call
> the default browser and 'pass' the html directly to it.

This, I think, would be the difficult part. I'm pretty
sure browsers can only look for _files_, be they local
or remote.

Unless you build your own *browser, of course!  :)

> Thanks
>
> CharlesW
Martin Trump - 28 Nov 2004 17:03 GMT
>That shouldn't be too hard; just write a sub to read
>each cell of the grid into a string, inserting the
>appropriate tags in between. It might be a bit finicky
>to get exactly right, but it's not technically difficult.

A minor point. It might (or not) apply in this case. I did a similar job
recently and used a text HTML template. That was the HTML page but with
all the variable data replaced by asterisks. Much easier to do than
write code in VB to do it.

Read in the template line-by-line and check each for asterisk(s) and do
a Replace(...) for each asterisk consecutively with the required data.

Regards

Signature

Martin Trump

charles@home.com - 29 Nov 2004 09:36 GMT
Thanks for your help and suggestions...
creating the HTML is not really the problem.

I have added a form with a web browser on it (so I do
have some control.)

The webBrowser has some methods and properties.

Can I get my browser to display the HTML in one of my
'containers'. For example: can I add something similar an RTFBox
which might be called say an HTMLBox and get the browser
to display it.

Thanks,

CharlesW

> >That shouldn't be too hard; just write a sub to read
> >each cell of the grid into a string, inserting the
[quoted text clipped - 10 lines]
>
> Regards
charles@home.com - 29 Nov 2004 22:46 GMT
I found an example of exactly the kind of thing
I need.

It allows you to set the contents of an HTML page to be displayed,
from code which could be generated within any VB app.

It might be use to someone else so I added the URL

http://www.vb-helper.com/howto_set_webbrowser_contents.html

CharlesW

> Thanks for your help and suggestions...
> creating the HTML is not really the problem.
[quoted text clipped - 27 lines]
> >
> > Regards
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.