473,583 Members | 3,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid Pager customization

Hello!

I am using following code to customize DataGrid Pager. It works fine...
My question is, how I can replace"&nbsp" with " | " between each LinkButton
control?

Thanks!
James

Dim pager As TableCell
Dim wc As WebControl
Dim cnt As Integer
pager = e.Item.Controls (0)
Dim lnk As LinkButton
Dim lt As Literal

If e.Item.ItemType = ListItemType.Pa ger Then

pager = e.Item.Controls (0)
pager.Horizonta lAlign = Horizontallign. Center

For cnt = 0 To pager.Controls. Count - 1 Step 2
wc = pager.Controls( cnt)

If wc.GetType.ToSt ring() =
"System.Web.UI. WebControls.Dat aGridLinkButton " Then

CType(wc, LinkButton).Tex t = "[" & CType(wc, LinkButton).Tex t & "]"
CType(wc, LinkButton).For eColor = Drawing.Color.O range

Else

CType(wc, Label).Text = CType(wc, Label).Text
CType(wc, Label).Font.Bol d = True
CType(wc, Label).ForeColo r = Drawing.Color.O range

End If

Next

End If
Nov 19 '05 #1
0 1231

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4432
by: sumit | last post by:
Hi, I want to add one java script function on the click of page button of datagrid. But how to get UI control of page button so that i should be able to add attribute for onClick event. Please suggest Sumit
2
1416
by: Roy | last post by:
I am very, very new to ASP.NEt and have never done ASP. I have been trying to get a datagrid to work for about 5 days with very limited results. When I use property builder, bind the control, set the paging and populate it from the page_load event it works. However, if I set it as unbound, then set the properties through code the grid does...
2
3992
by: Ben | last post by:
Hi, I'd like to have a datagrid that has a dropdownlist in the pager control for setting the page size. I can get the control into the pager inside the datagrid itemcreated event by checking for ListItemType.Pager. The problem I'm having is subscribing to the selectedindex changed event. The datagrid doesn't even seem fire an itemcommand,...
1
2081
by: strout | last post by:
I know it's dumb ... sometimes frustrating I want the text and a dropdownlist align with both side of a table cell, i.e. text align left and dropdownlist align right. I cannot add more cells to do format because it's in a Datagrid pager area. The html code generated for pager is one sigle cell with lots of colspan. I tried to add some...
4
1682
by: Sandy | last post by:
Hello - Sorry to have posted this twice, but my question wasn't being answered and I think it might be because my subject wasn't clear. I have a datagrid and a dropdownlist (which is outside the datagrid). When I click on a category in the dropdownlist, the datagrid changes to correspond to that category. The datagrid is paged. ...
0
1814
by: Ray | last post by:
I am trying to add a "Next >" and "<Prev" button to the pager of my datagrid. I have been able to add the hyperlinks to the pager. I am now trying to determine the correct postback script to emulate so that these hyperlinks force the postback of the appropriate linkbuttons in the pager. Let's take a pager with pager: 1 2 3 4 5 It consists...
1
3521
by: Friso Wiskerke | last post by:
Hi all, is it possible to set a separate style in a datagrid pager for the selected page to make it more clear for the user which page is selected? For example: page 3 is selected out of the 8 possible pages and the number 3 is then displayed in bold and with an alternate color. There's a pager style but there is no setting for the...
5
319
by: NuB | last post by:
I have a datagrid on my page and allow paging, how can i add text where my pages numbers are? example: Instead of seeing 1 2 3 4 i want to see Page 1 2 3 4 Show All Total of rows 200
0
2505
by: moondog | last post by:
Just in case anyone else out there is having the same problem of the page numbers appearing in one column instead of across the row, here's how to fix the problem courtesy of swn...@gmail.com from his original thread of this subject. Below are the C# and VB.NET code samples of the prerender event of the datagrid: C#:
0
8182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8193
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6579
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5701
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5374
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3818
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3843
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1433
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.