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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...