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
85
dynamic rows and colums in GridView
posted

hello, i need to populate  a GridView dynamically, i've created the colums already, but i don't know how to fill the rows???

I 've tried with Cells, but i don't find a function to put the label i want to show,

 i got the following code:

       tabla=new HtmlGridView();
        HtmlOutputText tit=new HtmlOutputText();
        tit.setValue("Monitoreo a Caja");
        tabla.setHeader(tit);
       
        com.infragistics.faces.grid.component.Column col1=new com.infragistics.faces.grid.component.Column();                       
        HtmlOutputText enc1=new HtmlOutputText();
        enc1.setValue("Header 1");
        col1.setHeader(enc1);
        tabla.getColumns().add(col1);
       
        com.infragistics.faces.grid.component.Column col2=new com.infragistics.faces.grid.component.Column();
        HtmlOutputText enc2=new HtmlOutputText();
        enc2.setValue("Header2");
        col2.setHeader(enc2);   
        tabla.getColumns().add(col2);

                        
        HtmlOutputText valor1=new HtmlOutputText();
        valor1.setValue("valor1");        
        HtmlOutputText valor2=new HtmlOutputText();
        valor2.setValue("valor2");              
        com.infragistics.faces.grid.component.RowItem ren1=new com.infragistics.faces.grid.component.RowItem();
       
        com.infragistics.faces.grid.component.Cell cel1=new com.infragistics.faces.grid.component.Cell();  
        com.infragistics.faces.grid.component.Cell cel2=new com.infragistics.faces.grid.component.Cell();

        HOW DO I PUT THE LABEL????????               
                
        ren1.getCells().add(cel1);
        ren1.getCells().add(cel2);
                                                              
        tabla.getRows().add(ren1);

 

 

thanks.

 

Parents
No Data
Reply
  • 395
    posted

    Hi,

          My requirement is a dynamic grid with a column that contains hyperlink to invoke a new url/page in pop-up.

    I also need to share the modified grid data from main page to the new page shown in pop-up.  

    How can this column be added dynamically?

    Regards 

     

Children
No Data