I have a radgrid which is batch edit mode. How can I get one column value and set Max value to another Column in grid.
Thank You.
Hello,
As far as I know the RadMap is missing a Scale control.
Researching what to do i came across the following example to manually add one: http://dojo.telerik.com/ogAke
I have implemented this but its not satisfying, in bigger zooms there is a bug and the numbers go smaller. (i believe the javascript var is overflowing)
Anyhow, do you have any suggestions about which alternative could i follow to implement a nice scale? Is Telerik planning on adding the scale?
Thank you!
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadAjaxProblem.aspx.cs" |
Inherits="Ajax.RadAjaxProblem" %> |
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title>Test Ajax</title> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="scriptManagerProxy1" runat="server"> |
</asp:ScriptManager> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="radNumber1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="lblTotal" UpdatePanelRenderMode="Inline" /> |
<telerik:AjaxUpdatedControl ControlID="btnOk" UpdatePanelRenderMode="Inline" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="radNumber2"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="lblTotal" UpdatePanelRenderMode="Inline" /> |
<telerik:AjaxUpdatedControl ControlID="btnOk" UpdatePanelRenderMode="Inline" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="btnOk"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="lblMessage" UpdatePanelRenderMode="Inline" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<div style="margin:50px" > |
<telerik:RadNumericTextBox ID="radNumber1" runat="server" Type="Number" MinValue="1" |
AutoPostBack="true" NumberFormat-DecimalDigits="0" Width="75px" ShowSpinButtons="true" |
Value="1" OnTextChanged="OnNumber1Changed" /> |
plus |
<telerik:RadNumericTextBox ID="radNumber2" runat="server" Type="Number" MinValue="1" |
AutoPostBack="true" NumberFormat-DecimalDigits="0" Width="75px" ShowSpinButtons="true" |
Value="1" OnTextChanged="OnNumber2Changed" /> |
equals |
<asp:Label runat="server" ID="lblTotal"></asp:Label>. |
<p> |
Message: |
<asp:Label ID="lblMessage" runat="server" Text="..."></asp:Label> |
</p> |
<p> |
<asp:Button runat="server" ID="btnOk" OnClick="btnOk_Click" Text="OK" /> |
</p> |
</div> |
</form> |
</body> |
</html> |
using System; |
using Telerik.Web.UI; |
namespace Ajax |
{ |
public partial class RadAjaxProblem : System.Web.UI.Page |
{ |
protected void Page_Load(object sender, EventArgs e) |
{ |
} |
private void UpdateTotal() |
{ |
int arg1 = (int) (radNumber1.Value.HasValue ? radNumber1.Value.Value : 0); |
int arg2 = (int) (radNumber2.Value.HasValue ? radNumber2.Value.Value : 0); |
lblTotal.Text = String.Format("{0}", arg1 + arg2); |
} |
protected void OnNumber1Changed(object sender, EventArgs e) |
{ |
UpdateTotal(); |
} |
protected void OnNumber2Changed(object sender, EventArgs e) |
{ |
UpdateTotal(); |
} |
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) |
{ |
} |
protected void btnOk_Click(object sender, EventArgs e) |
{ |
lblMessage.Text = String.Format("OK clicked at " + DateTime.Now.ToLongTimeString()); |
} |
} |
} |
Hello
On a page I have RadNavigation menu with submenu and a AutoCompleteBox with OnEntryAdded event. If I put the AutoCompleteBox inside the UpdatePanel, after OnEntryAdded is fired, RadNavigation menu does not work anymore - it's blocked, I can't access submenu nodes. There is no javascript errors on the page, so I don't know how to fix this. Can you help me please.
I'm attaching the sample code which you can use to see the issue.
<%@ Page Title="" Language="VB" AutoEventWireup="false" CodeFile="test1.aspx.vb" Inherits="test1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<form id="form1" enctype="multipart/form-data" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" EnableScriptGlobalization="true" Runat="server">
</telerik:RadScriptManager>
<telerik:RadNavigation ID="radNav" Skin="MetroTouch" Font-Size="Medium" runat="server" RenderMode="Auto">
<Nodes>
<telerik:NavigationNode Text="Test">
<Nodes>
<telerik:NavigationNode NavigateUrl="test1.aspx" Text="Test 1"></telerik:NavigationNode>
<telerik:NavigationNode NavigateUrl="test1.aspx" Text="Test 2"></telerik:NavigationNode>
</Nodes>
</telerik:NavigationNode>
</Nodes>
</telerik:RadNavigation>
<asp:UpdatePanel runat="server" ID="up1">
<ContentTemplate>
<telerik:RadAutoCompleteBox OnEntryAdded="drpLista_EntryAdded" ID="RadAutoCompleteBox1" Width="180px" runat="server" Skin="Bootstrap">
</telerik:RadAutoCompleteBox>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
Imports System.Data
Imports System.Data.SqlClient
Imports Telerik.Web.UI
Partial Class test1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
BindToArrayList(RadAutoCompleteBox1)
End Sub 'Page_Load
Private Sub BindToArrayList(ByVal autoCompleteBox As RadAutoCompleteBox)
Dim itemsList As New ArrayList()
itemsList.Add("One")
itemsList.Add("Two")
itemsList.Add("Three")
autoCompleteBox.DataSource = itemsList
End Sub 'BindToArrayList
Protected Sub drpLista_EntryAdded(sender As Object, e As AutoCompleteEntryEventArgs)
End Sub
End Class
On Firefox the Radeditor imagemanager window is:
1. Always sticking on top of browserwindow
2. not high enough for content, see screenshot.
Marc01.
protected
void
RDDL_Statut_Load(
object
sender, EventArgs e)
02.
{
03.
DC_FiltragesDataContext Mydb =
new
DC_FiltragesDataContext();
04.
var results = (from U
in
Mydb.PLOP
05.
select
new
{ statut = U.STATUT}).Distinct();
06.
07.
RDDL_Statut.DataSource = results;
08.
RDDL_Statut.DataTextField =
"statut"
;
09.
RDDL_Statut.DataValueField =
"statut"
;
10.
11.
RDDL_Statut.DataBind();
12.
RDDL_Statut.Items.Insert(0,
new
DropDownListItem(
"--ALL STATUT--", "
ALL"));
13.
14.
}
Hi, I have an issue with my drop down list.
Lets say that i have a DropDownList Displaying : A, B ,C , D etc. And I need a default item.
Using this code , my data is not correctly bound.
The display of the DrowDownList Is the one i expected . But my "RDDL_Statut.SelectedItem.Value.ToString()" Is returning the Next Index.
When A is clicked I get B value.
i have used demo code from the http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/client-side/client-item-template/defaultvb.aspx?show-source=true
and i got error message :
Parser Error Description: An error occurred during the parsing of
a resource required to service this request. Please review the
following specific parse error details and modify your source file
appropriately.
Parser Error Message: Type 'Telerik.Web.UI.GridTemplateColumn' does not have a public property named 'clientitemtemplate'.
Source Error:
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="TitleClientTemplateColumn" HeaderText="Title"> Line 30:
<clientitemtemplate>
<span style="#=formatTitle(ContactTitle)#">#=ContactTitle #</span>
</clientitemtemplate>
I seem to have problems using a RadProgressArea together with a webservice method called from client side.
If I on the other hand use a code behind function as the way of updating the progress, the updating of the progress works.
Why?
I will start with describing the working approach with code behind and then the client side calling a webservice approach.
Working setup
In the webpage, I have a telerik:RadProgressArea and a RadProgressManager:
<
telerik:RadProgressArea
ID
=
"progressArea"
ProgressIndicators="TotalProgressBar,TotalProgressPercent" Skin="Metro"
HeaderText="Please wait!" runat="server"/>
<
telerik:RadProgressManager
ID
=
"progressManager"
runat
=
"server"
/>
I also have an asp:Button like:
OnClick="Button1_Click"
In that code behind eventhandler I perform a lot of work. It has a loop where it performs some tasks. Before the loop, I have this code:
var progress = RadProgressContext.Current;
var num = 0;
var maxnum = tasks.Count();
progress.PrimaryPercent = 0;
progress.PrimaryValue = 0;
progress.PrimaryTotal = maxnum;
After every task, in other words in the end of the loop, I update PrimaryPercent and PrimaryValue like:
num++;
progress.PrimaryPercent = num * 100 / maxnum;
progress.PrimaryValue = num;
rapMain.ResponseScripts.Add("CloseWindow()");
var rawProgressData = {InProgress:true,ProgressCounters:true,PrimaryPercent:'81',PrimaryValue:'111',PrimaryTotal:'136'};
The non working setup (using a WebService)
I have an aspx file with an identical setup as in the working case.
I call the web method with javascript:
var progressBar = $find(progressAreaId);
progressBar.show();
var pm = getRadProgressManager();
pm.startProgressPolling();
$.ajax({
type: "POST",
url: "Foobar.asmx/Methodname",
data: {id:2343},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg)
{
progressBar.hide();
alert("done!");
}
});
(If I do not call pm.startProgressPolling, the ashx will not be called frequently to get the progress values).
The web method looks like this:
[WebMethod(EnableSession = true)]
public bool MethodName(int id)
{
var progress = RadProgressContext.Current;
/* some code that retrieves an array of tasks */
var maxnum = tasks.Count;
progress.PrimaryPercent = 0;
progress.PrimaryValue = 0;
progress.PrimaryTotal = maxnum;
foreach (var task in tasks)
{
/* code that performs task */
result++;
progress.PrimaryPercent = result * 100 / maxnum;
progress.PrimaryValue = result;
}
return true;
}
However, the progress will never be updated and then the web service method has run, the progressbar will dissapear as it should.
The polling will not get the expected data but say that InProgress is false.
Here is the a response to Telerik.RadUploadProgressHandler.ashx?RadUrid=a1dcfc89-bd8c-43d3-b88f-718890d7fc04&RadUploadTimeStamp=1467898578437&:
var rawProgressData = {InProgress:false,ProgressCounters:false};