ListBox Item Style Change at runtime.

Posted by Kanje_Ravi under ASP.NET on 8/11/2014 | Points: 10 | Views : 441 | Status : [Member] | Replies : 3
Hi Friends,


I have a requirement related to Asp.NET LisBox.


I am displaying the items in listbox as follows..

UserFullName(Domain\UserId)

examples : Ravindra(Corp\Ravi.k)
Rahul Mehta (SIP\rahul.m)
etc etc...


Now my requirement is to display userFullName in bold and remaining text normal.
Currently i am trying to implement it in listbox i am not able to get it.

I have tried doing it in ListView Control, it will work but problem is it won't give listbox feature like multiselect.

Please help me how to implement this task.

Thanks in Advance,

Ravindra M K

Thanks & Regards,
Ravindra M
(Success Always Depends on Dedication & Commitment)



Responses

Posted by: Bandi on: 8/11/2014 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer
http://stackoverflow.com/questions/7506762/asp-net-change-color-of-listbox-items

In the same way try to get userfullName part ( before ( value) and then apply bold style

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Kanje_Ravi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Manimaddu on: 8/11/2014 [Member] Starter | Points: 25

Up
0
Down
Hi..
Refer below link..
http://www.codeproject.com/Questions/345770/list-box-items-text-color

Thanks & Regards,
Mani Kumar

Kanje_Ravi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kanje_Ravi on: 8/11/2014 [Member] Starter | Points: 25

Up
0
Down
Hello Manimaddu,

Thanks for the link,

My requirement is to change the color of part of the item, not the entire item in a listbox..

ex : UserFullName(Domain\UserId) is my list item. here i need to split item based on '(' and then i want to apply bold to UserFullName and remaining content of this item must be normal.


Hello Bandi,

Thanks for the link, i tried it but couldn't implement as per my requirement..



Thanks & Regards,
Ravindra M
(Success Always Depends on Dedication & Commitment)

Kanje_Ravi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response