<
telerik:GridButtonColumn
CommandName
=
"Confirm1"
ConfirmDialogType
=
"RadWindow"
ConfirmText
=
"are you sure?"
ConfirmTitle
=
"Notice"
FilterControlAltText
=
"Filter Confirm column"
Text
=
"confirm"
UniqueName
=
"Confirm1"
> </
telerik:GridButtonColumn
>
i have this gridbutton
my problem is when i disable this button in "ItemCreated" from codebehind, its confirm message still be shown!!!
how i can disable its confirm message too?!
tanx
saman
5 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 25 Feb 2013, 04:11 AM
Hi,
Try disabling the cell as shown below.
C#:
Thanks,
Shinu
Try disabling the cell as shown below.
C#:
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
TableCell cell = (TableCell)item[
"Uniquename"
];
cell.Enabled =
false
;
}
}
Thanks,
Shinu
0

saman
Top achievements
Rank 1
answered on 25 Feb 2013, 05:30 AM
hi
first tnx for your attention
i implement your solution but did not work for me!
first tnx for your attention
i implement your solution but did not work for me!
protected void RadGrid1_OnItemDataBound(object sender, GridItemEventArgs e)
{
var grid = sender as RadGrid;
if (!(e.Item is GridDataItem)) return;
var Gitem = e.Item as GridDataItem;
if (!Gitem.OwnerTableView.Name.Contains("Contracts")) return;
var cell = Gitem["Confirm1"] as TableCell;
cell.Enabled = false;
}
0
Accepted

Shinu
Top achievements
Rank 2
answered on 26 Feb 2013, 03:29 AM
Hi,
Please try the following code snippet.
C#:
Javascript:
Thanks,
Shinu.
Please try the following code snippet.
C#:
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = e.Item
as
GridDataItem;
LinkButton link = (LinkButton)item[
"Select"
].Controls[0];
link.Enabled =
false
;
link.Attributes.Add(
"onclick"
,
"confirm();return false;"
);
}
}
Javascript:
function
confirm()
{
return
false
;
}
Thanks,
Shinu.
0

saman
Top achievements
Rank 1
answered on 26 Feb 2013, 05:36 AM
yes!!!
thank you very much
This is what I was looking for
thank you very much
This is what I was looking for
0

saman
Top achievements
Rank 1
answered on 26 Feb 2013, 05:37 AM
yes!!!
thank you very much
This is what I was looking for
thank you very much
This is what I was looking for