.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Scrollable GridView with fixed headers in asp.net C# vb.net

Posted By: syed shakeer hussain     Posted Date: March 31, 2010    Points: 2   Category :ASP.Net
 
In this example i am going to show how to create scrollable GridView with fixed headers which don't get scrolled with records and stay on the top in asp.net using css, I've tested this code on IE7 and Firefox 2.0 , 3.5.

For this we need to add css to headers of gridview to keep them on the top.

First of all place a Panel on the aspx page from thetoolbox. Set height to 200px and width to 200px
and scrollbars to Vertical.
Now add a gridview inside this Panel and set the datasource to populate gridview.


View Complete Post


More Related Resource Links

Tooltip for GridView Column Headers (ASP.Net)

  
I just wanted to add auto tooltips for my GridView headers. There are couple of ways but I don't want to use javascript and wanted to use simple 'title' attribute. It took couple of hours to get the working code supporting sortable columns. I thought it will be very useful for others. Here's the code and logic behind it.

How to Fixed GridViews Header and Footer when scrolling in asp.net?

  
This article is to show you how to Fix GridView''s Header and Footer in a simple code with CSS and JavaScript

Styling of GridView with Multiple Headers

  
Hi,    I want to implement GridView with multiple headers in  WPF. The requirement is such that GridView should show the headers as shown below: Detail info Name ID PhoneNumber   The sample Xaml Code with  which I was able to attain the above GridView presentation of Headers is given below:   XAML code: <Window x:Class="WpfNestedHeaderListView.Window2"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Title="Window2" Height="300" Width="300">     <UserControl.Resources> <CollectionViewSource       x:Key="PatientInfo"       Source="{Binding Path=DocContext.PatientInformation}"/>   <Style x:Key="HeaderStyle" TargetType="{x:Type GridViewColumnHeader                <Setter Property="Template">                 <Setter.Value>                     <ControlTemplate T

styling of gridview with multiple headers

  
Hi,    I want to implement GridView with multiple headers in  WPF. The requirement is such that GridView should show the headers as shown below: Detail info Name ID PhoneNumber   The sample Xaml Code with  which I was able to attain the above GridView presentation of Headers is given below:   XAML code: <Window x:Class="WpfNestedHeaderListView.Window2"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Title="Window2" Height="300" Width="300">     <UserControl.Resources> <CollectionViewSource       x:Key="PatientInfo"       Source="{Binding Path=DocContext.PatientInformation}"/>   <Style x:Key="HeaderStyle" TargetType="{x:Type GridViewColumnHeader                <Setter Property="Template">                 <Setter.Value>                     <ControlTemplate T

Styling of GridView with Multiple Headers

  
Hi,    I want to implement GridView with multiple headers in  WPF. The requirement is such that GridView should show the headers as shown below: Detail info Name ID PhoneNumber   The sample Xaml Code with  which I was able to attain the above GridView presentation of Headers is given below:   XAML code: <Window x:Class="WpfNestedHeaderListView.Window2"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     Title="Window2" Height="300" Width="300">     <UserControl.Resources> <CollectionViewSource       x:Key="PatientInfo"       Source="{Binding Path=DocContext.PatientInformation}"/>   <Style x:Key="HeaderStyle" TargetType="{x:Type GridViewColumnHeader                <Setter Property="Template">                 <Setter.Value>                     <ControlTemplate T

ListView fixed size column headers

  
Hi, I am using a ListView in its 'Detail' view. I have added several columns there and I want to restrict resizing the column width. I couldn't find a ways to do that; is there any easy way to do that? ThanksCJ

Custom Headers in Gridview, need to be able to sort

  
I have a Custom Header that I need to beable to sort.  The headers consist of a Textbox (for entering a search value) and a Linkbutton to fire the event.  I just need to know how to point that button to the sort function of the gridview. Thank you for the help,

Textboxes in Gridview Headers

  
I have a couple of Textboxes in a Gridview header, mainly used to search for items in the dataset.  This works fine; however, on Post Back, the textboxes do not hold the entered text.  The View State is enabled for these control items. Can someone point me in the right direction?

Multiple column headers in Gridview

  
Hi,  I've been trying for the past few hours to add mutliple headers to my grid view but keep failing to get it to show.  There's plenty of examples online that I found but can't seem to get the most simplest to work.  Below is the code I've been using with no success.  I even tried changing the "TableCell" to "TableHeaderCell" but still yields no headers as expected.  Anyone know what I could be doing wrong? protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) { GridViewRow headerow = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Insert); TableCell headercell = new TableCell(); headercell.ColumnSpan = 3; headercell.Text = "My Custom Header"; headerow.Cells.Add(headercell); GridView1.Controls[0].Controls.AddAt(0, headerow); } }

Gridview Fixed Header Issue

  


.Freezing
{
   position:relative ;
   top:BLOCKED EXPRESSION;
   z-index: 10;
}    
        
2.Assign Datagrid Header's cssClass to Freezing
<HeaderStyle ... CssClass= "Freezing" ...></HeaderStyle>



 

This is working fine in Internet Explorer but not working in firefox. can anybody please help me to say why its not working in firefox


SSRS 2008 - Fixed headers while scrolling - works fine for Matrix - but not for Table??!!

  
Hi

I have this feature working fine for matrix, but it does not work as expected for Table (Tablix).

I tried all over, and setting both check boxes in the 'Tablix Properties' dialog page 'Repeat header rows on each page' and 'Header should remain visible while scrolling' for both row header and column header, but none of it is working. Am I missing something?

In the properties table (F4) for text box of tablix, under 'Other' there is 'RepeatWith' - none / tablix: what is this used for? I tried this property also but I cannot get the headers fixed / visible while scrolling. I cannot get the 'column headers' repeat on each page of the report. Very frustrating...

Does anyone face similar issue? Can anyone help please? Do I need any update / download any fix? For now I have the following version installed for Visual Studio 2k8:
Microsoft SQL Server Reporting Services Designers Version 10.0.1600.22

Thanks
Shailesh

Fixed Headers and Document Map behavior on Report Manager

  

Hi,

We have created a simple SSRS 2008 R2 report with document map on it. Also the report has the 'Repeat header rows on each page' and 'Header should remain visible while scrolling' features on.

When this report is deployed to report manager, we are seeing some unexpected behaviour that we would like to fix.

Basically, when you click on different items on the document map - the first few records in the report got hidden behind the  "fixed header data". Then we have to scroll up to see all the records. (The same question was asked back in 2006 by someone.. But no answers.. http://www.bigresource.com/Tracker/Track-ms_sql-ErXx27Zc/)

Please help us out. Thank you!

Uma


Show column headers when gridview returns empty data set

  

hello

 

I have in my code a gridview that I redirect to excel, it works fine when I have data in the data set. waht I want is to show column headers when there is no data right now what i get is empty sheet. 


Fixed footer in gridview using jquery

  

 Hi This is vijay. I want Fixed footer in gridview using jquery.

I found the article like Fixed header in Gridview in the following link.. http://www.dotnetcurry.com/ShowArticle.aspx?ID=255&AspxAutoDetectCookieSupport=1.

In the same jquery can I make fixed footer?. or any other code fixed footer in gridview. Please help me.

 

Thanks & regards

Vijay kumar


Fixed footer in gridview using jquery

  

Hi

 This is vijay. I want Fixed footer in gridview using jquery. I found the article like  Fixed header in Gridview in the following link..

 http://www.dotnetcurry.com/ShowArticle.aspx?ID=255&AspxAutoDetectCookieSupport=1.

 In the same jquery can I make fixed footer?. or any other code fixed footer in gridview. 

 

Please help me.

 

Thanks & regards

 

Vijay kumar

 

 


Inplace Edit in GridView

  
In this article I am presenting a different way to look at EditItemTemplate, using which user navigation for editing is reduced and . it looks very different (see screeen shots) then regular implementation of GridView.

GridView Confirmation Box Using JQuery BlockUI in asp.net

  
JQuery is the most popular JavaScript library. One of the main reasons for its fame is the plugin architecture. Anyone can create a separate library that leverage the JQuery library. In this article we are going to look at the BlockUI library which is used to block the user screen while performing a task.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend