本帖最后由 afei_liuge 于 2023-9-11 17:30 编辑
当 表左右滑动滚动条时,1、在没有选中行情况,table 前两行数据滑动存在延迟。 2、当有选择行,后又取消的情况 时 (因为取消时行的边框还在),则原选中行 会延迟。
如下图:
* 设置这个: this.fpSpreadSheet.OperationMode = FarPoint.Win.Spread.OperationMode.ExtendedSelect;
this.fpSpreadSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.MultiRange;
this.fpSpreadSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Row;
public static DataTable GetProducts(int num)
{
DataTable dt = new DataTable();
dt.Columns.Add(new DataColumn("id", typeof(int)));
dt.Columns.Add(new DataColumn("country", typeof(string)));
dt.Columns.Add(new DataColumn("product", typeof(string)));
dt.Columns.Add(new DataColumn("date", typeof(DateTime)));
dt.Columns.Add(new DataColumn("price", typeof(int)));
dt.Columns.Add(new DataColumn("count", typeof(Int64)));
dt.Columns.Add(new DataColumn("note", typeof(string)));
dt.Columns.Add(new DataColumn("note2", typeof(string)));
dt.Columns.Add(new DataColumn("note3note3note3", typeof(string)));
dt.Columns.Add(new DataColumn("note4", typeof(string)));
dt.Columns.Add(new DataColumn("note5", typeof(string)));
dt.Columns.Add(new DataColumn("note6note6note6", typeof(string)));
dt.Columns.Add(new DataColumn("note7", typeof(string)));
dt.Columns.Add(new DataColumn("note8", typeof(string)));
dt.Columns.Add(new DataColumn("note9", typeof(string)));
dt.Columns.Add(new DataColumn("note10", typeof(string)));
dt.Columns.Add(new DataColumn("note12note12note12", typeof(string)));
dt.Columns.Add(new DataColumn("note13", typeof(string)));
dt.Columns.Add(new DataColumn("note14", typeof(string)));
dt.Columns.Add(new DataColumn("note15", typeof(string)));
dt.Columns.Add(new DataColumn("note16", typeof(string)));
dt.Columns.Add(new DataColumn("note17", typeof(string)));
dt.Columns.Add(new DataColumn("note18note18note18", typeof(string)));
dt.Columns.Add(new DataColumn("note19", typeof(string)));
dt.Columns.Add(new DataColumn("note20", typeof(string)));
dt.Columns.Add(new DataColumn("note22", typeof(string)));
dt.Columns.Add(new DataColumn("note23", typeof(string)));
dt.Columns.Add(new DataColumn("note24", typeof(string)));
dt.Columns.Add(new DataColumn("note25", typeof(string)));
dt.Columns.Add(new DataColumn("note26", typeof(string)));
dt.Columns.Add(new DataColumn("note27", typeof(string)));
dt.Columns.Add(new DataColumn("note28", typeof(string)));
dt.Columns.Add(new DataColumn("note29", typeof(string)));
Random r = new Random();
string df = new RandomStringBuilder().Create(r.Next(2000, 2000));
for (int i = 0; i < num; i++)
{
dt.Rows.Add(
i,
country[r.Next(3)],
product[r.Next(3)],
DateTime.Now.AddDays(r.Next(1000) - 1000),
r.Next(10, 100),
2147744597,//r.Next(100000, 100009),
df,
"note2note18note18note18note18note18",
"这里是测试的列",
"4567",
"note5note5 note5",
"note6",
"no里e7noten otenotenote",
"这里是测试的列",
"567 676575",
"note12",
"note13no tenote",
"note14noten otenotenotenotenote",
"6442.32",
"note16",
"测试的列",
"note18note18note18",
"456745675",
"468546",
"not sdfe23",
"note24no te23note23",
"note25",
"nosdfadte26not e25note25",
"note27",
"note28not e28note28",
"note29no te28note28"
);
}
dt.Rows.Add(
null,
null,
null,
null,
null,
null,//r.Next(100000, 100009),
null,
null,
null
);
return dt;
}
|
|