Tag Archives: Databinding

Sortable Binding List for custom data objects

Binding generic collections to Windows forms Data gridview can be done using DataSource property of Gridview control. But the problem with normal generic lists that it doesn’t support sorting, by clicking the grid view headers. .Net Framework provides an generic … Continue reading

Posted in .Net, .Net 3.0 / 3.5, Windows Forms | Tagged , , , , , , | Leave a comment

Implementing Custom Paging in DataRepeater using C# and SQL Server

Normally DataRepeater doesn’t have a paging feature; and you can implement it using LINQ, if you are using .Net 3.5. Here is an implementation which is using SQL Server 2005 feature ROW_NUMBER(). You can get more information about ROW_NUMBER() from … Continue reading

Posted in .Net, .Net 3.0 / 3.5, ASP.Net, SQL Server, Visual Studio | Tagged , , , , , | Leave a comment

Databinding in ASP.Net dropdownlist

In many forums, I used to see people asking for code to bind the dropdown list from basic collections. Here is the code to bind a Hash Table to ASP:Dropdown list, and setting the value of the selected item to … Continue reading

Posted in .Net, .Net 3.0 / 3.5, ASP.Net | Tagged , , , , , , | Leave a comment