Cannot see an image in RadGrid

6 posts, 0 answers
  1. Andreas
    Andreas avatar
    13 posts
    Member since:
    Jun 2009

    Posted 30 Jul 2009 Link to this post

    Hi All,

    I am using the RadGrid and have added a GridBinaryImageColumn. The ROW gets bigger when an image is in the record (rows where there are NO image data, are lean, this is just because I defined width and height manually in order to see if something is happening once there is an image in the database).

    However, although there is a larger space in the column I cannot see any picture. The database table itself has an image field. I tried to read binary date through writing a memory stream to a bitmap and this worked fine.

    Working with the BinaryImageColumn doesnt show any picture. Please find below the code.

    I have set HeaderText and DataField to the name of the database table field, which is 'Signature'.

    I have set DataType to System.Byte

      <Columns>
            <telerik:GridBoundColumn DataField="OrderNumber" DataType="System.Int32"
                HeaderText="OrderNumber" SortExpression="OrderNumber"
                UniqueName="OrderNumber">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ParcelNumber" HeaderText="ParcelNumber"
                SortExpression="Parcelnumber" UniqueName="ParcelNumber">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DeliveryTime"
                DataType="System.DateTime" HeaderText="DeliveryTime"
                SortExpression="DeliveryTime" UniqueName="DeliveryTime">
            </telerik:GridBoundColumn>
            <telerik:GridBinaryImageColumn AlternateText="" DataField="Signature"
                HeaderText="Signature" ImageAlign="Left" ImageHeight="100px"
                ImageWidth="200px" UniqueName="Signature">
            </telerik:GridBinaryImageColumn>
            <telerik:GridCheckBoxColumn DataField="Retoure" DataType="System.Boolean"
                HeaderText="Retoure" SortExpression="Retoure" UniqueName="Retoure">
            </telerik:GridCheckBoxColumn>
        </Columns>
  2. Andreas
    Andreas avatar
    13 posts
    Member since:
    Jun 2009

    Posted 30 Jul 2009 Link to this post

    With searching thru the forum, I found the solution...

    I added the RadScriptManager and registered the http handler in the webconfig and it worked

    Thanks a lot for providing this forum, its really great!!!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. shyam k
    shyam k avatar
    9 posts
    Member since:
    Jan 2010

    Posted 25 Jan 2010 Link to this post

    Hey can you send me the link of the forum.
    Iam having the same problem cannot display the image...
  5. Andreas
    Andreas avatar
    13 posts
    Member since:
    Jun 2009

    Posted 25 Jan 2010 Link to this post

    I finally used this for the web.config
    <system.web> 
     
    <httpHandlers> 
                  
       <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> 
     
        </httpHandlers> 
              
        </system.web> 
          
     
        <system.webServer> 
            <handlers> 
                  
          <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" /> 
        
          
                </handlers> 
        </system.webServer> 
          
     
  6. shyam k
    shyam k avatar
    9 posts
    Member since:
    Jan 2010

    Posted 25 Jan 2010 Link to this post

    Hey thanks for the post. But it's still not working. Did you change anyother things ie code behind or aspx file to make it work....
  7. sunita ahire
    sunita ahire avatar
    5 posts
    Member since:
    Jan 2010

    Posted 19 May 2010 Link to this post

    Hey!! thanks It Worked For Me...............
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017