ListView that renders HTML in its items

  • Thread starter Thread starter Sam Martin
  • Start date Start date
S

Sam Martin

Hi all,

I'm looking for a ListView/ListBox control that can render simple HTML
markup when drawing its list items.

Anyone got any ideas?

TIA
Sam Martin
 
Members of the System.Web.UI.WebControls namespace(system.web.dll) does
that.
For example:

System.Web.UI.WebControls.ListBox lb = new
System.Web.UI.WebControls.ListBox();
lb.Items.Add(new System.Web.UI.WebControls.ListItem("text", "value"));
lb.RenderBeginTag(myWriter);
lb.RenderControl(myWriter);
lb.RenderEndTag(myWriter);
 
I don't think that is what the OP means. Basically, I think he wants to
give HTML for some of the items, and have those be displayed in the list.

That kind of support doesn't exist for the listbox control for any
browser, as far as I know. They only allow simple text.

The only thing close to that which I can think of would be the new
composition model in Avalon, which isn't even slated for release for a year
or two (more like two).

Hope this helps.
 
can you think of a way it could be done using ms webbrowser control?

Nicholas Paldino said:
I don't think that is what the OP means. Basically, I think he wants
to give HTML for some of the items, and have those be displayed in the
list.

That kind of support doesn't exist for the listbox control for any
browser, as far as I know. They only allow simple text.

The only thing close to that which I can think of would be the new
composition model in Avalon, which isn't even slated for release for a
year or two (more like two).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Dennis Myrén said:
Members of the System.Web.UI.WebControls namespace(system.web.dll) does
that.
For example:

System.Web.UI.WebControls.ListBox lb = new
System.Web.UI.WebControls.ListBox();
lb.Items.Add(new System.Web.UI.WebControls.ListItem("text", "value"));
lb.RenderBeginTag(myWriter);
lb.RenderControl(myWriter);
lb.RenderEndTag(myWriter);
 
Sam,

The only way I could think of would be to create a listbox using DHTML.
However, just thinking about doing all of that in Javascript makes my head
hurt. I would strongly recommend against it. It just doesn't seem worth it
unless that is your main goal in this product.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Sam Martin said:
can you think of a way it could be done using ms webbrowser control?

Nicholas Paldino said:
I don't think that is what the OP means. Basically, I think he wants
to give HTML for some of the items, and have those be displayed in the
list.

That kind of support doesn't exist for the listbox control for any
browser, as far as I know. They only allow simple text.

The only thing close to that which I can think of would be the new
composition model in Avalon, which isn't even slated for release for a
year or two (more like two).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Dennis Myrén said:
Members of the System.Web.UI.WebControls namespace(system.web.dll) does
that.
For example:

System.Web.UI.WebControls.ListBox lb = new
System.Web.UI.WebControls.ListBox();
lb.Items.Add(new System.Web.UI.WebControls.ListItem("text", "value"));
lb.RenderBeginTag(myWriter);
lb.RenderControl(myWriter);
lb.RenderEndTag(myWriter);


--
Regards,
Dennis JD Myrén
Oslo Kodebureau
Hi all,

I'm looking for a ListView/ListBox control that can render simple HTML
markup when drawing its list items.

Anyone got any ideas?

TIA
Sam Martin
 
i was thinking more about rendering the html in a webcontrol in memory, then
bitblt the image of the control to the item of the list view/box

too much?

Nicholas Paldino said:
Sam,

The only way I could think of would be to create a listbox using DHTML.
However, just thinking about doing all of that in Javascript makes my head
hurt. I would strongly recommend against it. It just doesn't seem worth
it unless that is your main goal in this product.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Sam Martin said:
can you think of a way it could be done using ms webbrowser control?

Nicholas Paldino said:
I don't think that is what the OP means. Basically, I think he wants
to give HTML for some of the items, and have those be displayed in the
list.

That kind of support doesn't exist for the listbox control for any
browser, as far as I know. They only allow simple text.

The only thing close to that which I can think of would be the new
composition model in Avalon, which isn't even slated for release for a
year or two (more like two).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Members of the System.Web.UI.WebControls namespace(system.web.dll) does
that.
For example:

System.Web.UI.WebControls.ListBox lb = new
System.Web.UI.WebControls.ListBox();
lb.Items.Add(new System.Web.UI.WebControls.ListItem("text",
"value"));
lb.RenderBeginTag(myWriter);
lb.RenderControl(myWriter);
lb.RenderEndTag(myWriter);


--
Regards,
Dennis JD Myrén
Oslo Kodebureau
Hi all,

I'm looking for a ListView/ListBox control that can render simple HTML
markup when drawing its list items.

Anyone got any ideas?

TIA
Sam Martin
 
Sam,

A bit. You would have to handle painting at all times. Mouse
movements, scroll movements, keyboard presses, highlights, etc, etc, etc.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Sam Martin said:
i was thinking more about rendering the html in a webcontrol in memory,
then bitblt the image of the control to the item of the list view/box

too much?

Nicholas Paldino said:
Sam,

The only way I could think of would be to create a listbox using
DHTML. However, just thinking about doing all of that in Javascript makes
my head hurt. I would strongly recommend against it. It just doesn't
seem worth it unless that is your main goal in this product.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Sam Martin said:
can you think of a way it could be done using ms webbrowser control?

in message I don't think that is what the OP means. Basically, I think he
wants to give HTML for some of the items, and have those be displayed
in the list.

That kind of support doesn't exist for the listbox control for any
browser, as far as I know. They only allow simple text.

The only thing close to that which I can think of would be the new
composition model in Avalon, which isn't even slated for release for a
year or two (more like two).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Members of the System.Web.UI.WebControls namespace(system.web.dll)
does that.
For example:

System.Web.UI.WebControls.ListBox lb = new
System.Web.UI.WebControls.ListBox();
lb.Items.Add(new System.Web.UI.WebControls.ListItem("text",
"value"));
lb.RenderBeginTag(myWriter);
lb.RenderControl(myWriter);
lb.RenderEndTag(myWriter);


--
Regards,
Dennis JD Myrén
Oslo Kodebureau
Hi all,

I'm looking for a ListView/ListBox control that can render simple
HTML markup when drawing its list items.

Anyone got any ideas?

TIA
Sam Martin
 
Back
Top