Hi
Im trying to create a Grid entirely from code. But I am experiencing som problems when I add a "GridButtonColumn" and specify a CommandName. In "RadGrid_ItemCommand" when I check the value of e.CommandName I get an empty string.
This I how my column is defined:
If the add the column to my grid the "standard" way like:
.. then it works fine (e.CommandName = "ModifyItem").
Does anyone know if the is a bug when setting the "CommandName" in code.
Could anyone please provide me with a working example of creating a GridButtonColumn from code with a CommandName that can be checked in the even "ItemCommand".
Thanks In advance
Im trying to create a Grid entirely from code. But I am experiencing som problems when I add a "GridButtonColumn" and specify a CommandName. In "RadGrid_ItemCommand" when I check the value of e.CommandName I get an empty string.
This I how my column is defined:
Telerik.Web.UI.GridButtonColumn cColumn3 = new Telerik.Web.UI.GridButtonColumn(); |
cColumn3.HeaderText = "Header1"; |
cColumn3.UniqueName = "column1"; |
cColumn3.DataTextField = "name"; |
cColumn3.CommandName = "ModifyItem"; |
If the add the column to my grid the "standard" way like:
<MasterTableView> |
<Columns> |
<telerik:GridButtonColumn HeaderText="Header1" UniqueName="column1" CommandName="ModifyItem" DataTextField="name"/> |
</Columns> |
</MasterTableView> |
.. then it works fine (e.CommandName = "ModifyItem").
Does anyone know if the is a bug when setting the "CommandName" in code.
Could anyone please provide me with a working example of creating a GridButtonColumn from code with a CommandName that can be checked in the even "ItemCommand".
Thanks In advance