<telerik:RadGrid ID="VendProdGrid" GridLines="None" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="False" AllowAutomaticUpdates="False" PageSize="10" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="VendProdGridSource" OnItemUpdated="VendProdGrid_ItemUpdated" OnItemDeleted="VendProdGrid_ItemDeleted" OnItemInserted="VendProdGrid1_ItemInserted" OnItemCommand="VendProdGrid_ItemCommand" OnUpdateCommand="VendProdGrid_Update" OnDataBound="VendProdGrid_DataBound" EnableEmbeddedScripts="false"> <PagerStyle Mode="NextPrevAndNumeric" /> <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="VProductID" DataSourceID="VendProdGridSource" HorizontalAlign="NotSet" AutoGenerateColumns="False"> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" /> <telerik:GridTemplateColumn UniqueName="TemplateColumn"> <HeaderTemplate> <strong>Product Type</strong> </HeaderTemplate> <ItemTemplate> <strong><%# DataBinder.Eval(Container.DataItem, "VProductType")%></strong><br /> <em><%# DataBinder.Eval(Container.DataItem, "VProductDescription")%></em> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="SupplierName" HeaderText="Supplier" SortExpression="SupplierName" UniqueName="SupplierName"></telerik:GridBoundColumn> <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" /> </Columns> <EditFormSettings EditFormType="Template"> <EditColumn UniqueName="EditCommandColumn1"> </EditColumn> <FormTemplate> <table cellspacing="2" cellpadding="1" width="100%" border="0"> <tr> <td>Supplier:</td> <td> <telerik:RadComboBox ID="SupplierCB" runat="server" DropDownWidth="300" DataSourceID="SQLSupplierSource" DataValueField="SupplierID" DataTextField="SupplierName" AppendDataBoundItems="false" EnableLoadOnDemand="false" > </telerik:RadComboBox> </td> </tr> <tr> <td> Product Type: </td> <td> <telerik:RadComboBox ID="VProductTypeCB" runat="server" DropDownWidth="300" DataSourceID="SQLVendorProductTypeList" DataValueField="VProductTypeID" DataTextField="VProductType" AppendDataBoundItems="false" EnableLoadOnDemand="false" > </telerik:RadComboBox> </td> </tr> <tr> <td> Description:</td> <td> <asp:textbox runat="server" id="VProductDescriptionEdit" causesvalidation="False" textmode="MultiLine" width="300px" uniqueid="VProductDescriptionEdit" rows="5" text='<%# DataBinder.Eval(Container.DataItem, "VProductDescription") %>' ></asp:textbox> </td> </tr> <tr> <td> Limitations:</td> <td> <asp:textbox runat="server" id="VProductLimitationsEdit" CausesValidation="False" TextMode="MultiLine" Width="300px" UniqueID="VProductLimitationsEdit" Rows="5" Text='<%# DataBinder.Eval(Container.DataItem, "VProductLimitations") %>' ></asp:textbox> </td> </tr> <tr> <td> Reference Standards:</td> <td> <asp:textbox runat="server" id="VRefStandardEdit" CausesValidation="False" TextMode="MultiLine" Width="300px" UniqueID="VRefStandardEdit" Rows="5" Text='<%# DataBinder.Eval(Container.DataItem, "VRefStandard") %>' ></asp:textbox> </td> </tr> <tr> <td colspan="2"> <asp:Button ID="Button1" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button> <asp:Button ID="Button2" runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel"></asp:Button> </td> </tr> </table> </FormTemplate> </EditFormSettings> </MasterTableView></telerik:RadGrid>protected void VendProdGrid_Update(object source, GridCommandEventArgs e) { if (e.CommandName == RadGrid.UpdateCommandName) { if (e.Item is GridEditFormItem) { GridEditFormItem item = (GridEditFormItem)e.Item; int id = Convert.ToInt32(item.GetDataKeyValue("VProductID")); if (id != 0) { RadComboBox SupplierCB = item.FindControl("SupplierCB") as RadComboBox; RadComboBox VProductTypeID = item.FindControl("VProductTypeCB") as RadComboBox; TextBox VProductDescription = item.FindControl("VProductDescriptionEdit") as TextBox; TextBox VProductLimitations = item.FindControl("VProductLimitationsEdit") as TextBox; TextBox VRefStandard = item.FindControl("VRefStandardEdit") as TextBox; try { VendProdGridSource.UpdateParameters.Add("SupplierID", TypeCode.Int32, SupplierCB.SelectedValue.ToString()); VendProdGridSource.UpdateParameters.Add("VProductTypeID", TypeCode.Int32, VProductTypeID.SelectedValue.ToString()); VendProdGridSource.UpdateParameters.Add("VProductDescription", TypeCode.String, VProductDescription.Text); VendProdGridSource.UpdateParameters.Add("VProductLimitations", TypeCode.String, VProductLimitations.Text); VendProdGridSource.UpdateParameters.Add("VRefStandard", TypeCode.String, VRefStandard.Text); VendProdGridSource.Update(); // //e.KeepInEditMode = false; //e.ExceptionHandled = true; SetMessage("New Product Type " + id + " is updated!"); } catch (Exception ex) { // e.ExceptionHandled = true; SetMessage("Product Type " + id + " cannot be updated. Reason: " + ex.Message); } // e.Canceled = true; VendProdGrid.Rebind(); } } } }| var panel = $find('xmlCallbackPanel'); |
| //Callback to the webservice for each item |
| $('.callbackitem').each(function () { |
| var dateid = $(this).attr('id'); |
| var text = $('#debugPanel').html(); |
| $('#debugPanel').html(text + "<br />" + dateid); |
| panel.set_value(dateid); |
| }); |


Hi,
I try to validate two RadNumericTextBox control by CompareValidator:
| <telerik:RadNumericTextBox id="NumberMinValueTextBox" runat="server" /> |
| <telerik:RadNumericTextBox id="NumberMaxValueTextBox" runat="server" /> |
| <asp:CompareValidator ID="NumberMinMaxValidator" runat="server" ErrorMessage="The max value couldn't be less than the min value." Operator="GreaterThanEqual" ControlToCompare="NumberMinValueTextBox" ControlToValidate="NumberMaxValueTextBox" ValidationGroup="NumberField" Display="Dynamic" /> |
It works ok only, when the compared values in the both min and max control contain the same number of digits.
(i.e min = 1, max = 9 or min = 10, max = 25 etc.)
But when I enter e.g. '12' to min control and '102' validation failed. It looks that the max value is trimmed from '102' to '10' then 12 > 10 and validatio failed.
What am I doing wrong? Thanks in advance.
<
telerik:RadEditor DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd" runat="server" ID="RadEditor1" SkinID="DefaultSetOfTools" Height="800" Width="700" Skin="Telerik" OnClientLoad="OnClientLoad"></telerik:RadEditor>
RadEditor1.DocumentManager.ViewPaths =
new string[] { "/path/" + variable+ "/" };
RadEditor1.DocumentManager.UploadPaths =
new string[] { "/path/" + variable+ "/" };
RadEditor1.DocumentManager.DeletePaths =
new string[] { "/path/" + variable+ "/" };
Thanks!
