Jump to content

UniStringGrid Cell editor


bolossis

Recommended Posts

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 ?

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
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+")'>";
    };
}

stringGridCheckCol.png.3c8cb26a32db63336400d87441d814a9.png

Link to comment
Share on other sites

  • 1 year later...

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?

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...