mapper Posted March 2, 2015 Share 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 Link to comment Share on other sites More sharing options...
mapper Posted March 9, 2015 Author Share Posted March 9, 2015 L Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 9, 2015 Administrators Share Posted March 9, 2015 Thanks for sharing. Link to comment Share on other sites More sharing options...
ganzqgy Posted March 10, 2015 Share 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}));} Link to comment Share on other sites More sharing options...
mhmda Posted August 26, 2018 Share Posted August 26, 2018 This will not be correct if I do sorting in client-side !! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now