| <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...?
<
telerik:GridTemplateColumn HeaderText="Sube" SortExpression="SubeId" UniqueName="SubeIdddl" AllowFiltering = "true" filterlistoptions="AllowAllFilters" >
<ItemTemplate >
<asp:DropDownList ID="DropDownList1" runat="server" DataValueField = "SubeID" DataTextField = "SubeAdi"
DataSourceID="MyDataSourceSubeler" SelectedValue='<%# Bind("SubeId") %>' Enabled = "false" Width = "200">
</asp:DropDownList>
</ItemTemplate>
<ItemStyle Width="200px"></ItemStyle>
</telerik:GridTemplateColumn>
However it throws a worktime error saying that:
Microsoft JScript worktime error: Sys.WebForms.PageRequestManagerServerErrorException: Expression expected
How can i handle that? thanks...
| <body> |
| <form id="form1" runat="server"> |
| <div> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server" ScriptMode="Debug"> |
| </telerik:RadScriptManager> |
| <telerik:RadDockLayout ID="RadDockLayout1" runat="server"> |
| <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"> |
| <telerik:RadDock ID="RadDock1" runat="server" Width="300px" CommandsAutoPostBack="true" |
| AutoPostBack="true"> |
| <Commands> |
| <telerik:DockCloseCommand AutoPostBack="true" /> |
| </Commands> |
| <ContentTemplate> |
| test |
| </ContentTemplate> |
| </telerik:RadDock> |
| </telerik:RadDockZone> |
| </telerik:RadDockLayout> |
| </div> |
| </form> |
| </body> |