skafy Posted May 27, 2020 Share Posted May 27, 2020 Hi, I would like to add text to pagingBar that will show total number of records that in DBGrid (dataset). How can this be achived. Link to comment Share on other sites More sharing options...
Sherzod Posted May 27, 2020 Share Posted May 27, 2020 3 hours ago, skafy said: I would like to add text to pagingBar that will show total number of records that in DBGrid (dataset). How can this be achived. Hello, Maybe you wanted like this: UniDBGrid.ClientEvents.UniEvents -> function pagingBar.beforeInit(sender, config) { config.displayInfo=true; } 1 1 Link to comment Share on other sites More sharing options...
skafy Posted May 27, 2020 Author Share Posted May 27, 2020 Thank you. This solves my problem. Thanks! 1 Link to comment Share on other sites More sharing options...
MVakili Posted July 9, 2023 Share Posted July 9, 2023 On 5/27/2020 at 3:23 PM, Sherzod said: Hello, Maybe you wanted like this: UniDBGrid.ClientEvents.UniEvents -> function pagingBar.beforeInit(sender, config) { config.displayInfo=true; } With TUniDBGrid(Components[CI]) do Begin if Columns.Count>1 then OnAfterLoad:=UniDBGridAfterLoad; JSInterface.JSCall('addCls', ['Grid1css']); ClientEvents.UniEvents.Values['beforeInit']:= 'function beforeInit(sender, config)config.displayInfo=true;}'; End It Says "Unexpected identifier 'config'" Where is my mistake? Link to comment Share on other sites More sharing options...
Sherzod Posted July 9, 2023 Share Posted July 9, 2023 1 hour ago, MVakili said: It Says "Unexpected identifier 'config'" Hello, Yes, because you didn't copy correctly. Please be careful. Missing { character before config. 1 Link to comment Share on other sites More sharing options...
MVakili Posted July 9, 2023 Share Posted July 9, 2023 10 hours ago, Sherzod said: Hello, Yes, because you didn't copy correctly. Please be careful. Missing { character before config. Thank you No more errors But he didn't do anything! In fact, I need to know how many records I have out of all the records in the dataset (RecNo/RecordCount) And I don't know how to get it Is it possible to modify the code? Link to comment Share on other sites More sharing options...
Sherzod Posted July 10, 2023 Share Posted July 10, 2023 15 hours ago, MVakili said: ClientEvents.UniEvents.Values['beforeInit']:= ClientEvents.UniEvents.Values['pagingBar.beforeInit']:= 1 Link to comment Share on other sites More sharing options...
MVakili Posted July 10, 2023 Share Posted July 10, 2023 20 hours ago, Sherzod said: ClientEvents.UniEvents.Values['pagingBar.beforeInit']:= thank you Your solution worked one more question When I activate the row number, it starts from 1 on each page Is there a way to make it persistent instead of resetting every time? Link to comment Share on other sites More sharing options...
Sherzod Posted July 11, 2023 Share Posted July 11, 2023 3 hours ago, MVakili said: it starts from 1 on each page Which build are you using? Link to comment Share on other sites More sharing options...
Sherzod Posted July 11, 2023 Share Posted July 11, 2023 6 hours ago, MVakili said: one more question When I activate the row number, it starts from 1 on each page Is there a way to make it persistent instead of resetting every time? Okay, try this approach: 1 Link to comment Share on other sites More sharing options...
MVakili Posted July 11, 2023 Share Posted July 11, 2023 17 hours ago, Sherzod said: Which build are you using? uni-1.90.0.1564 Link to comment Share on other sites More sharing options...
MVakili Posted July 11, 2023 Share Posted July 11, 2023 18 hours ago, Sherzod said: Okay, try this approach: Thank you, it worked 1 Link to comment Share on other sites More sharing options...
jrp Posted March 13 Share Posted March 13 On 5/27/2020 at 6:53 PM, Sherzod said: Hello, Maybe you wanted like this: UniDBGrid.ClientEvents.UniEvents -> function pagingBar.beforeInit(sender, config) { config.displayInfo=true; } Hello, It would be nice if this hack could be made as a property of TUniDBGrid. Something like UniDBGrid -> Options -> dgShowRecordCount Thanks 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