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
210
ig:gridView refreshing causes a problem while selecting a row
posted

Hi everybody !

 

I am getting a problem with GridView, When i select a row , a ValueChangeListener will fires and getting the Grid refresh, this causes a problem that deselects the row. I have a ig:gridView with the results of rows in a five pages,When i choose a second page in a grid and then selecting a row in this second page, Here the problem is when i select a row ( i am using <h:selectBooleanCheckbox> component for selection of row for each ), a listener fires and grid will refreshing and showing a first page index, when i choose again second index page, the selected row is then deselected.

Can anybody help me how to set the current page index dynamically where the row is selected.

Here the sample code i use,

<ig:gridView id="data"  binding="#{projectSearch.grid}"  dataSource="#{projectSearch.projects}"
                    topPagerRendered="true" pageSize="20" >

<f:facet name="topPager">
                            <ig:pager id="dataPagerField" firstLastRendered="true"
                                pageNumbersRendered="true" previousNextRendered="true" />
                        </f:facet>
                       
                        <f:facet name="header">
                            <h:outputText id="tableHeader" value="Projects" />
                        </f:facet>

                        <ig:column id="select_col">
                               <f:facet name="header">
                                        <h:outputText id="selectHeader" value="Select" />
                               </f:facet>
                               <h:selectBooleanCheckbox id="SelectId" value="#{DATA_ROW.selected}" onclick="submit()" valueChangeListener="#{projectSearch.selectedProjVCL}"/>
                        </ig:column>

..........

........

........

</ig:gridView>   

 

Thank's

Viswanath

Parents
No Data
Reply
  • 140
    posted

    Hi Viswanath,

    Hope this information helps you. on the h:selectBooleanCheckbox as you are saying "onclick="submit()""..so request will be submitted again and you will get  a new response. This behaviour will make the grid view to set its page index to zero. Which means although you are on 5th page once this onclick event occurs..the grid view page index will be zero.

    You need to use infragistics smartSubmit(....) for onclick event..instead of using Submit(.) which will submit the whole form.

     

Children
No Data