cell(1,1).text = "爱\r\n情"
string str = f.ListGrid.Cell(1, 1).Text;
string str1, str2;
str1 = str.Substring(0, 1);
str2 = str.Substring(1, 1);
cell(2,2).Text = str1 + str2; //希望此单元格的文字恢复成"爱情",水平依次排列
如何取到第2个字符"情"呢?
string str = f.ListGrid.Cell(1, 1).Text;
string str1, str2;
str1 = str.Substring(0, 1);
str2 = str.Substring(1, 1);
cell(2,2).Text = str1 + str2; //希望此单元格的文字恢复成"爱情",水平依次排列
如何取到第2个字符"情"呢?
string str = f.ListGrid.Cell(1, 1).Text.Replace("\r\n","");
str1 = str.Substring(1, 1);
string str = f.ListGrid.Cell(1, 1).Text.Replace("\r\n","");
然后截取
str1 = str.Substring(1, 1);