Dear All,
i am trying to create form as amount inputter, using RadNumericText and CompareValidator (to compare min max value between RadNumeric) through code behind. CompareValidator work perfectly where value of RadNumeric doesn't contain digit behind commas (attached images : data no 1), but, when i'm inputted value with commas, it's doesn't working as expected, as shown in the attached images.
No City Min Max
1 Aceh $ 100.001,00 $ 100.000,00
*Amount min cannot be greater than amount max
2. Yogya $ 100.000,00 $ 100.000,00
3. Banten $ 100.000,88 $ 100.000,99
*Amount min cannot be greater than amount max
From data above, no 1, CompareValidator working perfectly, but not for data no 3, where value has any digit behind commas. Any advice how to compare min max value with commas at data no 3 ?
Regard,
Ragil
protected RadNumericTextBox mytextbox;public void InstantiateIn(System.Web.UI.Control container){ mytextbox = new RadNumericTextBox(); mytextbox.AutoPostBack = false; mytextbox.ID = rankName + typeName + "MyTextBox"; mytextbox.NumberFormat.DecimalDigits = 2; mytextbox.NumberFormat.GroupSeparator = "."; mytextbox.NumberFormat.DecimalSeparator = ","; mytextbox.Type = NumericType.Currency; //mytextbox.DataType = "System.Decimal"; reqValid = new RequiredFieldValidator(); reqValid.ForeColor = System.Drawing.Color.Red; reqValid.ErrorMessage = "* Required field"; reqValid.CssClass = "has-error"; reqValid.ControlToValidate = rankName + typeName + "MyTextBox"; reqValid.Display = ValidatorDisplay.Dynamic; if (typeName == "Max") { compValid = new CompareValidator(); compValid.ForeColor = System.Drawing.Color.Red; compValid.ErrorMessage = "* Amount Min can not be greater than Amount Max"; compValid.CssClass = "has-error"; compValid.Display = ValidatorDisplay.Dynamic; compValid.ControlToValidate = rankName + "Max" + "MyTextBox"; compValid.ControlToCompare = rankName + "Min" + "MyTextBox"; compValid.Operator = ValidationCompareOperator.GreaterThanEqual; compValid.Type = ValidationDataType.Currency; compValid.ValidationGroup = "ValidateAmount"; } container.Controls.Add(mytextbox); container.Controls.Add(reqValid); if (typeName == "Max") { container.Controls.Add(compValid); }}
Hello,
I have a radcombobox, and when I disable it, I can still enter text in the textbox. How can I also disable the textbox so no text can be enter when my combobox is desabled ?
Thanx for your help.

<telerik:RadGrid ID="rgd_TaskPermissions" runat="server" GridLines="None" AutoGenerateColumns="False" Width="320px"> <MasterTableView> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="Object" HeaderText="Table" SortExpression="Object" UniqueName="Object" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Select" HeaderText="Select" SortExpression="Select" UniqueName="Select" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Update" HeaderText="Update" SortExpression="Update" UniqueName="Update" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Insert" HeaderText="Insert" SortExpression="Insert" UniqueName="Insert" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Delete" HeaderText="Delete" SortExpression="Delete" UniqueName="Delete" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="TemplateColumn"> <ItemTemplate> <asp:Button ID="btn_ModifyPerms" runat="server" Text="Modify" /> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Label1.Text = Session("Object") rgd_TaskPermissions.DataSource = GetPermissions() rgd_TaskPermissions.DataBind() End SubPrivate Function GetPermissions() As DataTable Dim Table As String = Session("Object") Dim DatabaseName As String = Session("DBName") Dim Grantee As String = Session("TaskRole") Dim connectionString = New SqlConnection("server=DO-IT-AB\MSSQLAB;database=AeriesAdmin;UID=XXX;PWD=XXX;") Dim command = New SqlCommand("aa_task_table_permissions_by_object", connectionString) command.CommandType = CommandType.StoredProcedure command.Parameters.Add("@DBName", SqlDbType.VarChar).Value = DatabaseName command.Parameters.Add("@Grantee", SqlDbType.VarChar).Value = Grantee command.Parameters.Add("@Table", SqlDbType.VarChar).Value = Table command.Connection.Open() Dim myDataAdapter As New SqlDataAdapter(command) Dim myDataSet As New DataSet Dim dtData As New DataTable myDataAdapter.Fill(myDataSet) Return myDataSet.Tables(0) command.Connection.Close() End FunctionUSE [AeriesAdmin] GO SET ANSI_NULLS ONGO SET QUOTED_IDENTIFIER ONGO CREATE PROCEDURE [dbo].[aa_task_table_permissions_by_object] @dbname sysname, @Grantee varchar(25), @Table varchar(25) AS BEGIN IF OBJECT_ID('tempdb..#tmpResults') IS NOT NULL DROP TABLE #tmpResults CREATE TABLE #tmpResults ( [Owner] NVARCHAR(MAX), [Object] NVARCHAR(MAX), [Grantee] NVARCHAR(MAX), [Grantor] NVARCHAR(MAX), [ProtectType] NVARCHAR(MAX), [Action] NVARCHAR(MAX), [Column] NVARCHAR(MAX) ) DECLARE @sp_executesql nvarchar(1024) SELECT @sp_executesql = @dbname + '.sys.sp_executesql' INSERT INTO #tmpResults ( [Owner], [Object], [Grantee], [Grantor], [ProtectType], [Action], [Column] ) EXECUTE @sp_ExecuteSQL N'sp_Helprotect' ;with cte as (select Object, Grantee, Action, row_number() over (partition by Object, Grantee ORDER BY Action) as Row from #TmpResults) select Object, Grantee, max(case when Action = 'Delete' then char(88) end) as [Delete], max(case when Action = 'Insert' then char(88) end) as [Insert], max(case when Action = 'Select' then char(88) end) as [Select], max(case when Action = 'Update' then char(88) end) as [Update] from #TmpResults WHERE Grantee = @Grantee AND [Object] LIKE @Table GROUP by Object, Grantee END GO
ASPX:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TelerikUpload.aspx.cs" Inherits="ImportMPV2_WebTest.TelerikUpload" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> <div> <telerik:RadAsyncUpload AllowedFileExtensions="xlsx" EnableInlineProgress="true" ID="RadAsyncUpload1" MaxFileInputsCount="1" MultipleFileSelection="Disabled" OnFileUploaded="RadAsyncUpload1_FileUploaded" RenderMode="Lightweight" runat="server" Skin="Telerik" TargetDir="Uploads"> <FileFilters> <telerik:FileFilter Description="Excel Files(xlsx)" Extensions="xlsx" /> </FileFilters> </telerik:RadAsyncUpload> </div> <br /> <telerik:RadButton AutoPostBack="true" runat="server" Text="Import" Skin="Telerik" /> </form> <pre><asp:label id="lblUploadResults" runat="server"></asp:label> </pre> <pre><asp:label id="lblSSISResults" runat="server"></asp:label> </pre></body></html>
Code behind:
protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e){ UploadedFile uploadFile = e.File; string xlFilePath = Path.Combine(Server.MapPath(WebConfigurationManager.AppSettings["uploadDir"]), uploadFile.FileName); // Display upload results lblUploadResults.Text = "File Uploaded\n" + "File name: " + uploadFile.FileName + "\n" + "Content type: " + uploadFile.ContentType + "\n" + "Content length: " + uploadFile.ContentLength + "\n" + "Last modified date: " + uploadFile.LastModifiedDate + "\n"; // Execute SSIS package SSISExecutor ssisExecutor = new SSISExecutor( xlFilePath , "Balance Import" , "gregorym" , false , WebConfigurationManager.AppSettings["logFilePath"] , WebConfigurationManager.ConnectionStrings["DatabasePEP1"].ConnectionString ); ssisExecutor.Exec(out List<string> resultList); // Display SSIS results string s = "SSIS results:\n" + xlFilePath + ":\n\n"; foreach (string result in resultList) { s += result + "\n"; } lblSSISResults.Text = s;}
Output:
File UploadedFile name: ImportV2_Sample.xlsxContent type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheetContent length: 326210Last modified date: 1/13/2020 4:47:40 PM SSIS results:C:\ImportMPV2_WebTest\Uploads\ImportV2_Sample.xlsx:Error: File "C:\ImportMPV2_WebTest\Uploads\ImportV2_Sample.xlsx" not found
Hoping somebody can help me here. I am following an example posted by Telerik on how to do this in this forum. I am getting "" returned as the value for every column value (.Text). All of my grid columns are GridtTmplateColumns and the column values are labels within the template.
How do accomplish this with GridTemplateColumns? I have been struggling with this for the entire day. Can I somehow use item.findcontrol here?
Dim dtRecs As DataTable = New DataTable
For Each col As GridColumn In rgbt.Columns
If (col.ColumnType = "GridTemplateColumn") Then
Dim colstring As String
colstring = col.UniqueName
dtRecs.Columns.Add(colstring)
End If
Next
For Each item As GridDataItem In rgbt.Items
Dim newRow As DataRow = dtRecs.NewRow()
For Each column As GridColumn In rgbt.Columns
If (column.ColumnType = "GridTemplateColumn") Then
newRow(column.UniqueName) = item.(column.UniqueName).Text 'RETURNS ""
dtRecs.Rows.Add(newRow)
End If
Next
Next
Thanks!
Hi,
I get an error [HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.]
with:
<telerik:radButton ButtonType="LinkButton" NavigateUrl="~/shop/shoppingcart.aspx" id="btn_nextsteptop" runat="server"><ContentTemplate>
<asp:Literal ID="Literal1" Text="Jippeee" runat="server"></asp:Literal></ContentTemplate></telerik:radButton>
When I remove the tilde then the error is not occuring, so probably the relative path functionality is broken here?
Marc
hi , i am using rad window to display content, i need to change color of the rad window from gray to white color
screenshot : http://prntscr.com/qr3k2i
Thanks


I have several RadGrids nested within their own ASP.NET UpdatePanels which are within an ASP.NET MultiView. I'm experiencing issues when it comes to exporting the RadGrid to Excel.
I know that the control needs to be registered to allow a PostBack, but I want to specifically register the in-built ExportToExcel button. In the ItemCreated event, I was able to identify GridCommandItems and register them as PostBackControls, but this is also registering the "Add New Record" button, causing a PostBack to occur if they click the "Add New Record" button.
Is there any way to programmatically identify JUST the "Export to Excel" Command Item?
