Domanda

Below code raise error

DataRow[] dr = dt.Select("" + ColumnName + "='" + strLetter + "'" + " order by asc");

error is

Missing operand after 'order' operator.

È stato utile?

Soluzione

There is no column name to sort, you need to pass column name which you need to sort

DataRow[] dr = dt.Select("" + ColumnName + "='" + strLetter + "'" + " order by " + ColumnName + " asc");
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top