如何确定dbgrid选择的是记录而不是分组
with cxgrdbtblvwGrid1DBTableView1.Controller do if FocusedRecord is TcxGridDataRow then begin i := cxgrdbtblvwGrid1DBTableView1.DataController.GetItemByFieldName('WMM_No').Index; RESULT := '''WMM_No'':' + ''''+ vartostr(cxgrdbtblvwGrid1DBTableView1.Controller.FocusedRecord.Values[i]) + ''''; I := cxgrdbtblvwGrid1DBTableView1.DataController.GetItemByFieldName('WMD_ShaftID').Index; result := result + ',' + '''WMD_ShaftID'':' + '''' + vartostr(cxgrdbtblvwGrid1DBTableView1.Controller.FocusedRecord.Values[i]) + ''''; I := cxgrdbtblvwGrid1DBTableView1.DataController.GetItemByFieldName('WPM_ID').Index; result := result + ',' + '''WPM_ID'':' + '''' + vartostr(cxgrdbtblvwGrid1DBTableView1.Controller.FocusedRecord.Values[i]) + ''''; I := cxgrdbtblvwGrid1DBTableView1.DataController.GetItemByFieldName('WMD_ID').Index; result := result + ',' + '''WMD_ID'':' + '''' + vartostr(cxgrdbtblvwGrid1DBTableView1.Controller.FocusedRecord.Values[i]) + ''''; result := '{'+result + '}'; end;