سؤال

Is there a way put an Icon in the colum header instead of text value in the gridview.I am doing this indirect way like this

  <ext:Column ID="Column6" runat="server" Text="TS" Flex="1" Align="Center" DataIndex="SId">
                            <HeaderItems>
                                <ext:Button Dock="Top" ID="Button6" runat="server" IconAlign="Right" IconCls="flagTs" Scale="Large" Flex="1"></ext:Button>
                            </HeaderItems>
                        </ext:Column>

I am using a button which get the style outside in that way I put this image.But It really looks ugly Is there any way to do that directly and without the messing the looking of the grid.

هل كانت مفيدة؟

المحلول

note the HtmlEncode=false:

<asp:BoundField HtmlEncode="false" 
 HeaderText='<img src="http://www.gravatar.com/avatar/8c9778a09696aac804ed44f4c8033458?s=32&d=identicon&r=PG" />Filter' />

It will render an image on the header and the word Filter next to it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top