Random r = new Random();
int i, j;
DialogResult dlg;
bool b;
for (i = 0; i <= 200; i++)
{
for (j = 0; j<=3; j++)
fpSpread1.ActiveSheet.SetValue(i, j, r.Next().ToString());
}
fpSpread1.ActiveSheet.SetColumnShowSortIndicator(0, 4, false);
fpSpread1.ActiveSheet.AutoSortColumn(0);
dlg = MessageBox.Show("Do you want to see the sort indicator?", "SetColumnShowSortIndicator", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
fpSpread1.ActiveSheet.SetColumnShowSortIndicator(0, 4, true);
fpSpread1.ActiveSheet.AutoSortColumn(0);
fpSpread1.ActiveSheet.AutoSortColumn(1);
fpSpread1.ActiveSheet.AutoSortColumn(2);
fpSpread1.ActiveSheet.AutoSortColumn(3);
b = fpSpread1.ActiveSheet.GetColumnShowSortIndicator(0);
label1.Text = "The GetColumnShowSortIndicator for column 0 = " + b.ToString();
}