Hi,
I have a hyper link column in my radgrid and I use <href=" "> for that. Its a "Remove" hyperlink which when clicked should delete the particular row on the client side. How can I access the cell of the column where the hyperlink is clicked. I tried to set the onclick event of the hyperlink to a function where I set the command name as Remove and in the Onrowselected event I check for the condition if the command="Remove" and then delete the row but this doesn't work as the Onrowselected event doesn't fire when I click on the hyperlink. When I click the hyperlink it just goes to the Onclick event of that and stops there.
I need a way to call the Onrowselected event when I click the hyperlink(href link) or if that is not possible then I need to delete the row in the Onclick client event of the hyperlink and for that I should be able to access the particular cell of the row.
FYI: I need to delete the rows on client side and I use the html href for the hyperlink as I had some issues using the telerik hyperlink column.
<Telerik:GridTemplalteColumn UniqueName="Remove">
<ItemTemplate>
<a href="javascript:void(0);" OnClick=OnRemove();> <u>Remove</u> </a>
</ItemTemplate>
</Telerik:GridTemplalteColumn >
function OnRemove()
{
command="Remove";
}
function OnRowSelected(){
//functionality to get the grid and delete the row here
}
Please suggest a way to do this.
Thank you,
Vik
I have a hyper link column in my radgrid and I use <href=" "> for that. Its a "Remove" hyperlink which when clicked should delete the particular row on the client side. How can I access the cell of the column where the hyperlink is clicked. I tried to set the onclick event of the hyperlink to a function where I set the command name as Remove and in the Onrowselected event I check for the condition if the command="Remove" and then delete the row but this doesn't work as the Onrowselected event doesn't fire when I click on the hyperlink. When I click the hyperlink it just goes to the Onclick event of that and stops there.
I need a way to call the Onrowselected event when I click the hyperlink(href link) or if that is not possible then I need to delete the row in the Onclick client event of the hyperlink and for that I should be able to access the particular cell of the row.
FYI: I need to delete the rows on client side and I use the html href for the hyperlink as I had some issues using the telerik hyperlink column.
<Telerik:GridTemplalteColumn UniqueName="Remove">
<ItemTemplate>
<a href="javascript:void(0);" OnClick=OnRemove();> <u>Remove</u> </a>
</ItemTemplate>
</Telerik:GridTemplalteColumn >
function OnRemove()
{
command="Remove";
}
function OnRowSelected(){
//functionality to get the grid and delete the row here
}
Please suggest a way to do this.
Thank you,
Vik