jQWidgets Forums

jQuery UI Widgets Forums Grid Custom CSS Update for image in Checkbox Column Rendering

This topic contains 2 replies, has 2 voices, and was last updated by  JElmer 9 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • JElmer
    Participant

    I’m trying to customize the rendering of a checkbox column so that I can show a custom image instead of showing the checkbox. I can get the image to show, but i’m trying to modify the css for the image. My grid has virtualmode and editable set to true. Since it’s virtualmode I have a rendergridrows function to return an array of data.
    This grid contains a list of people and a checkbox column that updates their visibility. I have a custom slider image that I want to show up in the checkbox column rather than the standard checkbox. I have a function that will update the css for the div/span according to what I want it to look like. When I run this function on the “bindingcomplete” event I can get the checkbox column to show up like I want it to, but if I make any changes (like updating the checkbox column or update based outside filtering) than the checkbox reverts back to the default.
    The checkbox column is set to be editable and calls an AJAX webservice method that will update the visibility of the person. if I have my UpdateCSS function after the grid initialization in the same function than it updates the css of the image, but then it reverts back to the default checkbox size. Is there some event that is being called to render the column after I made changes to it or is the column reverting back to the default checkbox because that’s what it’s bound to? I have put a cell height/width and that only changes the height/width of the cell itself, but no what’s inside it.


    Peter Stoev
    Keymaster

    Hi JElmer,

    Why do you use a checkbox column if you want to customize its rendering? Use a simple column and implement cellsrenderer and the function will return custom html string.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    JElmer
    Participant

    I chose the checkbox column because I want all the behavior of the checkbox column except that I want a custom image to show instead of the checkbox. I will give the simple column and cellsrenderer a try.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.