Tag Archives: GridView

Fav 3 : Three Favorite .NET Tips and Tricks from Daily .NET Tips – Series 2

By | August 31, 2013

#1 : How to pass multiple values using GridView HyperLinkField ? While working with GridView in ASP.NET, most of the time we used HyperlinkField column to navigate from one page to different page with some value as argument. This tip explained how can we pass multiple parameter with HyperLinkField in GridView. #2 :  Displaying Custom Messages / Images… Read More »

Conditional Binding Expression with ASP.NET GridView

By | September 11, 2011

ASP.NET GridView provides the flexibility to use  conditional binding expression where we can use some condition with bind expression. Depends on the evaluation value of the expression, ASP.NET GridView will render the content on page. In this tip I am going to explain one such scenario where the actual data source containing some status value which is a… Read More »

How to change GridView column alignments for dynamic data source ?

By | February 5, 2011

By default ASP.NET GridView Columns has left alignment text. We can use GridView ItemStyle property with either of GridView BondField or Template Field to change the default alignments.GridView properties,ItemStyle-HorizontalAlign having few set of values, using  which we can change the alignments. Above customization is true when you are using Bound Field or Template Field for binding the data… Read More »

How to pass multiple values using GridView HyperLinkField ?

By | January 29, 2011

While working with GridView in ASP.NET, most of the time we used HyperlinkField column to navigate from one page to different page with some value as argument. In this blog post I have explained how can we pass multiple parameter with HyperLinkField in GridView. To implement this features you need to know about DataNavigationUrlField and DataNavigateUrlFormatString properties of… Read More »

Displaying Custom Messages / Images with NULL Value in ASP.NET GridView

By | January 27, 2011

When we  bind some data source with GridView which contains some fields with NULL value,  ASP.NET renders them as Blank. Sometimes developers use GridView_RowDataBound() to override the NULL value with proper message. But Instead of overriding the value, we can use NullDisplayText to display proper message when the value for that particular field is NULL . Once we… Read More »

Display custom messages or images when there is no records in GridView Data Source

By | January 22, 2011

This is a very frequent requirements to display Custom Messages or Images when there is no records in Grid View. I found people used custom code to achieve this. But ASP.NET Gridview having some inbuilt features to do the same.   You can use EmptyDataTemplate using GridView to display any custom message or Images or even web controls to… Read More »

How to Display “Yes” or “No” Instead of Checkbox while binding Boolean value with GridView ?

By | January 19, 2011

If you are binding some data source in grid view which having any field type of Boolean then Grid View Rendered it as “Checkbox” . But sometime we may required to display either Yes/ No or “1/0” instead of Checked/ Unchecked Text Box.   Here is an quick tip which described how you can override the checkbox to your… Read More »