Datagrid Column Data Types

Tell me about the datagrid.

  • Like Datagrid

    Votes: 7 25.9%
  • Do Not Use Datagrid

    Votes: 5 18.5%
  • Think it is overly cumbersome

    Votes: 10 37.0%
  • Hate Datagrid

    Votes: 6 22.2%

  • Total voters
    27

hbash54

Newcomer
Joined
May 15, 2003
Messages
24
:confused: I am trying to learn to use the datagrid and loaded a northwind demo.

in the employees table there is a column that is a picture.

can someone tell me what is required to display the pic in the appropriate grid cell?

Thanks.
 
DataGrid has only two types of columns. Text and Checkbox.
If you want to place Images in a column you have to use third-party controls.
 
Datagrid Column Types

I thought that there is also an integer type and a currency type. Or is that just a formatting of data using the column format property? Which by the way, raises another question. Is there a comprehensive document on using this control. Where does one find all the letters that the format property of the column object understands? ie. "c" for currency.
 
You are right this is just formatting the data.
You will find your desired information in the Objectbrowser, when you look e.g. for the Format method of the String class.
 
That would be fine dsgreen57, but I think templated columns only work with webgridcontrol. :-\
 
Okay, I've just managed a similar thing with a progress bar within a DataGrid. You will need to write a class that inherits DataGridColumnStyle, and override the appropriate methods to display the picture.

Within your form you then call the derived class, which will then display the picture for you.
 
My experience with the default .NET DataGrid is that it requires way too much time to do anything really slick with it. Don't get me wrong, I know you can make the DataGrid do anything you want it too....(if you have a few weeks to work on it and debug it :p ). I started using the ComponentOne grids and have been really impressed with the ease of programmability and the major efficiency boost in development they caused. Never fear.....the DataGrid for the .NET Framework 2.0/VS.NET 2005 is a huge improvement over what we have to work with now.
 
RobEmDee said:
My experience with the default .NET DataGrid is that it requires way too much time to do anything really slick with it. Don't get me wrong, I know you can make the DataGrid do anything you want it too....(if you have a few weeks to work on it and debug it :p ). I started using the ComponentOne grids and have been really impressed with the ease of programmability and the major efficiency boost in development they caused. Never fear.....the DataGrid for the .NET Framework 2.0/VS.NET 2005 is a huge improvement over what we have to work with now.

Thats if you want to have related tables and stuff. It took me about 2 hours to have a datagrid display a virtual table (thats a table I made off data that the program loads into a collection of classes like PhoneBook.Entry(i).Name)
I think the datagrid is a cool way to display a list of items while granting the user permission to edit them (constraining the datatype of each column is really usefull as opposed to other controls like listview etc). I dont have too much experience with the datagrid but it suited my needs. Maybe if in the future i intend to use it in some other way i may come here crying about how stupid it really is, but who knows eh?
 
Back
Top