I have a grid Control where I have a client side ajax handler on a row click... but also in the row i have 2 controls which are buttons (LinkButtons) which calls a different method and I do not want the ajax handler on those.
The problem i'm having is that the row click always trigger the client side ajax... even if I've only clicked on the button controls.
I was able to get the behaviour I want with a different button (Image)
Here's the code to demonstrate the problem
Why Can't i have the same rowclick to be ignored on the LinkButtons as I have in the Image Buttons?
Thanks
The problem i'm having is that the row click always trigger the client side ajax... even if I've only clicked on the button controls.
I was able to get the behaviour I want with a different button (Image)
Here's the code to demonstrate the problem
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
/>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
<
ClientEvents
OnRowClick
=
"SelectShoppingList_RowClick"
/> <% This triggers an Ajax Call on Row Click %>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"Account_ID, List_ID"
ClientDataKeyNames
=
"Account_ID, List_ID"
>
<
Columns
>
<
telerik:GridButtonColumn
ButtonType
=
"ImageButton"
CommandName
=
"SelectList"
CommandArgument
=
"Account_ID, List_ID"
ImageUrl
=
"../Images/btSelectCharcoal.gif"
Visible
=
"false"
UniqueName
=
"SelectColumn"
>
</
telerik:GridButtonColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"TemplateColumn"
ItemStyle-Width
=
"400px"
>
<
ItemTemplate
>
<
asp:Label
ID
=
"lblTemplateName"
runat
=
"server"
CssClass
=
"slListName"
> <%# DataBinder.Eval(Container.DataItem, "List_Name")%></
asp:Label
><
br
/>
<
asp:Label
ID
=
"lblLastUpdated"
runat
=
"server"
CssClass
=
"slDetailLine"
> <%# DataBinder.Eval(Container.DataItem, "Detail_Line")%></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
UniqueName
=
"ItemsColumn"
DataField
=
"Item_Count_Display"
ItemStyle-Width
=
"80px"
ItemStyle-CssClass
=
"slItemCount"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
UniqueName
=
"CommandsColumn"
>
<
ItemTemplate
>
<
telerik:RadButton
ID
=
"btnRename"
runat
=
"server"
CommandName
=
"RenameList"
CommandArgument
=
"Account_ID, List_ID"
Text
=
"Rename"
UniqueName
=
"RenameColumn"
ButtonType
=
"LinkButton"
BorderWidth
=
"0"
Font-Underline
=
"true"
BackColor
=
"#063648"
ForeColor
=
"White"
>
</
telerik:RadButton
> <%OnClick on this button always triggers the Ajax Call which I do not want %>
<
br
/>
<
telerik:RadButton
ID
=
"btnDelete"
runat
=
"server"
CommandName
=
"DeleteList"
CommandArgument
=
"Account_ID, List_ID"
Text
=
"Delete"
UniqueName
=
"DeleteColumn"
ButtonType
=
"LinkButton"
BorderWidth
=
"0"
Font-Underline
=
"true"
BackColor
=
"#063648"
ForeColor
=
"White"
>
</
telerik:RadButton
><%OnClick on this button always triggers the Ajax Call which I do not want %>
<
telerik:RadButton
ID
=
"btnCancel"
runat
=
"server"
Width
=
"72"
Height
=
"31"
>
<
Image
ImageUrl
=
"../Images/btCancelCharcoal.gif"
/>
</
telerik:RadButton
><% This button does not trigger the AJAX call which is what i want%>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridButtonColumn
FilterControlAltText
=
"Filter DeleteCol column"
UniqueName
=
"DeleteCol"
ButtonType
=
"ImageButton"
CommandName
=
"DeleteItemFromShoppingList"
CommandArgument
=
"Account_ID,List_ID"
ConfirmText
=
"Are you sure you want to delete this item from the list ?"
ConfirmTitle
=
"Delete List"
ImageUrl
=
"..\Images\icoDeleteRedX.gif"
ItemStyle-HorizontalAlign
=
"Left"
> ><% Similarly This button does not trigger the AJAX call which is what i want%>
</
telerik:GridButtonColumn
>
</
Columns
>
</
MasterTableView
>
Why Can't i have the same rowclick to be ignored on the LinkButtons as I have in the Image Buttons?
Thanks