Click here to Skip to main content
15,936,565 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want to fix(freeze) the column of a datagrid in my asp.net application while horizontal scrolling.
Can Any one came through this situation...plz post any Ideas...cross browser solution is required
Any help highly appreciated....
Thank you in Advance
Posted
Updated 19-Dec-10 19:34pm
v28
Comments
jim lahey 10-Nov-10 4:55am    
by fix it, do you mean width?
rajas4444 10-Nov-10 7:26am    
Not width,Freezing the column not allowed to scroll that column
Ankur\m/ 10-Nov-10 23:17pm    
Thanks for the vote. I must tell you that there is nothing .NET specific that will create a cross-browser compatible solution for you. It's the styles of your controls that would behave browser specific. So you need to check what style is not working for Firefox and change it accordingly.
thatraja 11-Nov-10 0:21am    
Hi, check my updated answer for your issue.
rajas4444 16-Nov-10 23:00pm    
can anyone help me

You may be looking for this: The Freeze Pane DataGrid[^]

You may also find your answer here: Google search - freeze first column datagrid[^]
 
Share this answer
 
Comments
Hiren solanki 10-Nov-10 8:48am    
reply to comment on thatraja's answer.

But he has also specified tag as ASP.NET
rajas4444 10-Nov-10 23:37pm    
Hi refer this article to fix header
http://www.codeproject.com/KB/webforms/ScrollingGrid.aspx?fid=215863&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=1#xx0xx
I need freezing column here.Is it possible...
Ankur\m/ 10-Nov-10 23:42pm    
Yes. The link I have given you is about freezing COLUMNS. Have you checked the links?
rajas4444 11-Nov-10 0:08am    
Hi,the link u send is good for IE but I need Cross browser solution...So I think u understand...thankyou for ur Support.
check below link for gridview column and header fix.
Fix Header and Column of GridView
 
Share this answer
 
Comments
rajas4444 17-Nov-10 8:23am    
thanks for ur reply....it works for IE only....
Have a look at this article. It's working in 3 browsers(IE, FF, Chrome)

Grid View with fixed header[^]

For freezing columns

An ASP.NET DataGrid Custom Control to Freeze Header, Rows, Columns just by changing a single attribute value[^]

ScrollingGrid: A cross-browser freeze-header two-way scrolling DataGrid[^]

Also Ankur already gave you another link.

But you need to do changes in CSS, so follow the below link it has the solution.

GridView : Freezing First Columns and Freezing Column's Headers[^]
 
Share this answer
 
v4
Comments
Ankur\m/ 10-Nov-10 8:46am    
The OP is asking about a datagrid. And I have given a link for the same.
But anyways there will be not much difference. It's the styles that will fix the column.
Ankur\m/ 10-Nov-10 8:51am    
And I have not voted you down. Some 1 voter is after all of us. :(
thatraja 10-Nov-10 9:23am    
You right, but datagrid is old one & also there will not much difference between datagrid & gridview like as you said. So that he can change the things easily. Don't worry about down-votes(You can see my signature).
rajas4444 10-Nov-10 23:16pm    
Hi,thanks for ur reply...I already solved the Header freezing problem.Now the requirement is freezing one column in the datagrid.
rajas4444 10-Nov-10 23:38pm    
Hi I refer this article to fix header
http://www.codeproject.com/KB/webforms/ScrollingGrid.aspx?fid=215863&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=1#xx0xx
I need freezing column here.Is it possible...
THIS[^] domestic article may help you.
 
Share this answer
 
Comments
Ankur\m/ 10-Nov-10 8:50am    
Yes, so?? Do you mean there is no datagrid in ASP.NET?
rajas4444 10-Nov-10 23:16pm    
Hi,thanks for ur reply...I already solved the Header freezing problem.Now the requirement is freezing one column in the datagrid.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900