Completed
Last Updated: 13 May 2024 11:35 by ADMIN
Release 2024 Q2
Giuseppe
Created on: 07 May 2024 07:46
Category: Grid
Type: Bug Report
0
Encountering WebResource.axd Error When Using ImageButton with Material Skin

When I try to set the Skin to Material I obtain the following Error:

WebResource.axd?d=e4b2sCc8Q8M6A2MgSsDltOpyL908K1Q7T29bPdSz7Supj8wwNwBiCRISuCJlWYcTaJsmG21ZOfynS4jGurXXbpli-ERqUAuqN0-JIBovYD49aTvhGO3Rn_RCmsSdUlmwuseC48k3n557KQEGgkr2hCHOsY41&t=638423073240000000] DETAILS: System.Web Exception: msg:Richiesta webresource non valida.

The problem happens when the ButtonType="ImageButton" is set with the Material skin:

<telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="20px" >
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="DeleteColumn" Text="Elimina" HeaderStyle-Width="20px" CommandName="Delete" ConfirmText="Procedere con la cancellazione del Cimitero?"></telerik:GridButtonColumn>

1 comment
ADMIN
Rumen
Posted on: 07 May 2024 12:18

Hi Giuseppe,

Thank you for reporting this issue.

The ButtonType properties of the GridEditCommandColumn and GridButtonColumn are set to ImageButton. You can resolve the problem by setting them to FontIconButton since the lightweight render mode uses font icons, instead of images.  

<telerik:GridEditCommandColumn ButtonType="FontIconButton" HeaderStyle-Width="20px"></telerik:GridEditCommandColumn>
<telerik:GridButtonColumn ButtonType="FontIconButton" UniqueName="DeleteColumn" Text="Elimina" HeaderStyle-Width="20px" CommandName="Delete" ConfirmText="Procedere con la cancellazione del Cimitero?"></telerik:GridButtonColumn>

Alternatively, iof you want to provide image icons for the Edit and Delete buttons you can do it through the EditImageUrl and ImageUrl properties respectfully:

<telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="20px" EditImageUrl="Images/edit.jpg">
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="Images/delete.jpg" UniqueName="DeleteColumn" Text="Elimina" HeaderStyle-Width="20px" CommandName="Delete" ConfirmText="Procedere con la cancellazione del Cimitero?">
</telerik:GridButtonColumn>

These changes will help you avoid the missing webresource.axd error.

In 2024 Q2 the scenario will be handled automatically.

Regards,
Rumen
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources