试试这样写
- fpSpread1.SubEditorClosed += (s, e)=>{
- var cellvalue = fpSpread1.ActiveSheet.Cells[e.Row, e.Column].Value;
- if(cellvalue is string&& cellvalue.ToString().Length>20)
- {
- fpSpread1.ActiveSheet.Cells[e.Row, e.Column].Value = cellvalue.ToString().Substring(0, 20);
- }
- };
复制代码 |