473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Pagination not appearing on right hand side in DataGrid

121 100+
Hello All,
I am trying to get some data in DataGrid from XML files. I am reading that XML data and putting that data in DataView and giving that DataView as DataSource to DataGrid.

As i have a schema for my XML, i dont even give HeaderName as system automatically takes HeaderText as whatever is in XML Tags.

Now my problem is Pagination alignment, i have pagination on my DataGrid but even setting
Expand|Select|Wrap|Line Numbers
  1. <PagerStyle HorizontalAlign="Right" Mode="NumericPages"/>
doesn't bring pagination to extreme right of datagrid, rather it brings pagination on right of first column of datagrid(my datagrid has 9 columns) see attached pic


Expand|Select|Wrap|Line Numbers
  1.  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load         
  2.             'Bind data to Grid
  3.             BindGrid()   
  4. End Sub
Expand|Select|Wrap|Line Numbers
  1. Protected Sub BindGrid()
  2.  
  3.         'Data in DataGrid
  4.         Dim dataUrl As String = "abc.xml"
  5.         Dim schemaUrl As String = "abc.xsd"
  6.  
  7.         'Declare dataset
  8.         Dim ds As New DataSet()
  9.         Dim dt As DataTable
  10.         Dim dv As New DataView()
  11.  
  12.         'Read the xml schema
  13.         ds.ReadXmlSchema(Server.MapPath(schemaUrl))        
  14.         Try
  15.             'read XML file recieved from Brooms
  16.             ds.ReadXml(Server.MapPath(dataUrl))
  17.  
  18.             dv = New DataView(ds.Tables(0))
  19.             dt = dv.Table           
  20.  
  21.         Catch
  22.             'If some error occur, pass in required parameter.
  23.             DiplayAndHide(True, False, "Error occured")
  24.         End Try   
  25.  
  26.         If (dt.Rows.Count > 0) Then
  27.             Test.DataSource = dv
  28.             Test.DataBind()
  29.         End If
  30.  
Header of datagrid comes of whatever text the tags have in xml file or i can actually use
Expand|Select|Wrap|Line Numbers
  1. dt.Column(x).CoumnName = "anything"
and that works.

can anyone point me in right direction on how can i get pagination numbers to appear at extreme right of DataGrid rather than right of first column.

TIA
Jay
Attached Images
File Type: jpg Untitled.jpg (42.8 KB, 220 views)
Feb 28 '11 #1
2 1548
MrMancunian
569 Expert 512MB
Can you post your complete HTML/ASP code for the datagrid? So from the <asp:DataGrid> to </asp:DataGrid>.

Steven
Mar 7 '11 #2
jay123
121 100+
The code is in Main Div as
Expand|Select|Wrap|Line Numbers
  1.  <div id="Div1" runat="server" style="margin-top:10px; margin-bottom:10px;">
  2.         <asp:DataGrid runat="server" ID="Test" OnSortCommand="SortGrid" AllowSorting="true" width="100%" BorderColor="White"
  3.                       backcolor="White" ItemStyle-CssClass="row1" BorderWidth="0px" CellSpacing="1" CellPadding="1" PageSize="10" 
  4.                       PagerStyle-Mode="NumericPages" AllowPaging="True" AlternatingItemStyle-CssClass="row2"
  5.                       HeaderStyle-CssClass="TestHeader" HeaderStyle-ForeColor="#00527f" AutoGenerateColumns="true">         
  6.               <PagerStyle CssClass="pagerright" Mode="NumericPages"/>        
  7.         </asp:DataGrid>
  8.         <asp:Label ID="ErrorMessagelbl" Visible="false" CssClass="abclabel" runat="server"></asp:Label>
  9.     </div>  
and Pagerright cssclass looks like
Expand|Select|Wrap|Line Numbers
  1. .pagerright
  2. {
  3.     background-color:White;
  4.     font-weight:bold;
  5. }
even if i add text-align:right in pagerclass, pagination does more right but only right till 1st column as shown in attached pic.
Mar 9 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Steve | last post by:
Hi, I've come across what appears to be a bug in the rendering engine of internet explorer when a document is opened by showModalDialog. Basically any elements that should render to the right...
4
by: jake | last post by:
Maybe some kind person can help with a suggestion or two ;-) I want to construct a banner on a number of pages in the format: LHS: Text (variable content) RHS. Logo ..... each with a...
4
by: F. Da Costa | last post by:
Hi, I've been wrecking my brain on what is probably a very small thing. On the following link i've got a page that does not fill properly to the right-hand side. As you can see the bannerArea is...
10
by: Cybertof | last post by:
Hello, Do you know why i get the error "Left hand side must be variable, property or indexer" with the following code : struct FundDataStruct { internal int quantity;
1
by: clubamigos | last post by:
I am having problems with getting a right hand side border positioned correctly. What l would like is for the dotted line to touch the navbar and the bottom of the content section of the page. If...
2
by: jj | last post by:
I have a single threaded application in c# that scans through a file system. While doing this if I try to minimize, maximize buttons on the top,right hand corner of my form do not do as they are...
5
by: bruno | last post by:
I have a .aspx with a TreeView in the left hand and a GridView or a FormView in the right hand. I would like to resize the two sides like in http://msdn.microsoft.com/library/default.asp, but I...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, Is there a setting/property for displaying a checkbox label (or radiobutton label) on the left hand side instead of the right hand side? Or am I limited to no text in the label - take on...
29
by: aarthi28 | last post by:
Hi, I have written this code, and at the end, I am trying to write a vector of strings into a text file. However, my program is nor compiling, and it gives me the following error when I try to...
16
Inbaraj
by: Inbaraj | last post by:
HI.... This is Inbaraj... I am doing an Internet Chat program... I that if a person who enter into that portal a popup message should be displayed like in google talk.. In right hand side a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.