Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
240
Hi! Please help on webgrid
posted

Hi All

I am new to webgrid and i have the following simple question:

 

I need to render a record into multiple rows within webgrid? how do i do that?

 

Thank you very much for your help!

yak

  • 2301
    posted

    Hi Yak!

    There are a number of ways to do what you want. You should cehck out two things. The first is the core tag f:verbatim. The other is the escape attribute of most o fthe core library.

    These two things allow you to embed HTML tags in your code that will get passed to the browser for interpretation as HTML.

    Another way is to wrap the code you place into the cell in h:panelGrid tags.

    These are commonly used JSF tags and you can google the terms above to discover tutorials and examples.

    Thanks!

  • 1324
    posted

    Hello Yak,

    You can achieve this functionality by two ways. I hope you are trying to do this when you have large data in the row.

    1st ) So here you can do this by setting the column width to inflat limited area and so your data for the row will automatically will be display in the multiple lines. 

    <

     

    ig:column style="width:200px;"> ..

    2nd) You can put the html <br> tag in the value of your row data to show a new line. You need to set the 'escape' attribute of the outputText component of the column to "false" inorder to process html tag in row value.

    Hope it help you.

    Thank you.