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

alert message on initial load

3 Answers 40 Views
TileList
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
Iron
Iron
Veteran
David asked on 06 Aug 2018, 06:48 PM

The following code produces 'test' message on initial load, before actual click.

 

  <telerik:RadImageTile ID="ritTREDAIR" Name="TREDAir"
                                   Height="385" Width="340px"
                                   runat="server"
                                   OnClientClicking="alert('test')">
                    <Title Text="TREDAir"></Title>
  </telerik:RadImageTile>

Am i doing something wrong?

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 07 Aug 2018, 12:04 PM
Hi David,

In order to pop an alert in the handler of the OnClientClicking method of the ImageTile you have to wrap it inside a function, otherwise it will pop when the page is loaded. You can find more details on the matter here: https://docs.telerik.com/devtools/aspnet-ajax/getting-started/customize-control-behavior

For example:
<telerik:RadImageTile ID="ritTREDAIR" Name="TREDAir"
    Height="385" Width="340px"
    runat="server"
    OnClientClicking="function(){alert('test')}">
    <Title Text="TREDAir"></Title>
</telerik:RadImageTile>

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
David
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 07 Aug 2018, 01:14 PM

Works!

Thank you

0
Vessy
Telerik team
answered on 08 Aug 2018, 08:17 AM
Hi,

You are welcome, David - I am glad my reply was helpful for you.

Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TileList
Asked by
David
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Vessy
Telerik team
David
Top achievements
Rank 1
Iron
Iron
Veteran
Share this question
or