Hi,
I need to apply a custom header layout on my grid. This includes actual html implementation to place filter and sorting icons within the header cell in custom positions, and not just replacing the default icon images or colors. How do I do this?
I've spent a lot of time trying to understand how to achieve this with either UltraGridColumn or with TemplatedColumn with no success. With UltraGridColumn this seems to be impossible, and with TemplatedColumn I can provide a HeaderTemplate, but then again, it seems like I have to actually implement the client-side events for the filter and sorting images.
Is it not possible just to instruct the grid that a certain image is the filter or sort image, and have it render the client scripts accordingly?
What's more frustrating, is that I can't seem to find a single example for implementing a HeaderTemplate with Filter or Sort icons.
Here's the code sample for the HeaderTemplate:
<HeaderTemplate><table cellpadding="0" cellspacing="0" border="0" width="100%" class="tbl_header_data"> <tr> <td> Name </td> <td> <table cellpadding="0" cellspacing="0" border="0" width="" class="tbl_header_icons"> <tr> <td><!-- this image should trigger the client filtering --> <asp:Image runat="server" ImageUrl="~/images/icons/filter_normal.png" /> </td> </tr> <tr> <td> <a href=""><!-- this image should trigger the client sorting --><asp:Image runat="server" ImageUrl="~/images/icons/arrow_sort_down.png" /> </a> </td> </tr> </table> </td> </tr></table> </HeaderTemplate>
Thanks.
Hi ewolfman,
I am facing some sort of similar issue and post it here.
http://community.infragistics.com/forums/p/55538/285451.aspx#285451
Have you find the answer of your question? and which version of UltraWebGrid you are using?
Thanks,
M.Yousuf
In this particular issue I'm afraid that I eventually decided to give up on customizing a header, and used jQuery and CSS to tweak the rendered builtin header's html to my needs.
If you're refactoring your code, you may consider switching to IG's newer WebDataGrid over the older UltraWebGrid, although I'm uncertain if the newer grid will supply a solution. IG claims that they want to "retire" UltraWebGrid, so it's not the best bet. You could also try a different 3rd party grid if you haven't purchased IG yet.