We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Add WebBrowser control to DataGridView cell

MasterComputing
on
Medium Priority
2,963 Views
1 Endorsement
Last Modified: 2013-12-16
I'm just cutting my teeth in winforms programming.  Most of my experience is in ASP.NET web programming.  I'm building an application that will display work orders from the website within a winform.  On the web, I use a GridView to display the work order notes (which contain HTML markup).  In the WinForms app, I am trying to use a DataGridView control to display the same info, pulled from the same SQL database.  The DataGridView control spits out raw HTML which is very user un-friendly.  I have yet to figure out how to get the DataGridView to display formatted text.

So... My next idea is to embed a webbrowser control in a cell on each row, and fill that with the HTML.  Is it possible to programatically add a webbrowser control within a cell of a DataGridView?  If not, any other ideas??

Thanks!
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Ulfur: Definitely on the right track.  Now... Any ideas how to add that DataGridViewWebControlCell into an existing databound DataGridView?  I can unbind the data, and do it all manually.  But if you have a quick trick for adding it to an existing row within an existing Grid, you would truly be my hero!

Either way I really appreciate your time and will accept your solution as complete.  If I don't hear back by day's end, I'll close this one out.  Thanks again!

Commented:
Take a look at the code of any of the DataGridView????Cell types in System.Windows.Forms (use ILSpy or Reflector for this.) You will find complete implementations that can guide you.
Have a great weekend!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.