
| <asp:Repeater ID="rptAreeScopertura" runat="server"> |
| <HeaderTemplate> |
| <table class="Tabella"> |
| <tr> |
| <th class="CellaIntestazione" style="width: 40px;"> |
| <asp:Label ID="lblSelezionaTitolo" runat="server" /> |
| </th> |
| <th class="CellaIntestazione" style="width: 200px;"> |
| <asp:Label ID="lblAreaScoperturaTitolo" runat="server" /> |
| </th> |
| <th class="CellaIntestazione" style="width: 80px;"> |
| <asp:Label ID="lblTipoScoperturaTitolo" runat="server" /> |
| </th> |
| <th class="CellaIntestazione" style="width: 140px;"> |
| <asp:Label ID="lblTipoServizioInclusoTitolo" runat="server" /> |
| </th> |
| <th class="CellaIntestazione" style="width: 350px;"> |
| <asp:Label ID="lblTipoPeriodicitaOffertaTitolo" runat="server" /> |
| </th> |
| </tr> |
| </HeaderTemplate> |
| <ItemTemplate> |
| <tr> |
| <td style="text-align: center;"> |
| <input type="checkbox" id="chkProva" value='<%# Eval("IDAreaScopertura") %>' runat="server" |
| onclick="toggleTB(this);" /> |
| </td> |
| <td> |
| <asp:Label ID="lblAreaScopertura" runat="server" Text='<%# Eval("AreaScopertura") %>' /> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="rRadComboBoxTipoScopertura" runat="server" /> |
| </td> |
| <td> |
| <telerik:RadComboBox ID="rRadComboBoxTipoServizioIncluso" runat="server" /> |
| </td> |
| <td style="text-align: center;"> |
| <telerik:RadComboBox ID="rRadComboBoxTipoPeriodicitaOfferta" runat="server" /> |
| <asp:Label ID="lblOppure" runat="server" /> |
| <telerik:RadTextBox ID="rRadTextBoxTipoPeriodicitaPersonalizzata" runat="server" /> |
| </td> |
| </tr> |
| </ItemTemplate> |
| <FooterTemplate> |
| </table> |
| </FooterTemplate> |
| </asp:Repeater> |
| <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function toggleTB(what) { |
| var RadComboBox = $find("<%= rRadComboBoxTipoScopertura.ClientID %>"); |
| RadComboBox.enabled = what.checked; |
| } |
| </script> |
| </telerik:RadCodeBlock> |
| Name 'rRadComboBoxTipoScopertura' not declared. |
| Error in the following code source (Row 11): |
| Row 9: |
| Row 10: function toggleTB(what) { |
| Row 11: var RadComboBox = $find("<%= rRadComboBoxTipoScopertura.ClientID %>"); |
| Row 12: RadComboBox.disable(); |
| Row 13: } |
This is my problem.
I have this RadGrid with an EditFormTemplate (UserControl). With a button called "AddNew" we create a new row in the grid.
On the EditFormTemplate we want to have 3 buttons:
- Update
- Cancel
- Update and Insert New
The first two buttons was easy. Button with CommandName="Update" and CommandName="Cancel". These events are bubbled to the RadGrid and handled. The last button i'm lost on how this must be accumplished.
I've created a normal button and in the eventhandler i wrote:
this.RaiseBubbleEvent(sender, new CommandEventArgs("Update", null));
this.RaiseBubbleEvent(sender, new CommandEventArgs("InitInsert", null));
This first event is handled by the RadGrid, but the second one isn't.
How can i create a button the updates the current edited row, and inserts a new one...?