hai
I have a grid that include paging and i created pagesize drop down for page sizing.
I use PreRender event for displaying this pagerrow even if the row count not exeeds the pagesize.
My problem is, in pager row the page index also dispalyed with page size dropdown as '1'.
Can i hide it or any other solution for this problem.

Thanks in Advance,
Sreevidya

Member Avatar for stbuchok

Use an if statement to check if that is the only value, if so set visible to false for the control you'd like to hide.

Something similar to this will work:

//this is using an inline if statement
control.Visible = control.length > 1 ? true : false

hai ,
I want to display only the pagesize-dropdown in the pager row without page index.
For that can I set the FirstPageText as empty. I tried like following, but it didnt work.

Gridview1.PagerSettings.FirstPageText = "";

Thanks in advance,

Sreevidya.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.