troubleshooting Question

How to fixed lenth of string in node in treeview in c#?

Avatar of guessdip
guessdip asked on
.NET ProgrammingMicrosoft SharePoint
11 Comments1 Solution482 ViewsLast Modified:
Hii All Experts,
 
  I am using WSS 3.0. and i made some custom web parts in C#. i made Treeview Web parts.

I display Treenode with big String. i have combine 6 columns in parent node. but it looks bad. i just want to fix lentgh
for every column so i can dispay parent node in table grid format.

Like i need to write code if character above 10 then dispay in new line. So is it possible with string function.
i am attaching image and code also..

Let me know if you dont understand my question.

project.Text = "<b> <Font Color=Orange>" + " Projects List =>" + "</font></b>" + "  <b> <Font Color=Green>" + itemdata1["Title"].ToString() + "</font></b>" + "<font color=Red>" + "--" + "</font>" + Phase + "<font color=Red>" + "--" + "</font>" +  State +  "<font color=Red>" + "--" + "</font>" + finaldispstate + "<font color=Red>" + "--" + "</font>" + DisSD + "<font color=Red>" + "--" + "</font>" + DisED + "<font color=Red>" + "--" + "</font>" + PlaSD + "<font color=Red>" + "--" + "</font>" + PlaED + "<font color=Red>" + "--" + "</font>" + DecomSD + "<font color=Red>" + "--" + "</font>" + DecomED + "<font color=Red>" + "--" + "</font>" + RemSD + "<font color=Red>" + "--" + "</font>" + RemED + "<font color=Red>" + "--" + "</font>" + PostSD + "<font color=Red>" + "--" + "</font>" + PostED + "<font color=Red>" + "--" + "</font>" + itemdata["Track"].ToString() + "<font color=Red>" + "--" + "</font>" + itemdata["SubTrack"].ToString() + "<b> <Font Color=Blue>" + "|" + "</b> </Font>" + "<b> <Font Color=Orange>" + "|" + " Scratch =>" + "</font></b>" + "  <b> <Font Color=Green>" + itemdata1["Title"].ToString() + "</font></b>" + "<font color=Red>" + "--" + "</font>" + itemdata1["Phase"].ToString() + "<font color=Red>" + "--" + "</font>" + itemdata1["State"].ToString() + "<font color=Red>" + "--" + "</font>" + itemdata1["FinalDispState"].ToString() + "<font color=Red>" + "--" + "</font>" + itemdata1["Track"].ToString() + "<font color=Red>" + "--" + "</font>" + itemdata1["SubTrack"].ToString();
ASKER CERTIFIED SOLUTION
MsShadow

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros