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
460
Formating WebCombo for Pager
posted

I'm using NetAdvantage 2008 Vol. 2 with .NET Framwork 3.5 and would like to set some formation on that WebCombo for the Pager ( ...Pager.StyleMode = PagerStyleMode.ComboBox), i.e. set the font, cursor and so on for the combo.

How can I do that? Which properties can I use? How can I refer to that combo?

Thanks in advance

  • 28464
    posted

    Hello,

    The problem in this case is that when using Pager.StyleMode = PagerStyleMode.ComboBox, it renders the built in <select> element (and not ComboBox from our ASP.NET suite). In essense, the HTML will look like this:

    <td id="UltraWebGrid1_pager" class="ig_49f5d809_r0 ig_49f5d809_r16" align="right" onclick="igtbl_onPagerClick('UltraWebGrid1',event)" style="height: 1%; white-space: normal;">
       <select onchange="BLOCKED SCRIPTigtbl_pageGrid(event,'UltraWebGrid1',(this.selectedIndex+1).toString())">
          <option>1</option>
          <option selected="">2</option
       </select>
    </td>

    The only way to style the <select> is by using javascript to get the <select> element, with something like this:

    ...

    var pagerSelect = document.getElementById("UltraWebGrid1_pager").getElementsByTagName("SELECT")[0];

    ...

    Styling the dropdown itself is very difficult as well, some things are just impossible - but you can go through the following article for info how this can be done:

    http://home.tiscali.nl/developerscorner/fdc-varia/styling-dropdown-boxes.htm

    If you want to get better control of the pager, the only way is to use PagerTemplate and customize everything yourself (but this will require additional coding)