
Hello,
I have a RadComboBox with an associated required field validator. On Internet Explorer 11 (maybe other versions) an X appears that allows the user to clear the Combo. Please see the attached image if you don't know what I mean.
If the user clears the selection with the X and then clicks elsewhere (on another control for example) then the required field validator for the RadComboBox will activate. I only want this validator (and the other validators) to fire when the page is posted back.
There are a couple of the approaches that I have investigated but couldn't make get to work 100% correctly for various reasons are
1. Disable the validator temporarily with Javascript and re-enable later on. As per this thread Radcombobox clearSelection causes validation.
2. Use a custom validator.
The second one isn't really an option because the RadComboBox is used in an .ascx file that is re-used in a lot of places. Also, some attributes that are specific to a RequiredFieldValidator are required.
So, I am asking if there is a simple low impact way of preventing the validator from firing in this scenario?
Thanks in advance,
John.
I'm getting some weird go-slows with the following script.
Most of the time, the filtering works in about 50ms. Other times, it takes upwards of 8000ms. When this happens firefox pops up them message that the script is taking too long to execute (continue stop etc).
I've put some timers in to try and find out where it's chugging, and it is on this line
var item = listItems.getItem(count);
as to why... well that's the million dollar question
the mark up is contained as follows
Master page > Page > RadPageView > UserControl
(all declared at design time ~ no dynamically loaded controls)
The Code
-------------
//
// Escapes RegEx character classes and shorthand characters
//
escapeRegExCharacters: function (text)
{
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
},
//
// filter items in a Rad List box
//
filterListBox: function (pSearchBoxClientID, pUsersClientID)
{
var textBox = $('#'+pSearchBoxClientID);
var listBox = $find(pUsersClientID);
if (textBox != null && listBox != null)
{
var filterText = Core.escapeRegExCharacters(textBox.val());
var expression = new RegExp(filterText, "i");
var listItems = listBox.get_items();
for (var count = 0; count < listItems.get_count(); count++)
{
var item = listItems.getItem(count);
item.set_visible(filterText == "" || item.get_text().match(expression));
}
}
}
<asp:TextBox id="txtSearchLinked" runat="server" CssClass="TextInput" Width="100%" />
<telerik:RadListBox
runat="server"
ID="lstAccessInRole"
SelectionMode="Multiple"
Height="450px"
width="600px"
AllowTransfer="true"
TransferToID="lstAccessNotInRole"
AutoPostBack="false"
AutoPostBackOnTransfer="false"
>
<ButtonSettings TransferButtons="TransferFrom,TransferTo" />
</telerik:RadListBox>
/// <summary>
/// Sets the JQuery event on the search text box
/// </summary>
private void SetupFilterEvent()
{
txtSearchLinked.Attributes.Add("onkeyup", "javascript:Core.filterListBox('" + txtSearchLinked.ClientID + "', '" + lstAccessInRole.ClientID + "');");
}
01.KPIMetricsChart.DataSource = ds.Tables[7];02.KPIMetricsChart.DataBind();03.PieSeries kpi = new PieSeries();04.kpi.DataFieldY = "Cnt";05.kpi.LabelsAppearance.Visible = false;06.kpi.SeriesItems[4].Exploded = true; // <- DOES NOT WORK07.kpi.TooltipsAppearance.ClientTemplate = "#=dataItem.Action#<br />#=dataItem.Cnt# Items, #= kendo.format(\\'{0:P}\\',percentage) #";08.KPIMetricsChart.ChartTitle.Text = "Global Metrics";09.KPIMetricsChart.PlotArea.Series.Add(kpi);Hi,
I'm having issues with RadLive capturing the value returned by my web service. I believe the web service is returning an xml while RadLiveTile is expecting a jason format. Can you please help me here?
WebService business logic:
[DataContract] public class GarageMap { [DataMember] public int OccupiedSpaces{set;get;} public GarageMap() { } public GarageMap(int propertyid) { loadMap(propertyid); } private void loadMap(int property_id) { DBTransaction Transaction = new DBTransaction(); DBTransactionParameter param = new DBTransactionParameter(); param.Type = SqlDbType.VarChar; param.Name = "@PropertyID"; param.Value = "3"; List<DBTransactionParameter> plist = new List<DBTransactionParameter>(); plist.Add(param); DataTable DT = Transaction.Select("sp_GetAllOccupiedSpacesCount", true, plist); DataRow dr = DT.Rows[0]; OccupiedSpaces= Convert.ToInt32( dr["AllOccupiedSpaceCount"].ToString()); } }WebMethod:
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet=false)]
//[ScriptMethod(UseHttpGet = true)]
public GarageMap OccupiedSpaceCount()
{
//string j = "{'test': 1}";
////return j;
return new GarageMap(3);
}
ASPX Page:
<div class="tilesWrapper"> <telerik:RadLiveTile ID="DellTile" NavigateUrl="http://finance.yahoo.com/q?s=FB&d=t" runat="server" UpdateInterval="3000" Value="FB"> <Title ImageUrl=""></Title> </telerik:RadLiveTile> <telerik:RadLiveTile ID="GoogleTile" NavigateUrl="http://finance.yahoo.com/q?s=GOOG&d=t" runat="server" UpdateInterval="4000" Value="GOOG"> <Title ImageUrl="../../images/LiveTiles/logo_Google.png"></Title> </telerik:RadLiveTile> <telerik:RadLiveTile ID="YahooTile" NavigateUrl="http://finance.yahoo.com/q?s=YHOO&d=t" runat="server" UpdateInterval="5000" Value="YHOO"> <Title ImageUrl="../../images/LiveTiles/logo_Yahoo.png"></Title> </telerik:RadLiveTile> <telerik:RadLiveTile ID="MicrosoftTile" NavigateUrl="http://finance.yahoo.com/q?s=MSFT&d=t" runat="server" UpdateInterval="6000" Value="MSFT"> <Title ImageUrl="../../images/LiveTiles/logo_Microsoft.png"></Title> </telerik:RadLiveTile> </div> Code Behind:
protected void Page_Load(object sender, EventArgs e)
{
InitializeTile(DellTile);
//InitializeTile(GoogleTile);
//InitializeTile(YahooTile);
//InitializeTile(MicrosoftTile);
}
private void InitializeTile(RadLiveTile tile)
{
tile.CssClass = "liveTile";
tile.Target = "_blank";
//The text between the #= # characters is replaced by the corresponding properties of the data item
//returned on the web service response.
tile.ClientTemplate = @"
<div class=""tileClientTemplate"">
<div><strong>change:</strong> <img src=""../Assets/Icons/arrow_down.png"" alt="""" /> #= OccupiedSpaces #</div>
<div><strong>stock quote:</strong> #= OccupiedSpaces #</div>
<div><strong>updated:</strong> #= OccupiedSpaces #</div>
</div>
";
//Configure the web service providing the live data.
tile.WebServiceSettings.Path = "http://ws.smartparkllc.com/Dashboard.asmx";
tile.WebServiceSettings.Method = "OccupiedSpaceCount";
//Attach client side event handlers.
tile.OnClientDataLoaded = "tileDataLoaded";
tile.OnClientDataLoadingError = "tileDataLoadingError";
tile.OnClientTemplateDataBound = "tileClientTemplateDataBound";
}
Java Script File:
<script type="text/javascript">
//alert("boom");
function tileDataLoadingError (sender, args) {
args.set_cancelErrorAlert(true);
}
//The dataLoaded client side event occurs after the data request returns the data successfully.
function tileDataLoaded(sender, args) {
//
var data = args.get_data();
//format the received date property
//data.LastUpdated = data.LastUpdated.format("yyyy.MM.dd HH:mm:ss");
}
//The templateDataBound client-side event occurs after the client template is data bound.
function tileClientTemplateDataBound(sender, args) {
alert("boom");
if (args.get_dataItem().Change >= 0) {
args.set_html(args.get_html().replace("Assets/Icons/arrow_down.png", "Assets/Icons/arrow_up.png"));
}
}
</script>
Browser Webservice call output:
<?xml version="1.0" encoding="utf-8"?>
<GarageMap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<OccupiedSpaces>3</OccupiedSpaces>
</GarageMap>
Browser Console Error:
Uncaught SyntaxError: Unexpected token <
Hello,
I'm wondering what the best way would be to push content to a dock control when the underlying information has been changed. I was considering trying to hook it up with SignalR but I'm hoping there may be a simpler solution.
Application Senerio:
I have several zones that can contain one or more dock controls. It is basically a scheduling system and the docks display information about an event. I want to be able to update all devices that are viewing the application if someone makes a change to an event. The zones are static but I'm dynamically creating the dock controls and adding them to the zones.
Any pointers or ideas of the best way to achieve this would be much appreciated.
Thanks,
Brian
