mapper Posted March 2, 2015 Posted March 2, 2015 Like you know, The Database dont return correct RecNo properties everytime. Perhaps, you must scrool all data. (with Prior, next). I found a way; 1- Creat a new UniDBGrid field for first column. (like NO) 2- Copy-paste this code to DrawColumnCell event : procedure ....Form.UniDBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); var vDbGrid: TDBGrid absolute Sender; begin // only do the next line if this event generated for // the first columnn (column with index 0) if DataCol=0 then vDbGrid.Canvas.TextOut(Rect.Left + 2 , Rect.Top + 2 , IntToStr(vDbGrid.DataSource.DataSet.RecNo)); end; Good programming.. 3 Quote
Administrators Farshad Mohajeri Posted March 9, 2015 Administrators Posted March 9, 2015 Thanks for sharing. Quote
ganzqgy Posted March 10, 2015 Posted March 10, 2015 function reconfigure(sender, store, columns, oldStore, the, eOpts){ sender.headerCt.insert(0,new Ext.grid.RowNumberer({text:'',width:'auto',align:'center',menuDisabled:false}));} Quote
mhmda Posted August 26, 2018 Posted August 26, 2018 This will not be correct if I do sorting in client-side !! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.