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

Cannot see an image in RadGrid

5 Answers 225 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 30 Jul 2009, 09:10 PM
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>

5 Answers, 1 is accepted

Sort by
0
Andreas
Top achievements
Rank 1
answered on 30 Jul 2009, 10:57 PM
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!!!
0
shyam k
Top achievements
Rank 1
answered on 25 Jan 2010, 02:26 PM
Hey can you send me the link of the forum.
Iam having the same problem cannot display the image...
0
Andreas
Top achievements
Rank 1
answered on 25 Jan 2010, 04:37 PM
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> 
      
 
0
shyam k
Top achievements
Rank 1
answered on 25 Jan 2010, 04:58 PM
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....
0
sunita ahire
Top achievements
Rank 1
answered on 19 May 2010, 07:18 AM
Hey!! thanks It Worked For Me...............
Tags
BinaryImage
Asked by
Andreas
Top achievements
Rank 1
Answers by
Andreas
Top achievements
Rank 1
shyam k
Top achievements
Rank 1
sunita ahire
Top achievements
Rank 1
Share this question
or