why:
猪啊,这么简单两行就搞定了。。。就是因为太简单了,所以网上找不到答案。。。。
[阅读: 295] 2010-08-03 10:38:37
void __fastcall TFrmMain::wwDBGrid1TitleButtonClick(TObject *Sender,
AnsiString AFieldName)
{
if (wwDBGrid1->Tag == 0)
{
xxxDataSet->Sort = AFieldName + " ASC" ;
wwDBGrid1->Tag =1;
}
else
{
xxxDataSet->Sort = AFieldName + " DESC" ;
wwDBGrid1->Tag =0;
}
}