RobertoLopes Posted January 3, 2020 Share Posted January 3, 2020 4 hours ago, Sherzod said: But as you know, as the name implies, the cells of the UniStringGrid component may contain data of type String in the first place. Yes but, as a developer of a product, if so many of my customers are asking for the same feature over and over again, why not include that feature if in fact there is a way to do so ? Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted February 16, 2020 Share Posted February 16, 2020 Can use dbGrid via memtable. so can add TField any field type in runtime. and add this field to dbgrid as well. Quote Link to comment Share on other sites More sharing options...
Tokay Posted July 13, 2021 Share Posted July 13, 2021 Hi Sherzod. How to add checkboxes only to one column? If I understand correctly your solution draws the checkboxes into all cells. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 13, 2021 Share Posted July 13, 2021 Hello, I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 13, 2021 Share Posted July 13, 2021 2 hours ago, Tokay said: How to add checkboxes only to one column? If I understand correctly your solution draws the checkboxes into all cells. Yes. because there is a loop through all columns. Try beforereconfigure fn instead of reconfigure fn: function beforereconfigure(sender, store, columns, oldStore, oldColumns, eOpts) { columns[1].rdonly=true; columns[1].align = 'center'; columns[1].renderer = function(value, a) { return "<input type='checkbox'" + ((value == '1') ? "checked='checked'" : "") + " onclick='"+sender.nm+"._check(+this.checked, "+a.rowIndex+", "+a.columnIndex+")'>"; }; } Quote Link to comment Share on other sites More sharing options...
Tokay Posted July 14, 2021 Share Posted July 14, 2021 Could you please share a sample here for my case? Quote Link to comment Share on other sites More sharing options...
Tokay Posted July 20, 2021 Share Posted July 20, 2021 I've get a success here, all works fine. Thank you! 1 Quote Link to comment Share on other sites More sharing options...
peeryog Posted March 27, 2023 Share Posted March 27, 2023 Just resurrecting an old thread. This process works great ! Only question I have is how can I determine the state of the checkbox when iterating through each row on the grid? The end user can check and uncheck each box or this can be done programatically by setting the cell contents. However having the user check or uncheck doesn't appear to be linked to the cell contents. While they appear just fine on the screen ,the cell contents are blank. So probably a client-side process? Quote Link to comment Share on other sites More sharing options...
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.