how to centervertically the emptydatatext?

Discussion in 'ASP .Net Web Controls' started by phil, Jun 1, 2006.

  1. phil

    phil Guest

    Hi,

    The gridview contains the EmptyDataTex element, but how can i center it
    vertically?

    I tried all possible properties like here:
    <asp:GridView ID="GridView1" runat="server"
    DataSourceID="AccessDataSource1"
    .........
    EmptyDataText="No records" HorizontalAlign="Center"
    EmptyDataRowStyle-VerticalAlign="Middle">

    <emptydatarowstyle backcolor="LightBlue"
    forecolor="Red" HorizontalAlign="Right" VerticalAlign="Middle"/>
    .....

    This centers only horizontally and the text is rendered with the colors.
    When i remove [HorizontalAlign="Right" VerticalAlign="Middle] from the
    <emptydatarowstyle> tag, i get just the same, so what's the use of those
    options?
    The option [EmptyDataRowStyle-VerticalAlign="Middle] doesn't work either.

    Any hints?
    Thanks
    Phil
    phil, Jun 1, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page