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
530
dynamically creating an editable grid
posted

Hi

 I am creating a gridView dynamically as result may have different columns for different queries etc. Displaying the columns is working along with rows. But now I need to enable the editing in the gridView.

 resultGridView=new HtmlGridView();

resultGridView.setDataSource(new ListDataModel(investments));

I have found getGridEditing() and it has some enabling methods. But some of them are using string which I believe are defined somewhere to show what are the valid values but api documentation doesn't point to it.

 The bigger issue is that it returns null and there is no setGridEditing() method.

 

Parents
No Data
Reply
  • 530
    posted

    Ok I tried one more thing without any luck: 

    GridEditing gE=
    new GridEditing();

    resultGridView.getFacets().put(HtmlGridView.FACET_EDITOR, gE);

    //Still the following 2 lines get null returned from  resultGridView.getGridEditing().

     resultGridView.getGridEditing().setEnableOnActive(true);

    resultGridView.getGridEditing().setEnableOnMouseClick("single");

    and I also tried just the heck of it:

    HtmlGridEditing gE=new HtmlGridEditing();

    resultGridView.getFacets().put(HtmlGridView.FACET_EDITOR, gE);

    resultGridView.getGridEditing().setEnableOnActive(true);

    same result. 

     

Children