GridViewImageColumn

6 posts, 0 answers
  1. Sasa Milovic
    Sasa Milovic avatar
    15 posts
    Member since:
    Dec 2006

    Posted 17 May 2007 Link to this post

    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
  2. Dimitar Kapitanov
    Admin
    Dimitar Kapitanov avatar
    632 posts

    Posted 17 May 2007 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sasa Milovic
    Sasa Milovic avatar
    15 posts
    Member since:
    Dec 2006

    Posted 17 May 2007 Link to this post

    So it does not support binding to a list of custom objects?

  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 17 May 2007 Link to this post

    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
  6. santosh
    santosh avatar
    8 posts
    Member since:
    Mar 2008

    Posted 17 Mar 2008 Link to this post

    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
     
  7. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 18 Mar 2008 Link to this post

    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready