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
799
Hiding rows in the grid
posted

Hello,

 

in my current quest for displaying data, i have a complete datasource (on which i cannot filter more)

but, according to user rights, certain rows should not be shown.

 

I catch this by *only part of code..*

--------------------------------------------

        Protected Sub uwgData_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles uwgData.PreRender

            With uwgData.DisplayLayout.Pager
                        .PageSize = 20
                        .AllowPaging = True
            End With           

        End Sub

 

Protected Sub uwgData_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.RowEventArgs) Handles uwgData.InitializeRow

                If userHasAccess() Then
                    e.Row.Hidden = True                   
                    Return
                End If

    ...

end sub

--------------------------------------------

 

This does the trick of hiding them..

UNFORTUNATELY, i have a datasource of 3k+ items, and i only show 30 to the current user..

leaving him with a first page of 3 items, and a paginglist of 100+ with empty pages.

 

Any way I can trow them out of my datasource, or out of the rendering?

 

  • 799
    Verified Answer
    posted

    Just fyi,

     

    since I didn't find a way, nor was offered a way, I finally found a way to filter my data before filling it in the datasource :(