Roberto Yudice
Top achievements
Rank 1
Roberto Yudice
asked on 07 May 2010, 05:09 PM
Hi, I have a radgrid with some columns generated automatically and a linqdatasource as the grid's datasource, I have a problem that the command buttons for update and insert in the edit item do not trigger an item command on the grid, I already debugged it an the debugger doesnt step in to the item command method and neither the datasource inserting method trigger so I guess the button commandname is wrong or is empty, is there any way to set these? thanks!
3 Answers, 1 is accepted
0
robertw102
Top achievements
Rank 1
answered on 07 May 2010, 05:40 PM
What does your RadGrid declaration look like? Are you using the RadGrid's built-in Automatic Operations or are you handling them yourself?
If you're using the Automatic Operations, did you set AllowAutomaticInserts/AllowAutomaticUpdates/AllowAutomaticDeletes to true?
0
Roberto Yudice
Top achievements
Rank 1
answered on 07 May 2010, 06:17 PM
Hi, here is my grid definition
Thanks for your response.
<telerik:RadGrid ID="rgCatalogoGenerico" runat="server" AllowAutomaticDeletes="True" |
AllowAutomaticInserts="True" AllowAutomaticUpdates="True" DataSourceID="LinqDataSource1" |
GridLines="None" AutoGenerateColumns="False" AllowFilteringByColumn="True" AllowPaging="True" |
AllowSorting="True" |
Height="350px" onitemcommand="rgCatalogoGenerico_ItemCommand" |
onitemcreated="rgCatalogoGenerico_ItemCreated" |
onitemdatabound="rgCatalogoGenerico_ItemDataBound" |
onitemupdated="rgCatalogoGenerico_ItemUpdated"> |
<MasterTableView AutoGenerateColumns="False" DataSourceID="LinqDataSource1" CommandItemDisplay="Top" |
NoDetailRecordsText="No se encontraron registros." NoMasterRecordsText="No se encontraron registros." |
CssClass="grid_catalogos" > |
<ItemStyle CssClass="grid_text" /> |
<AlternatingItemStyle CssClass="grid_text" /> |
<HeaderStyle CssClass="grid_header" Font-Bold="true" /> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px"></HeaderStyle> |
</ExpandCollapseColumn> |
<CommandItemSettings AddNewRecordText="Adicionar" RefreshText="Refrescar" /> |
<CommandItemStyle CssClass="grid_command" /> |
<EditFormSettings> |
<EditColumn UpdateText="Guardar" CancelText="Cancelar" InsertText="Guardar" ButtonType="LinkButton"> |
</EditColumn> |
</EditFormSettings> |
</MasterTableView> |
<ClientSettings> |
<Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
</ClientSettings> |
</telerik:RadGrid> |
0
Hi Roberto,
Please check out the following online examples which demonstrate how to perform automatic and manual GRUD operation over the RadGrid with LinqDataSource and LinqToSql:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/linqdatasource/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx
I hope this helps
Regards,
Radoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Please check out the following online examples which demonstrate how to perform automatic and manual GRUD operation over the RadGrid with LinqDataSource and LinqToSql:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/linqdatasource/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx
I hope this helps
Regards,
Radoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.