datagrid format

D

Dan

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
 
D

Dan

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
------------------------------------------------
 
B

Bruno Alexandre

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,999
Latest member
MakersCBDGummiesReview

Latest Threads

Top