1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    5
    Vote Rating
    0
    lkuchars is on a distinguished road

      0  

    Default How to make gridlike view with buttons

    How to make gridlike view with buttons


    Hi folks!
    I was wondering if anyone could help me out with this problem. I need to display gridlike view but with checkboxes and buttons for each item displayed in this grid?

    My question is how do I do this efficiently (grid of 100 - max 300 records). Did any of you guys tried to do this in gxt?

    Cheers
    lkuchars

  2. #2
    Ext User
    Join Date
    Jun 2008
    Location
    Utrecht, Netherlands
    Posts
    24
    Vote Rating
    0
    assassin is on a distinguished road

      0  

    Default


    Hi,

    I should do this with the help of a dataview. You can create a html template:
    just a div with a css class and the name of the button in it.

    You can simulate a button with css using dataview.
    setOverStyle(). With the onClick or SelectionChange event you can simulate a button click event.

    Ofcourse it isn't really a button but the user won't see the difference and it is more efficient than generate buttons. The same can be done for checkboxes.


  3. #3
    Ext User polgara's Avatar
    Join Date
    Apr 2008
    Posts
    33
    Vote Rating
    0
    polgara is on a distinguished road

      0  

    Default


    Hello, I'm writing about your answer assassin.

    You say that we can use dataview.setOverStyle() but I didn't find this method. How can I use it?

    I ask you that because I'm using a DataView and I have to set in this dataview a button. At this moment I use the html code in the XTemplate but, I wonder if there isn't another way to do this. And I see your answer,so I'm asking you how can I use the method setOverStyle?

  4. #4
    Ext User
    Join Date
    Jun 2008
    Location
    Utrecht, Netherlands
    Posts
    24
    Vote Rating
    0
    assassin is on a distinguished road

      0  

    Default


    Hi,

    Just look at the API documentation of DataView:

    setOverStyle

    public void setOverStyle(java.lang.String overStyle) Sets the style name to be applied on mouse over (defaults to 'x-view-item-over').
    Parameters:overStyle - the over style

Thread Participants: 2