2012-06-27 15 views

回答

2

您必須添加HTML到您的字符串自己,通過spanstyle標籤 如:

TaskGridView.Rows[i].Cells[j + 2].Text =  
    TaskGridView.Rows[i].Cells[j + 2].Text.Substring(0,firstInd) + 
    "<span style=\"color:salmon\">" + 
    TaskGridView.Rows[i].Cells[j + 2].Text.Substring(firstInd, length) + 
    "</span>" 
+0

在其中的HTML代碼的地方,我要補充這些代碼? – calypso

+0

而不是你以前的那段代碼。 – podiluska

+0

感謝它的工作。 – calypso

相關問題