473,397 Members | 1,972 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,397 software developers and data experts.

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

AnuSumesh
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:relative.
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 4218
Frinavale
9,735 Expert Mod 8TB
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
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
In this link you get how to scroll gridview with fixed header
Feb 25 '09 #5
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
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...
0
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...
1
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:...
3
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:...
3
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...
5
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...
4
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...
1
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...
0
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....
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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...
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.