Wednesday, February 4, 2015

Why can't I see the control for changing pagination at a DevExpress grid?

I assume that this worked when I wrote it, but at some point I lost the ability to see my control for changing pagination. I fixed it like so:

<SettingsPager Position="TopAndBottom">
   <PageSizeItemSettings Visible="true" ShowAllItem="true" />
   <PageSizeItemSettings Items="5, 10, 20, 50, 100" />
</SettingsPager>

 
 

I eventually took out ShowAllItem="true" as it put an option for "All" in the control which I did not want. On the C# side I had to explictly make the 5 the default as otherwise 10 would be the default. I did that like this:

MyGrid.SettingsPager.PageSize = 5;

 
 

As I type this up, I bet I had...

MyGrid.SettingsPager.Visible = true;

 
 

...in my C# at some point and I accidentally zapped it. That is probably why my pagination sizing control disappeared, you know?

No comments:

Post a Comment