6 Answers, 1 is accepted
0
Hello Markus,
You can set CommandName to "InitInsert" to achieve this.
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can set CommandName to "InitInsert" to achieve this.
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 16 Jan 2008, 02:19 PM
Im sorry but this is not what I want to know. May be my explanation of not so well. I just want to have the"Add new item", "Edit" and "Delete" buttons to execute my own actions instead of the build in ones.
0
Hi Markus,
Sorry for this miscommunication.
If you change the CommandName for desired GridButtonColumn you can handle this command in ItemCommand. Here is an example:
<telerik:GridButtonColumn CommandName="MyDelete" ...
ItemCommand:
if(e.CommandName == "MyDelete")
{
//
}
For the "Add new record" you can define your own CommandItemTemplate where you can add a Button with desired CommandName and again using ItemCommand you can handle this.
Regards,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Sorry for this miscommunication.
If you change the CommandName for desired GridButtonColumn you can handle this command in ItemCommand. Here is an example:
<telerik:GridButtonColumn CommandName="MyDelete" ...
ItemCommand:
if(e.CommandName == "MyDelete")
{
//
}
For the "Add new record" you can define your own CommandItemTemplate where you can add a Button with desired CommandName and again using ItemCommand you can handle this.
Regards,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 17 Jan 2008, 02:16 PM
Thanks! Thas what I need. But now I have another problem. I use follwoing code to hide command in "ButtonCollumn" for special records (rows in grid). This is no more working if I press one of the commands once. Where is the problem?
| If TypeOf e.Item Is GridDataItem Then |
| objDataItem = CType(e.Item, GridDataItem) |
| If CType(objDataItem("CancellationInd").Controls(1), Image).ImageUrl.IndexOf("empty") = -1 Then |
| objDataItem("EditDataColumn").Controls.Clear() |
| objDataItem("CancelDataColumn").Controls.Clear() |
| End If |
| End If |
0
Hi Markus,
Can you try to Rebind() the current table view to see what will be the result? Here is an example:
e.Item.OnwerTableView.Rebind()
Greetings,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Can you try to Rebind() the current table view to see what will be the result? Here is an example:
e.Item.OnwerTableView.Rebind()
Greetings,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 18 Jan 2008, 01:14 PM
Hello Vlad,
now it is working, thanks for great support!
Regards Markus
now it is working, thanks for great support!
Regards Markus
