Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
126 views
I have issues setting a custom ITemplate implementation on RadMenuItems.

I populate the RadMenu using the DataSource property.

In which event during the databinding am I supposed to set the ItemTemplate property on the RadMenuItem (which gets created during the databinding process ... I populate the DataSource using custom data objects) so that it gets applied?

The second issue ... I only want to apply the custom ITemplate implementation for one level in the MenuItem hierarchy. The first level should use the default rendering, the second level should use a custom template.
Peter
Telerik team
 answered on 15 Aug 2011
3 answers
195 views
I am using RadCombobox in a grid. I have assigned attribute to the rad combobox from Javascript method. The code is below

 var masterTable = $find("<%=radgrdChargeType.ClientID%>").get_masterTableView();
         
         var dataRow = masterTable.get_dataItems()[popupTextControlId];
          var radCmbBxChargeType = dataRow.findControl("radCmbBxChargeType");
 radCmbBxChargeType.trackChanges();
          radCmbBxChargeType.get_attributes().setAttribute("Ani", "Vai");
          radCmbBxChargeType.get_attributes().setAttribute("1", "2");
          radCmbBxChargeType.commitChanges();



Now I am trying to get the attribute value from Code behind page.

 RadComboBox radCmbBxChargeType = gridItem.FindControl("radCmbBxChargeType") as RadComboBox;
            if (radCmbBxChargeType.Attributes["Ani"] != null)
            {
                string att = radCmbBxChargeType.Attributes["Ani"];
            }


But here the data is not persisting, i.e. 
radCmbBxChargeType.Attributes["Ani"]  is showing null.


How I can get the value !!
Note. - getting the exact combobox is not a problem.

It's urgent 
Peter
Telerik team
 answered on 15 Aug 2011
3 answers
611 views
Hi,
I want to have a combo box for country flags, and have the ~240 countries listed with the ~240 flags.

When I use the ImageURL attribute, the loading of 240 flags takes forever as only a couple of requests are sent concurrently.

I have a sprite for flags, but cannot seem to separate the image from the text, i.e. if I use CSS and Background property, the text is placed on top of the flag.

Is there a way for me to show the flags in a combo box from a sprite, and have the text to the right of the flag?

Chen
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 14 Aug 2011
6 answers
178 views
Hi,

While deleting, I used the 'adding a delete prompt' example.

 

 

protected void OnItemDataBoundHandler(object sender, GridItemEventArgs e)

 

{

 

 

if (e.Item is GridDataItem)

 

{

 

 

GridDataItem dataItem = e.Item as GridDataItem;

 

 

 

string CreateDate = dataItem["CreationDate"].Text;

 

 

 

LinkButton button = dataItem["DeleteColumn"].Controls[0] as LinkButton;

 

button.Attributes[

 

"onclick"] = "return confirm('Are you sure you want to delete Item created on " +

 

CreateDate +

 

"?')";

 

 

}


...this works well...although I'm unsure of the way to receive the response from the "onclick" event..

thanks,
minh Bui
Minh
Top achievements
Rank 1
 answered on 14 Aug 2011
2 answers
144 views
Hello all :)
I am new to the telerik controls and I wanted to ask if I could dynamically add a RadComboBox dynamically using javascript.
thank you so much
Nada
Top achievements
Rank 1
 answered on 13 Aug 2011
0 answers
85 views
Hi All,

I have a scheduler which i fill with an telerik orm datasource and this works perfectly.

This is where i goes wrong, i filter the data for scheduler on customer_id so it gives back all appointments on this customer all good here now i want to add a new appointment for this customer so with this customer_id, the appointment gets created but customer_id = 0.

I think i have to set a custom field or something but i dont know how.

Please help,

Thanks
Sander
Top achievements
Rank 1
 asked on 13 Aug 2011
8 answers
225 views
We upgraded to the newest release version of the RadControls today.  When we did that, we noticed that our pages started to hit the Page_Load function multiple times for each request.  We created a small Telerik Web Application and found that the RibbonBarGroup in the RibbonBar control is causing the issue.

We used Visual Studio 2010 and created a Telerik Web Application project in VB.  We have a master page, an aspx page and a vb code behind for each.

RibbonBar.Master
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadRibbonBar ID="RadRibbonBar1" runat="server">
    <telerik:RibbonBarTab Text="Tab 1">
        <telerik:RibbonBarGroup Text="Group 1">
            <Items>
                <telerik:RibbonBarButton ID="rbb1" runat="server" Text="Button 1" />
            </Items>
        </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>
</telerik:RadRibbonBar>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
  
</asp:ContentPlaceHolder>

RibbonBar.Master.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Me.Page.IsPostBack Then
        Response.Write(DateTime.Now & "-RibbonBar.Master Not IsPostBack<br />")
    Else
        Response.Write(DateTime.Now & "-RibbonBar.Master IsPostBack<br />")
    End If
End Sub

RibbonBar.aspx (Using the RibbonBar.Master)
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  
    <telerik:RadButton ID="btnRibbonBar" runat="server" Text="RadButton">
    </telerik:RadButton>
      
</asp:Content>

RibbonBar.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Me.Page.IsPostBack Then
        Response.Write(DateTime.Now & "-RibbonBar.aspx Not IsPostBack<br />")
    Else
        Response.Write(DateTime.Now & "-RibbonBar.aspx IsPostBack<br />")
    End If
End Sub
Private Sub btnRibbonBar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRibbonBar.Click
    Response.Write(DateTime.Now & "-btnRibbonBar_Click<br />")
End Sub

If you put a break point on each of the subs, you will see that when you click the button, the Page_Load events in the aspx and master page are hit, then the click event for the button, then the Page_Load events in the aspx and master page are hit again.

Thanks for your time,
Gordon


Ian
Top achievements
Rank 1
 answered on 13 Aug 2011
4 answers
106 views
Hi,

We have a RadTextBox with TextMode equal to Multiline. When i write some text into it, it takes 1 - 2 minutes to display the text. Means it hangup for 1-2 minutes before it display.
This scenario is observed in IE8 only. Please help in this.

Thanks,
Rahul 
lantram
Top achievements
Rank 1
 answered on 12 Aug 2011
4 answers
71 views
Hi Support,

I'm using latest version of "Telerik RadControls for ASP.NET Ajax" (version :2011.1.413.35).

I have a text along with the image used as a hyperlink as follows.

"Sample Text.<a href="javascript:myfunction()"><img title="sample image" src="sample.gif" /></a>"

When i copy the above text and paste it inside editor,  the editor removes the href attribute of 'anchor' tag. It happens only with firefox and safari. It is working correctly in internet explorer.

"Sample Text.<a ><img title="sample image" src="sample.gif" /></a>"

Is there any solution for this.? Awaiting for sooner response
Rumen
Telerik team
 answered on 12 Aug 2011
5 answers
180 views
I've been searching for 2 days now to find a template to work off of and every post and article brings my back to the same KB. I've added this:
<telerik:RadEditor runat="server" ID="RadEditor1">
            <CssFiles>
                <telerik:EditorCssFile Value="~/Editor/EditorContentArea.css" />
            </CssFiles>
</telerik:RadEditor>

Now where do I find a copy of the original EditorContentArea.css to work off of? The article references Getting the CSS from the Telerik.Web.UI.dll... how do I do this? I work within a multi-developer environment and do not have the radcontrols installed directly on my machine, but as part of the solution I work within.

How do I get the contents of this file? 
Rumen
Telerik team
 answered on 12 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?