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

Rad image is not displaying in Radgrid on production server

8 Answers 235 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jayesh Goyani
Top achievements
Rank 2
Jayesh Goyani asked on 21 Feb 2011, 08:57 AM
Hi,

i am using Radbinary control to display image in rad grid. it is displaying well in developement server. but when i deploy on production server. some images are not displaying and some are display . same in numeber of time refresh some display and some are not.

Please do needful

Thanks,
Jayesh Goyani

8 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Feb 2011, 08:09 AM
-- we are using webservice to bind grid.

Thanks,
Jayesh Goyani
0
Radoslav
Telerik team
answered on 25 Feb 2011, 09:21 AM
Hi Jayesh,

The described issue is very strange. We have not encountered it so far and we are not sure what could be the reason for experiencing the problem. Could you please post your RadGrid declaration with the related code behind and WebService code. Also it will be helpful if you could provide us a live URL. Thus we will be able to gather more details about your scenario and provide you with more to-the-point answer.

Looking forward for your reply.

Kind regards,
Radoslav
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jayesh Goyani
Top achievements
Rank 2
answered on 28 Feb 2011, 06:46 AM
Hi,

Thanks for your quick response.

"http://trykcentretcrm.live2.dev.radixweb.net/MasterData/Pages/managecultures.aspx"  is the live url which you will find some images are display and some are not if you refresh same twice.

Below is code for radgrid declaration

<telerik:RadGrid ID="grdCulture" runat="server" AllowPaging="true" AllowSorting="True"
                           ShowGroupPanel="True" AutoGenerateColumns="false" OnNeedDataSource="grdCulture_NeedDataSource"
                           OnItemCommand="grdCulture_ItemCommand" OnItemDataBound="grdCulture_ItemDataBound">
                           <PagerStyle Mode="NextPrevAndNumeric" />
                           <GroupingSettings CaseSensitive="false" />
                           <MasterTableView TableLayout="Fixed" DataKeyNames="CultureID">                             
                               <GroupByExpressions>
                               </GroupByExpressions>
                               <RowIndicatorColumn Visible="true">
                               </RowIndicatorColumn>
                               <Columns>
                                   <telerik:GridBoundColumn HeaderText="Currecy Code" SortExpression="CurrecyCode" DataField="CurrecyCode"
                                       UniqueName="CurrecyCode">
                                       <HeaderStyle Width="15%"></HeaderStyle>
                                   </telerik:GridBoundColumn>
                                   <telerik:GridBoundColumn HeaderText="ISO Code" SortExpression="ISOCode" DataField="ISOCode"
                                       UniqueName="ISOCode">
                                       <HeaderStyle Width="15%"></HeaderStyle>
                                   </telerik:GridBoundColumn>
                                   <telerik:GridBoundColumn HeaderText="Culture Code" SortExpression="CultureCode" DataField="CultureCode"
                                       UniqueName="CultureCode">
                                       <HeaderStyle Width="15%"></HeaderStyle>
                                   </telerik:GridBoundColumn>
                                   <telerik:GridTemplateColumn DataField="CultureImage" HeaderText="Culture Image" Groupable="false"
                                       ItemStyle-Width="15%">
                                       <ItemTemplate>                                    
                                                <telerik:RadBinaryImage ID="imgCultureImage" ToolTip="Culture Image" runat="server" DataValue='<%# Eval("CultureImageByte") %>' Height="20px" Width="40px"
                                                 Visible='<%# Eval("CultureImageByte")== null ? false : true %>' />
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn DataField="CultureID" HeaderText="Action" ItemStyle-HorizontalAlign="Center"
                                       HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
                                       <ItemTemplate>
                                           <asp:ImageButton ID="imgEdit" runat="server" CommandName="EditCulture" ImageUrl="~/Images/edit.png"
                                               CommandArgument='<%# Eval("CultureID") %>' Text="Edit" />
                                                 <asp:ImageButton ID="imgDelete" runat="server" CommandName="DeleteCulture" OnClientClick='<%# Eval("CultureName", "return confirm(\"Do you want to delete {0}? \")") %>' ImageUrl="~/Images/delete.png" CommandArgument='<%# Eval("CultureID") %>'
                                               Text="Delete" ToolTip="Delete Culture"/>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                               </Columns>
                               <NoRecordsTemplate>
                                   <asp:Label runat="server" ID="lblNoRecord" Text="No Records are available"></asp:Label>
                               </NoRecordsTemplate>
                           </MasterTableView>
                           <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"
                               EnableRowHoverStyle="true">
                               <Selecting AllowRowSelect="True"></Selecting>
                               <Resizing AllowRowResize="false" AllowColumnResize="True" EnableRealTimeResize="True"
                                   ResizeGridOnColumnResize="False"></Resizing>
                           </ClientSettings>
                           <GroupingSettings ShowUnGroupButton="true" />
                       </telerik:RadGrid>

In Above declaration "CultureImage" columns describes Image field.

In Code behiand code is as below

protected void grdCulture_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
       {
           try
           {
                 
               ObjWebservice = new CRMWebService();
               List<CultureBE> lstcultureBE = null;
               if (!string.IsNullOrEmpty(txtSearch.Text))
               {
                   lstcultureBE = ObjWebservice.SelectAllCulture(txtSearch.Text, string.Empty, string.Empty, string.Empty, null, string.Empty).ToList<CultureBE>();
               }
               else
               {
                   int? ISOCode = null;
                   if (!string.IsNullOrEmpty(txtISOCode.Text))
                   {
                       ISOCode = int.Parse(txtISOCode.Text);
                   }
                   lstcultureBE = ObjWebservice.SelectAllCulture(string.Empty, txtCultureName.Text, txtCurrency.Text, txtCurrecyCode.Text, ISOCode, txtCultureCode.Text).ToList<CultureBE>();
               }
               if (lstcultureBE != null)
               {
                   grdCulture.DataSource = lstcultureBE;
               }
           }
           catch (Exception ex)
           {
               ExceptionHandler.HandleException(ex);
               CommonFunctions.ModelPopupShowErrorMessage(this.Page, Common.ApplicationMessage._INTERNALEXCEPTION);
           }
       }

-- WebService code is simple as we are using 3-tire layers. it is as below

/// <summary>
      /// Method for Selecting All Culture Records
      /// </summary>
      /// <param name="SearchField">it is search criteria from it will filter from all fields</param>
      /// <param name="CultureName">it's culture name</param>
      /// <param name="Currency">it's currency of culture</param>
      /// <param name="CurrecyCode">it's currency code of culture</param>
      /// <param name="ISOCode">it's ISo code of culture</param>
      /// <param name="CultureCode">it's culture code of culture</param>
      /// <returns></returns>
      [WebMethod]
      public List<CultureBE> SelectAllCulture(string SearchField, string CultureName, string Currency, string CurrecyCode, int? ISOCode, string CultureCode)
      {
          try
          {
               
              return new CulturesDomain().SelectAllCulture(SearchField, CultureName, Currency, CurrecyCode, ISOCode, CultureCode);
          }
          catch (Exception ex)
          {
              throw ex;
          }
      }

Looking forward to your response

Thanks,
Jayesh Goyani
0
Radoslav
Telerik team
answered on 02 Mar 2011, 01:31 PM
Hi Jayesh,

I reviewed the code snippets which you sent us and they look correct.
Could you please verify that the web site is not hosted into the Web Farm or Web Garden, because RadBinaryImage doesn't work in WebFarm / WebGarden scenarios.
Looking forward for your reply.

All the best,
Radoslav
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jayesh Goyani
Top achievements
Rank 2
answered on 03 Mar 2011, 09:06 AM
Hi,

I have checked, my site is not hosted on web farm /web garden.

Thanks,
Jayesh Goyani
0
Radoslav
Telerik team
answered on 08 Mar 2011, 10:15 AM
Hello Jayesh,

Unfortunately we are unable to recreate the described behavior. To offer a solution we need you to send us a simple running project with which we can reproduce the issue. You could open a formal support ticket from your Telerik account and attach a ZIP file there.

Additionally could you please check if you use some kind of URL rewriting.
Looking forward for your reply.

Best wishes,
Radoslav
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jayesh Goyani
Top achievements
Rank 2
answered on 10 Mar 2011, 03:02 PM
HI,

This issue came only on deployment server. on development server it is working fine.

Looking forward to your response.

Regards
0
Radoslav
Telerik team
answered on 15 Mar 2011, 12:52 PM
Hello Jayesh,

Like I said in my previous post we are unable to reproduce the described behavior on our side. The described behavior could be caused by URL rewriting or using Web Farm or Web Garden where cached images are saved on the different web servers. Could you please try deploying the application on different server or on your PC's IIS and let me know if the issue still exists. Also it will be helpful if you could send us a small runnable example. Thus we will be able to gather more details about your scenario, deploy the application and investigate the problem.

Looking forward for your reply.

All the best,
Radoslav
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Jayesh Goyani
Top achievements
Rank 2
Answers by
Jayesh Goyani
Top achievements
Rank 2
Radoslav
Telerik team
Share this question
or