分享

dbgrideh中多选时selection

 aaie_ 2011-09-21








if
DBGridEh1.Selection.SelectionType = gstRectangle then begin DBGridEh1.DataSource.DataSet.Bookmark := DBGridEh1.Selection.Rect.TopRow; DBGridEh1.DataSource.DataSet.Next;
SelectionType=gstRetangle时
进行处理的话,就要用到
AGridEh.Selection.Rect.LeftCol
DBGridEh1.Selection.Rect.TopRow 这样的数据了
 
其它处理可以这样去用
//    for i:=0 to DBGridEhInStroe.SelectedRows.Count-1  do begin
//      bkm:= Pointer(DBGridEhInStroe.SelectedRows.Items[i]);
//      gotoBookMark(bkm);
//    end;
//    StoreNumList:= '';
//    cdsOutStore.First;
//    while not cdsOutStore.Eof do begin
//      if DBGridEhInStroe.SelectedRows.CurrentRowSelected then begin
//        cdsOutStore.Edit;
//        //StoreNumList:= StoreNumList + QuotedStr(cdsOutStore.fieldByName('号').AsString)+',';
//        if cdsOutStore.FieldByName('').AsString<>'1' then begin
//          cdsOutStore.FieldByName('').Value:= 1;
//          cdsOutStore.FieldByName('').Value:= dm_func.lstGVars.Values['loginemployeename'];
//          cdsOutStore.FieldByName('').Value:= Now;
//        end;
//      end;
//      cdsOutStore.Next;
//    end;

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多