Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
162 views
Hi All

RadTicker1.Items.Add(new RadTickerItem("Stuart"));
           RadTicker1.Items.Add(new RadTickerItem("<a href=url>Link text</a>"));
           RadTicker1.Loop = true;         
 
           RadRotator1.Items.Add(new RadRotatorItem(RadTicker1));          
           RadRotator1.Enabled = true;
           RadRotator1.Visible = true;
           RadRotator1.RotatorType = RotatorType.AutomaticAdvance;

This shows my Text but does not format the html link as a link it shows it as "<a href=url>Link text</a>" raw, this code is in a user control. How to I get HTML in a rotator formated? (code behind)"


Thanks
Stuart
Niko
Telerik team
 answered on 10 Jul 2012
2 answers
243 views
Hi,

we just switched from Q3/2011 to Q2/2012 and have a slight layout problem with the RibbonBar since the new version.
The second line of a button's text gets cut off. The text can contain a line break (button.Text = "lineA <br/> lineB");
I attached a screenshot where you can see the problem.

How can I ensure that the second line is displayed correctly like in Q3/2011?
JP
Top achievements
Rank 1
 answered on 10 Jul 2012
11 answers
143 views
Can anyone tell me how to add the time range on the first row?  Please refer to the attachement.

 

Plamen
Telerik team
 answered on 10 Jul 2012
3 answers
209 views
I have a webpage that I need to dynamically set 4 radcombobox onclientselectedindexchanged events to a javascript function, however when the combobox index is changed the event does not get fired, can someone help me please?

here is the javascript:

<script type=
"text/javascript">
    var cbxCSI = new Array(4);
    var rcbCSI = new Array(4);
     function OnLoad() {
        var onLoadCSIs = ['<%=objBidder.BidderCSI1%>', '<%=objBidder.BidderCSI2%>', '<%=objBidder.BidderCSI3%>', '<%=objBidder.BidderCSI4%>'];
 
        var rbWITHOUT = document.getElementById("rbWITHOUT");
        var lblWithoutCSI = document.getElementById("lblWithoutCSI");
 
        cbxCSI[0] = document.getElementById("cbxCSI1");
        cbxCSI[1] = document.getElementById("cbxCSI2");
        cbxCSI[2] = document.getElementById("cbxCSI3");
        cbxCSI[3] = document.getElementById("cbxCSI4");
 
        rcbCSI[0] = $find("clsCSIDivision_rcbClassifier");
        rcbCSI[1] = $find("clsCSIDivision1_rcbClassifier");
        rcbCSI[2] = $find("clsCSIDivision2_rcbClassifier");
        rcbCSI[3] = $find("clsCSIDivision3_rcbClassifier");
 
        rcbCSI[0].onclientselectedindexchanged = 'OnClientSelectedIndexChanged';
        rcbCSI[1].onclientselectedindexchanged = 'OnClientSelectedIndexChanged';
        rcbCSI[2].onclientselectedindexchanged = 'OnClientSelectedIndexChanged';
        rcbCSI[3].onclientselectedindexchanged = 'OnClientSelectedIndexChanged';
 
        function CheckWithoutStatus() {
            var allCbxUnchecked = true;
            for (i = 0; i < cbxCSI.length; i++) {
                if (cbxCSI[i].checked == true)
                    allCbxUnchecked = false;
            }
            if (allCbxUnchecked == true) {
                lblWithoutCSI.disabled = "";
                rbWITHOUT.checked = true;
            }
        }
 
        if (rbWITHOUT.checked == true) {
            for (i = 0; i < cbxCSI.length; i++) {
                if (rcbCSI[i].get_selectedItem().get_value() != "") {
                    rcbCSI[i].disabled = true;
                }
                else {
                    cbxCSI[i].disabled = true;
                }
                cbxCSI[i].checked = false;
            }
        }
        else {
            for (i = 0; i < cbxCSI.length; i++) {
                if (rcbCSI[i].get_selectedItem.get_value() != "") {
                    rcbCSI[i].disabled = !cbxCSI[i].checked;
                }
                else {
                    cbxCSI[i].disabled = true;
                }
            }
            CheckWithoutStatus();
        }
    }
    function OnClientSelectedIndexChanged(sender, eventArgs) {
        RefreshCsiOptions(sender);
    }
    function RefreshCsiOptions(sender) {
        switch (sender.type) {
            case "radio":
                if (sender.checked == true) {
                    for (i = 0; i < cbxCSI.length; i++) {
                        if (rcbCSI[i].get_selectedItem().get_value() != "") {
                            rcbCSI[i].disabled = true;
                        }
                        else {
                            cbxCSI[i].disabled = true;
                        }
                        cbxCSI[i].checked = false;
                    }
                    lblWithoutCSI.disabled = "";
                }
            case "checkbox":
                var cbxNumber = sender.id.substr(6, 1);
                if (sender.checked == true) {
                    rcbCSI[cbxNumber - 1].disabled = false
                    lblWithoutCSI.disabled = "disabled";
                    rbWITHOUT.checked = false;
                }
                else {
                    rcbCSI[cbxNumber - 1].disabled = true;
                }
                CheckWithoutStatus();
            case "select-one":
                var rcbNumber = sender.id.substr(14, 1);
                if (rcbNumber == "_")
                    rcbNumber = "0";
                var rcbValue = rcbCSI[rcbNumber].get_selectedItem().get_value();
                var radcb = $find('CSI' + rcbNumber + '_value');
                var item = radcb.findItemByText(rcbValue);
                if (item)
                {item.select();}
                if (rcbValue != "") {
                    cbxCSI[rcbNumber].disabled = false;
                    cbxCSI[rcbNumber].checked = true;
                    if (rbWITHOUT.checked == true)
                        rbWITHOUT.checked = false;
                }
                else {
                    cbxCSI[rcbNumber].disabled = true;
                    cbxCSI[rcbNumber].checked = false;
                    CheckWithoutStatus();
                }
            default:
                //alert(sender.type);
                break;
        }
    }   
</script>
Nencho
Telerik team
 answered on 10 Jul 2012
1 answer
153 views
How to dynamically add rows to radgrid when press add new button . in my case when i press add  new button in the first time it works fine and it add one row. but after that when i press it wont effect..
Shinu
Top achievements
Rank 2
 answered on 10 Jul 2012
4 answers
175 views
Hello,

I use the component RadTabStrip. It is impossible to change the tooltip of a RadTab. It automatically changes the Text property. The value of the property Tooltip does not work.

cordially
Snoopy
Top achievements
Rank 1
 answered on 10 Jul 2012
5 answers
127 views
Hi,

I'm experiencing problems with the RadUpload sometimes working great with progress indicator for files up to 2GB and sometimes I get "Internet Explorer cannot display the web page."  The files can be as smaller than 1MB and I can still have the same problem.  I did not seem to have this problem when the server was on our internal network, where of course the network speeds are much faster.  Tthe "Internet Explorer cannot display the web page" can come up after 10 seconds, 20 seconds, 30 seconds, 40 seconds, ...after executing the Submit button to perform the upload.  I've played with client browser timeout settings, set IIS 7.5 uploadReadAheadSize to 5MB, set IIS 7.5 connection timeout to 3 hours (10800 seconds), but I can't seem to solve this problem.  The RadUpload utility logs in the IIS web logs that it is uploading, and the last log when I get "Internet Explorer cannot display the web page" is that it is uploading.  There are no other logs anywhere.  Even if the network is dropping packets or something, is there a way to build in some better error control handling so that when this happens the upload session can stay in progress?

Mary
Peter Filipov
Telerik team
 answered on 10 Jul 2012
1 answer
74 views
Hey,

I was following the example for using a binary image with a listview to display images etc. allowing users to upload, and edit them.

The code is great except in the event the user uploads a bad image, during postback when the listview is displayed it blows up and throws errors saying the binary data is corrupted.

I know there should be a way to grab hold of the data during the ItemDataBound event, and catch the error, and ignore it or substitute the image with something stored on the website like a badimage.jpg

can someone help with this thanks

Andrey
Telerik team
 answered on 10 Jul 2012
5 answers
110 views
Hi all,

If I have a RadGrid hidden on the page (either through setting it's property or doing it dynamically at runtime in Page_Load), and then later make it visible, it looses all it's Skin information.   Here's a quick sample page I created to demonstrate the problem..  I tried also using the RadScriptManager and got the same effect.

Thanks!!

ASP.NET

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HiddenRadGridTest.aspx.cs" Inherits="HiddenRadGridTest" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
        &nbsp;<asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager> 
        &nbsp;<div> 
            <br /> 
            <asp:UpdatePanel ID="UpdatePanel1" runat="server"
                <ContentTemplate> 
                    &nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> 
                    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="dsTest" GridLines="None" 
                        Visible="False"
                        <ExportSettings> 
                            <Pdf FontType="Subset" PaperSize="Letter" /> 
                            <Excel Format="Html" /> 
                        </ExportSettings> 
                        <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" 
                            DataKeyNames="CustomerID" DataSourceID="dsTest" Dir="LTR" Frame="Border" TableLayout="Auto"
                            <EditFormSettings> 
                                <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType"
                                </EditColumn> 
                            </EditFormSettings> 
                            <Columns> 
                                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="CustomerID" 
                                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="CustomerID" 
                                    ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="CustomerName" 
                                    FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="CustomerName" 
                                    SortExpression="CustomerName" UniqueName="CustomerName"
                                </telerik:GridBoundColumn> 
                            </Columns> 
                            <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                Resizable="False" Visible="False"
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                Visible="False"
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                        </MasterTableView> 
                    </telerik:RadGrid><br /> 
                    &nbsp;<asp:SqlDataSource ID="dsTest" runat="server" ConnectionString="<%$ ConnectionStrings:XXX_ConnectionString %>" 
                        SelectCommand="SELECT * FROM [MyTable]"></asp:SqlDataSource> 
                </ContentTemplate> 
            </asp:UpdatePanel> 
            &nbsp;</div> 
    </form> 
</body> 
</html> 


C# CODEBEHIND
using System; 
using System.Data; 
using System.Configuration; 
using System.Collections; 
using System.Web; 
using System.Web.Security; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Web.UI.WebControls.WebParts; 
using System.Web.UI.HtmlControls; 
 
public partial class HiddenRadGridTest : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
         
    } 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        Button1.Visible = false
        RadGrid1.Visible = true
    } 


Hari Prasad
Top achievements
Rank 1
 answered on 10 Jul 2012
2 answers
152 views
Hi,

I have a problem since few days with the RadCombox on LoadOnDemande.
The load is OK, but when i select an item in the list and i post the page, i have an error message : "Selection out of range Parameter name : Value"

I don't understand the problem, the same code worked before.

Thanks for help

Aspx code :
<telerik:RadComboBox ID="MRLieu" runat="server"
          AllowCustomText="true"
          ItemRequestTimeout="1000"
          Filter="Contains"
          ShowDropDownOnTextboxClick="false"
          MinFilterLength="2"
          EnableLoadOnDemand="true"
          EnableVirtualScrolling="true"
          ShowToggleImage="false"
          OnClientFocus="ChangeOu"
          OnClientItemsRequesting="OnClientItemsRequesting">
           <webservicesettings method="GetLieu" path="~/Utils/WebService/Utils.asmx" />
</telerik:RadComboBox>

JS Code :
function OnClientItemsRequesting(sender, eventArgs) {
    var context = eventArgs.get_context();
    context["coffret"] = "16";
}
 
function ChangeOu(sender) {
    var lieu = $find("MRech_MRLieu");
    lieu.clearSelection();
    lieu.clearItems();
  }


C# Code WS :
[WebMethod]
[ScriptMethod]
public RadComboBoxItemData[] GetLieu(object context)
{
  IDictionary<string, object> contextDictionary = (IDictionary<string, object>)context;
 
  string txt = contextDictionary["Text"].ToString();
  int coffret = Convert.ToInt32(contextDictionary["coffret"]);
 
  txt = txt.Replace("'", " ");
  txt = txt.Replace("\"", " ");
  txt = string.Concat("\"", txt, "*\"");
 
  string sql = @"MyRequest";
 
  ConnexionUtil cnnUtil = new ConnexionUtil();
  DataTable data = cnnUtil.ExecuteRequeteDataTable(sql);
 
  int itemOffset = Convert.ToInt32(contextDictionary["NumberOfItems"]);
  int endOffset = Math.Min(itemOffset + NBITEMS, data.Rows.Count);
 
  List<RadComboBoxItemData> result = new List<RadComboBoxItemData>();
  RadComboBoxItemData itemData;
  for (int i = itemOffset; i < endOffset; i++)
  {
    itemData = new RadComboBoxItemData();
    itemData.Text = data.Rows[i]["nom"].ToString();
    itemData.Value = data.Rows[i]["id"].ToString();
    result.Add(itemData);
  }
 
  data.Dispose();
  cnnUtil.Dispose();
 
  return result.ToArray();
}
mathieu emptoz
Top achievements
Rank 1
 answered on 10 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?