Mohamed El-Sayed
Top achievements
Rank 1
Mohamed El-Sayed
asked on 11 Mar 2013, 09:45 AM
i want to hide the update button if the row was updated ,
just want to update one time only
just want to update one time only
4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 11 Mar 2013, 10:16 AM
Hi,
Try the following code to achieve your scenario.
C#:
Thanks,
Shinu
Try the following code to achieve your scenario.
C#:
protected
void
RadGrid1_ItemCommand(
object
sender, GridCommandEventArgs e)
{
if
(e.CommandName == RadGrid.UpdateCommandName)
{
LinkButton updateButton = (LinkButton)e.Item.FindControl(
"UpdateButton"
);
updateButton.Visible =
false
;
}
}
Thanks,
Shinu
0
Mohamed El-Sayed
Top achievements
Rank 1
answered on 11 Mar 2013, 10:33 AM
an error appear in the attachment
<
telerik:GridEditCommandColumn
EditText
=
"Confirm"
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
telerik:GridEditCommandColumn
>
0
Hi Mohamed,
I am not completely sure which button you want to hide the edit button or the update button. I prepared a small sample where I demonstrates how to hide the edit button if the row has been previously updated. Basically I saved the previously updated rows in the ViewState and accordingly OnPreRender event I hide them. Give it a try and let me know about the result.
Kind regards,
Kostadin
the Telerik team
I am not completely sure which button you want to hide the edit button or the update button. I prepared a small sample where I demonstrates how to hide the edit button if the row has been previously updated. Basically I saved the previously updated rows in the ViewState and accordingly OnPreRender event I hide them. Give it a try and let me know about the result.
Kind regards,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Mohamed El-Sayed
Top achievements
Rank 1
answered on 14 Mar 2013, 09:35 AM
Thanks Kostadin :)