Validus … talkin bout <code> n sh!t

7Aug/110

Gridview with single selection

Posted by Joey

Using DevExpress, you may have run into this issue before. With the DevExpress control, you can allow selection – but it’s multi selection. In some code, I wanted a gridview where you can highlight a row and continue… such as selecting a person’s name in a list (like a dropdown, but in a gridview).

First we need our gridview. I’m a bit lazy to code up all of the… Continue reading

Filed under: C# No Comments
4Aug/110

Example DataTable

Posted by Joey

Every now and then I need to create a dummy data table to test out gridviews n stuff… so here’s a quick post on how to create one :)

1
public static DataTable ExampleDataTable()
{
// Declare the DataTable
DataTable dtExample = new DataTable();

// Here we define the columns, Add() takes in two params, the name and the data type
dtExample.Columns.Add("ID", typeof(int))… Continue reading

Filed under: C# No Comments
16Jun/110

Create GridViewCommandColumnCustomButton in code behind with image

Posted by Joey

Just created a gridview with a custom buttons to go up & down, I’ll post the rest later… but this is how to add a custom button with an image.

1… Continue reading

Filed under: C# No Comments