datagrid format

Discussion in 'ASP .Net Datagrid Control' started by Dan, Jun 18, 2006.

  1. Dan

    Dan Guest

    I set properties (pagesize, navigation mode) for the datagrid in the
    properties dialog box. When I run it locally with RunInBrowser these
    settings are ignored. Other settings such as column width, font are obeyed.

    Coded in VB. The datasource is set when the page is opened. I tried coding
    the properties after the datasource is set but it didn't make a difference.

    Is there somethig else I need to set?

    Thanks
     
    Dan, Jun 18, 2006
    #1
    1. Advertising

  2. can you post the DataGrid code here?

    --

    Bruno Alexandre
    (a Portuguese in Københanv, Danmark)


    "Dan" <> escreveu na mensagem
    news:...
    >I set properties (pagesize, navigation mode) for the datagrid in the
    >properties dialog box. When I run it locally with RunInBrowser these
    >settings are ignored. Other settings such as column width, font are obeyed.
    >
    > Coded in VB. The datasource is set when the page is opened. I tried coding
    > the properties after the datasource is set but it didn't make a
    > difference.
    >
    > Is there somethig else I need to set?
    >
    > Thanks
    >
     
    Bruno Alexandre, Jun 19, 2006
    #2
    1. Advertising

  3. Dan

    Dan Guest

    Here is the generated HTML......when this is run, the page size is ten rows
    and the font size is larger.

    <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">
    <asp:DataGrid id="dgCalendar" style="Z-INDEX: 101; LEFT: 20px; POSITION:
    absolute; TOP: 140px"
    runat="server" Width="660px" Height="370px" AutoGenerateColumns="False"
    AllowPaging="True"
    PageSize="20" Font-Size="X-Small" Font-Names="Arial" GridLines="None">
    <SelectedItemStyle BackColor="#E0E0E0"></SelectedItemStyle>
    <ItemStyle Font-Size="X-Small" Font-Names="Arial"></ItemStyle>
    <HeaderStyle Font-Names="Arial" Font-Bold="True"></HeaderStyle>
    <Columns>
    <asp:BoundColumn DataField="BegDate" HeaderText="Begin">
    <HeaderStyle Width="1.5in"></HeaderStyle>
    <ItemStyle Font-Size="X-Small" Font-Names="Arial"></ItemStyle>
    </asp:BoundColumn>
    <asp:BoundColumn DataField="EndDate" HeaderText="End">
    <HeaderStyle Width="1.5in"></HeaderStyle>
    </asp:BoundColumn>
    <asp:BoundColumn DataField="Description" HeaderText="Description">
    <HeaderStyle Width="2.5in"></HeaderStyle>
    </asp:BoundColumn>
    <asp:BoundColumn DataField="Repeat" HeaderText="Repeat">
    <HeaderStyle Width="0.5in"></HeaderStyle>
    </asp:BoundColumn>
    </Columns>
    <PagerStyle NextPageText="Next" Mode="NumericPages"></PagerStyle>
    </asp:DataGrid>
    </form>
    </body>

    dan
    ------------------------------------------------
    "Bruno Alexandre" <> wrote in message
    news:...
    > can you post the DataGrid code here?
    >
    > --
    >
    > Bruno Alexandre
    > (a Portuguese in Københanv, Danmark)
    >
    >
    > "Dan" <> escreveu na mensagem
    > news:...
    >>I set properties (pagesize, navigation mode) for the datagrid in the
    >>properties dialog box. When I run it locally with RunInBrowser these
    >>settings are ignored. Other settings such as column width, font are
    >>obeyed.
    >>
    >> Coded in VB. The datasource is set when the page is opened. I tried
    >> coding the properties after the datasource is set but it didn't make a
    >> difference.
    >>
    >> Is there somethig else I need to set?
    >>
    >> Thanks
    >>

    >
    >
     
    Dan, Jun 19, 2006
    #3
  4. the problem must reside in DataSource
    are you doing it programmatically? cause in the DataGrid there is no
    DataSource="" so I suppose that you're doing by hand.

    are you using DataSource Object at all?

    that seams that the query return only 20 records, and that's why you won't
    see paging, because paging header and footer are only visible when the
    number off records returned from a dataSource is bigger than the PageSize.
    --

    Bruno Alexandre
    (a Portuguese in Københanv, Danmark)


    "Dan" <> escreveu na mensagem
    news:%...
    > Here is the generated HTML......when this is run, the page size is ten
    > rows and the font size is larger.
    >
    > <body MS_POSITIONING="GridLayout">
    > <form id="Form1" method="post" runat="server">
    > <asp:DataGrid id="dgCalendar" style="Z-INDEX: 101; LEFT: 20px; POSITION:
    > absolute; TOP: 140px"
    > runat="server" Width="660px" Height="370px" AutoGenerateColumns="False"
    > AllowPaging="True"
    > PageSize="20" Font-Size="X-Small" Font-Names="Arial" GridLines="None">
    > <SelectedItemStyle BackColor="#E0E0E0"></SelectedItemStyle>
    > <ItemStyle Font-Size="X-Small" Font-Names="Arial"></ItemStyle>
    > <HeaderStyle Font-Names="Arial" Font-Bold="True"></HeaderStyle>
    > <Columns>
    > <asp:BoundColumn DataField="BegDate" HeaderText="Begin">
    > <HeaderStyle Width="1.5in"></HeaderStyle>
    > <ItemStyle Font-Size="X-Small" Font-Names="Arial"></ItemStyle>
    > </asp:BoundColumn>
    > <asp:BoundColumn DataField="EndDate" HeaderText="End">
    > <HeaderStyle Width="1.5in"></HeaderStyle>
    > </asp:BoundColumn>
    > <asp:BoundColumn DataField="Description" HeaderText="Description">
    > <HeaderStyle Width="2.5in"></HeaderStyle>
    > </asp:BoundColumn>
    > <asp:BoundColumn DataField="Repeat" HeaderText="Repeat">
    > <HeaderStyle Width="0.5in"></HeaderStyle>
    > </asp:BoundColumn>
    > </Columns>
    > <PagerStyle NextPageText="Next" Mode="NumericPages"></PagerStyle>
    > </asp:DataGrid>
    > </form>
    > </body>
    >
    > dan
    > ------------------------------------------------
    > "Bruno Alexandre" <> wrote in message
    > news:...
    >> can you post the DataGrid code here?
    >>
    >> --
    >>
    >> Bruno Alexandre
    >> (a Portuguese in Københanv, Danmark)
    >>
    >>
    >> "Dan" <> escreveu na mensagem
    >> news:...
    >>>I set properties (pagesize, navigation mode) for the datagrid in the
    >>>properties dialog box. When I run it locally with RunInBrowser these
    >>>settings are ignored. Other settings such as column width, font are
    >>>obeyed.
    >>>
    >>> Coded in VB. The datasource is set when the page is opened. I tried
    >>> coding the properties after the datasource is set but it didn't make a
    >>> difference.
    >>>
    >>> Is there somethig else I need to set?
    >>>
    >>> Thanks
    >>>

    >>
    >>

    >
    >
     
    Bruno Alexandre, Jun 20, 2006
    #4
  5. Dan

    Dan Guest

    thank you.....I forgot the test database was so small
    dan
    -------------------
    "Bruno Alexandre" <> wrote in message
    news:%...
    > the problem must reside in DataSource
    > are you doing it programmatically? cause in the DataGrid there is no
    > DataSource="" so I suppose that you're doing by hand.
    >
    > are you using DataSource Object at all?
    >
    > that seams that the query return only 20 records, and that's why you won't
    > see paging, because paging header and footer are only visible when the
    > number off records returned from a dataSource is bigger than the PageSize.
    > --
    >
    > Bruno Alexandre
    > (a Portuguese in Københanv, Danmark)
    >
    >
    > "Dan" <> escreveu na mensagem
    > news:%...
    >> Here is the generated HTML......when this is run, the page size is ten
    >> rows and the font size is larger.
    >>
    >> <body MS_POSITIONING="GridLayout">
    >> <form id="Form1" method="post" runat="server">
    >> <asp:DataGrid id="dgCalendar" style="Z-INDEX: 101; LEFT: 20px;
    >> POSITION: absolute; TOP: 140px"
    >> runat="server" Width="660px" Height="370px"
    >> AutoGenerateColumns="False" AllowPaging="True"
    >> PageSize="20" Font-Size="X-Small" Font-Names="Arial" GridLines="None">
    >> <SelectedItemStyle BackColor="#E0E0E0"></SelectedItemStyle>
    >> <ItemStyle Font-Size="X-Small" Font-Names="Arial"></ItemStyle>
    >> <HeaderStyle Font-Names="Arial" Font-Bold="True"></HeaderStyle>
    >> <Columns>
    >> <asp:BoundColumn DataField="BegDate" HeaderText="Begin">
    >> <HeaderStyle Width="1.5in"></HeaderStyle>
    >> <ItemStyle Font-Size="X-Small" Font-Names="Arial"></ItemStyle>
    >> </asp:BoundColumn>
    >> <asp:BoundColumn DataField="EndDate" HeaderText="End">
    >> <HeaderStyle Width="1.5in"></HeaderStyle>
    >> </asp:BoundColumn>
    >> <asp:BoundColumn DataField="Description" HeaderText="Description">
    >> <HeaderStyle Width="2.5in"></HeaderStyle>
    >> </asp:BoundColumn>
    >> <asp:BoundColumn DataField="Repeat" HeaderText="Repeat">
    >> <HeaderStyle Width="0.5in"></HeaderStyle>
    >> </asp:BoundColumn>
    >> </Columns>
    >> <PagerStyle NextPageText="Next" Mode="NumericPages"></PagerStyle>
    >> </asp:DataGrid>
    >> </form>
    >> </body>
    >>
    >> dan
    >> ------------------------------------------------
    >> "Bruno Alexandre" <> wrote in message
    >> news:...
    >>> can you post the DataGrid code here?
    >>>
    >>> --
    >>>
    >>> Bruno Alexandre
    >>> (a Portuguese in Københanv, Danmark)
    >>>
    >>>
    >>> "Dan" <> escreveu na mensagem
    >>> news:...
    >>>>I set properties (pagesize, navigation mode) for the datagrid in the
    >>>>properties dialog box. When I run it locally with RunInBrowser these
    >>>>settings are ignored. Other settings such as column width, font are
    >>>>obeyed.
    >>>>
    >>>> Coded in VB. The datasource is set when the page is opened. I tried
    >>>> coding the properties after the datasource is set but it didn't make a
    >>>> difference.
    >>>>
    >>>> Is there somethig else I need to set?
    >>>>
    >>>> Thanks
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Dan, Jun 20, 2006
    #5
    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.
Similar Threads
  1. Brian Candy
    Replies:
    2
    Views:
    1,172
    Janaka
    Feb 18, 2004
  2. Andy
    Replies:
    7
    Views:
    6,269
    Roedy Green
    May 10, 2004
  3. shannon
    Replies:
    1
    Views:
    8,603
  4. shannon
    Replies:
    0
    Views:
    574
    shannon
    Feb 1, 2006
  5. Replies:
    6
    Views:
    467
    Thomas Ganss
    Jan 15, 2006
Loading...

Share This Page