This is a migrated thread and some comments may be shown as answers.

GridViewImageColumn

5 Answers 379 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sasa Milovic
Top achievements
Rank 1
Sasa Milovic asked on 17 May 2007, 12:56 PM
Hi

I don't understand what datatype this column binds to.

I have a collection of objects with a bitmap property, when binding to the grid, nothing is displayed.

What datatype am I suppose to use? Image, Byte() ? I cant seem to find much documentation on this.

Thanks

5 Answers, 1 is accepted

Sort by
0
Dimitar Kapitanov
Telerik team
answered on 17 May 2007, 01:07 PM
Hello Sasa Milovic,
If you bind a DB column that contains image data (OLE container or BLOB) this column should display the image data. Also it implements resizing functionality for the displayed images.

Kind regards,
Dimitar Kapitanov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Sasa Milovic
Top achievements
Rank 1
answered on 17 May 2007, 01:13 PM
So it does not support binding to a list of custom objects?

0
Peter
Telerik team
answered on 17 May 2007, 04:48 PM
Hello Sasa,

Thank you for the response. We confirm this as a bug, which I was able to fix right away - now the Image column displays all image types correctly. The fix will appear in SP2 in about 4 to 6 weeks. Your points have been updated for the bug report.
 

Regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
santosh
Top achievements
Rank 2
answered on 18 Mar 2008, 02:58 AM
Hi Telerik,

     i am still waiting for the response of the

   "Sasa Milovic" question     " So it does not support binding to a list of custom objects? "

i am trying to add a image coloumn using "GridViewImageColumn", but throws excpetion gridviewsystem.NullReferenceException.
  
  i am using win Q3 2007 verison.
  
 my sample code is 
 

 radGridView1.MasterGridViewTemplate.Columns.Add(new GridViewImageColumn("image"));

    radGridView1.Rows.Add("D:\\santosh\\RandD - code\\Sample-RadControl\\myimag.gif");

i am not sure this bug is resolved in beta or not.
from where i can download beta?

thanks,
santosh kumar
 
0
Julian Benkov
Telerik team
answered on 18 Mar 2008, 12:22 PM
Hi Santosh,

For the unbound mode in new RadGridView beta you can use the following code snippet:

GridViewImageColumn column = new GridViewImageColumn();  
column.DataType = typeof(Image);  
radGridView1.Columns.Add(column);  
 
radGridView1.RowCount = 1;  
radGridView1.Rows[0].Cells[0].Value = new Bitmap(Resources.DataGridRow_pencil); 
 
You can download the Q1 2008 Beta from the link below:
<admin>link no longer valid</admin>


Please share with us your feedback on the Beta. We will use it to take the final release in the direction most useful to you.

The RadGridView also supports binding to custom objects implementing IBindingList, such as the BindingList<> generic collection.

If you have additional questions, do not hesitate to contact me.

Regards,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Sasa Milovic
Top achievements
Rank 1
Answers by
Dimitar Kapitanov
Telerik team
Sasa Milovic
Top achievements
Rank 1
Peter
Telerik team
santosh
Top achievements
Rank 2
Julian Benkov
Telerik team
Share this question
or