473,549 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

fixing <asp:gridview > header row and selecting rows at client side

AnuSumesh
96 New Member
Hi All,

I am using <asp:Gridview > to display my data.
I am adding columns and rows dynamically.
I am facing following issues:
1.
I want scrollbars around the gridview and for this purpose i used <div style="overflow :auto"> and its working fine. But issue is that the header row also scroll down with scrollbar and i want to fix header row .
I searched on google and found a lot of solutions but nothing is working for me.
I am using css for header row and setting position:relati ve.
Its working fine in mozilla but when using in IE, the header row is growing out of gridview boundaries horizontally when horizontal scrollbar appears. Vertically working fine.

2.
I am using commandfield to select the row.
But I want to select the row at client side in such a way that when i click on command button, it should not go to server for processing., rather it should selecet the row using client side code only.


Please help me in solving above issues.

Thanks & Regards,
Anu
Feb 24 '09 #1
5 4228
Frinavale
9,735 Recognized Expert Moderator Expert
This is a lot trickier than you would first think.

First of all, I would recommend against using CSS in an attempt to position your headers. The reason is because CSS works differently in each browser. I spent literally days trying to get this to to work with CSS and got so frustrated that I started my control over from scratch.

So yeah, I gave up on using CSS and created a separate table to use as the header row instead.

Now, the client side select is fun :)
You get to muck around with JavaScript now.

I just finished implementing a solution that selects a row client side, displays a control that allows the user to pick some settings for that row, and then posts back to the server.

You're going to end up using your own controls to do this instead of depending on the GridView.

This is a journey that is not quick to implement either....

We should concentrate on one topic for this thread and once that is solved start a new thread for the next topic.
Feb 24 '09 #2
AnuSumesh
96 New Member
Thanks For Reply.

Actually we have developed a control with gridview and using that control in whole web site. And our project is also complete.
But now we want to just modify that control which renders GridView on the page.

Can you please help me first in giving "Fixed Header" Solution of this problem?
I don't have much practice in this area but this task is given to me and i have to complete it.

Your help will be much appreciated.

Thanks,
Anu
Feb 25 '09 #3
alamodgal
38 New Member
Please check this link


http://www.datawebcontrols.com/faqs/...edHeader.shtml
Feb 25 '09 #4
alamodgal
38 New Member
In this link you get how to scroll gridview with fixed header
Feb 25 '09 #5
AnuSumesh
96 New Member
Hi

Thanks to All. I have solved my Fixed header issue
Refer to link
http://www.developer.com/lang/jscrip...comment=2784-0

Now next issue is selecting row at client side without going to server side.

Any help on this issue.

Thanks & Regards,
Anu
Feb 25 '09 #6

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

Similar topics

6
1710
by: John Smith | last post by:
I have my <asp:TextBox> inside one of DataGrid's columns. I haven't set AutoPostBack=True. When I hit the ENTER button, my page "refreshes" (I belive that PostBack was performed - however not sure). I don't want anything to happen when ENTER is being pressed. The other option is that button event might execute (button next to my asp:TextBox)....
0
1619
by: MasterNone | last post by:
Can somebody suggest a way for me to bind the SelectText instead of static text or show any cool methods to make a server side postback to the same page instead of navigate. Either of those solutions are acceptable. I am using a GridView control and would like to have one fo these soltions. Thanks in advance. MasterOfNone
1
2110
by: MRW | last post by:
Hello! I'm taking a file name from a database and using the <asp:imagetag in GridView to show the image. However, some of the file names have spaces in it and no matter what I do, for example: <asp:Image runat=server ImageUrl=<%# HttpUtility.HtmlDecode((Eval("WallpaperLink"))) %/> It still displays the file as: bobs%20image. %20...
3
2206
by: MRW | last post by:
Hello! I'm taking a file name from a database and using the <asp:imagetag in GridView to show the image. However, some of the file names have spaces in it and no matter what I do, for example: <asp:Image runat=server ImageUrl=<%# HttpUtility.HtmlDecode((Eval("WallpaperLink"))) %/> It still displays the file as: bobs%20image. %20...
3
2937
by: Opa | last post by:
Hi, I have and XMLDataSource which I am using in a GridView control and am customizing the grid with <ItemTemplate>. My XML datasource has an element with an attribute called "private". I want to check the value of the private attribute and if is is true, I DON'T want to display this row of data. I am having trouble with the XPath...
5
2657
by: =?Utf-8?B?SmliZXkgSmFjb2I=?= | last post by:
Hi: I'm using the <asp:BulletedListcontrol in a TemplateField in a GridView. The extra height generated by this control increases the height of the rest of the row it's in. Is there a way around this? Thanks, Jibey
4
9442
by: TS | last post by:
I have a headerText for a header column that is "Page<br>Name". it puts a <brto force a line break, but the < and get encoded to &lt; and &gt; thus negating its effect as an html control and doesn't respect the line break I'm guessing this happens during render. What do i need to do to keep the line break?
1
3746
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have a <asp:GridViewcontrol that is populated with records. The first column I display contains a "UserID" DataField. I've created my column using the following code: <asp:BoundField DataField="UserID" /> When the user clicks on a row, I'd like to get the current value of the UserID column for the current row, as I want to use this...
0
2033
by: Jeff | last post by:
hi asp.net 2.0 I have a GridView which in it's FooterTemplate contain textboxes for adding new rows to the GridView. I thought that was cool, until I tested the GridView without any data. Then the FooterTempalte isn't displayed and I have way of adding rows to the GridView :(
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
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
7956
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7469
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6040
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
5368
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
3498
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
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.