GridView
I came across two awesome blog posts by Doug Nelson. Optional Parameters for Stored Procedures GridView Dissapointments Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
I just updated my GridView without DataSourceControl DataSource blog entry and all code to allow sort state and data to persist between page changes. Updates: GridView without DataSourceControl DataSource GridView without DataSourceControl DataSource
Read More...
I've discovered that using EnableSortingAndPagingCallbacks="true" without a DataSourceControl data source causes sorting not to work. While I don't know exactly why this happens, I'm hoping this blog entry will save a lot of people from banging their
Read More...
I just created the VB.NET version of the sample that I posted at GridView without DataSourceControl DataSource Part II . Live Example Code Download Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
I've created a live working example of my blog entry GridView without DataSourceControl with source code. Live Example Code Download Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!
Read More...
I put together sample code that will run on the Northwind database that demonstrates using a generic List collection as a data source for an ObjectDataSource which populates a GridView control. All you have to do is specify the connection string in Web.config
Read More...
It appears that there is a security feature built-in to the HyperLinkField that causes links that resemble JavaScript functions (i.e. java script:SomeFunction()), file paths (i.e. F:\Directory\File), and other non-URL strings not to render when using
Read More...
Below is a helper class that I use for exporting a DataGrids contents to an external file. The below code references gridViewText, but I haven't tested it out on a GridView yet as the code is from an application I'm working on upgrading. But, it works
Read More...
If you're like me and converting a .NET 1.1 application to 2.0, and aren't using a DataSourceControl DataSource just yet but need to enable sorting and paging, you might run into the following exceptions: When changing the page: The GridView 'GridViewID'
Read More...
This is a common issue even with the DataGrid control. PostBack is invoked and your GridView doesn't update or, in some cases, disappears. All you need to do is force the GridView to bind to its datasource by calling the DataBind() method, GridView.DataBind(),
Read More...
Another common question I see on forums and lists is how to get the content of a GridView cell when in Edit mode. The following code demonstrates how to get the text of a cell at index position 3 using an OnEditing event. VB.NET Private Sub GridView_RowEditing(
Read More...
The .NET Framwork 2.0 introduces Eval() . Eval() is a shortcut for Container.DataItem() . Since Eval() uses Reflection, it causes overhead. From a optimization standpoint, it is better to use Container.DataItem() . VB.NET Container.DataItem() C# DataReader:
Read More...
Lets say you have multiple DataKeys assigned to the DataKeyNames property of the GridView control where only one DataKey will have a value and the rest will be null. Based on the non-null value, you want to trigger a conditional. I've discovered an easy
Read More...
The GridView control has a cool feature that allows you to bind more than one value as a DataKey. However, the documentation that I could find on how to get a DataKey other than the primary key was sparse. I finally discovered: VB.NET GridView.DataKeys(Index1).Values(
Read More...
Here is something that many people may not know about GridView paging: Interface paging, the method of paging used by the GridView control, causes all your data to be loaded into memory at the time the data binds to the GridView. This means that if you
Read More...