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

[Solved] error to display image in Grid

2 Answers 169 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Truong Pham
Top achievements
Rank 1
Truong Pham asked on 31 Aug 2009, 04:29 PM

I have tried to display image on Grid using GridBinaryImageColumn but when run it display error:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Parameter is not valid

I include here the my source code:

 

<

 

telerik:GridBinaryImageColumn DataField="CUST_LOGO" HeaderText="Image" UniqueName="Upload" ImageAlign="NotSet"

 

 

 

 

 

ImageHeight="80px" ImageWidth="80px" ResizeMode="Fit" DataAlternateTextField="CUST_NAME"

 

 

 

 

 

DataAlternateTextFormatString="Image of {0}">

 

 

 

 

 

<HeaderStyle Width="10%" />

 

 

 

 

 

</telerik:GridBinaryImageColumn>

 



In  my database the "CUST_LOGO" field sometime contain NULL value.

2 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 01 Sep 2009, 03:35 PM
That error should be thrown when the data that you are giving the GridBinaryImageColumn is not a valid image or has custom headers applied. Does this error display each time you run your app? Have you tried to run it without any of the nulls that you mentioned? There could be an issue where the nulls are causing the problem.
0
apb
Top achievements
Rank 1
answered on 04 Oct 2009, 02:46 AM
This is probably caused by the DataAlternateTextField which only works some of the time and kicks up that error following rebinds. Try removing that property from the column def.
Tags
Grid
Asked by
Truong Pham
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
apb
Top achievements
Rank 1
Share this question
or