DataTable
How to: Create pages (pagination) for your custom data set (in ASP.NET)

I needed this while building a custom Search facility for a customer. I was working with the Sitefinity API and the mechanism should work with documents that were hosted on the Sitefinity CMS. Notice that in this case, we’re talking for an ASP.NET solution, which would also need a way to keep track of where [...]

Read More
Posted on 21st March 2012No Comments
How to: Sort and Reverse a DataTable

  In order to sort/order the rows of a DataTable, we need to pass them through to an array of DataRow and access the DataTable’s “select” method.   If the DataTable is called dtDocuments.   To order: DataRow[] drDocuments = dtDocuments.Select(null, “nameOfColumn”);   The above will create an array of DataRow. The members of the [...]

Read More
Posted on 22nd February 2012No Comments
How to: Troubleshoot “Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.”

Working with DataSets, you might face this error message that will keep you from using code that you knew was working just fine. There may be many reasons for this error message to pop up on your screen, and most of them have been talked about extensively in other blog posts. A search online will [...]

Read More
Posted on 13th October 2011No Comments
How to: Troubleshoot “This row already belongs to another table” error message

If you’re working with Data Tables you might have tried to copy one table’s rows to another. However, using the .Copy method will result in this error message: This row already belongs to another table. So, how do you deal with that? It’s not that hard really. What you first need to make sure of [...]

Read More
Posted on 16th August 2011No Comments