Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
735 views
Hi,

I have trouble to set selected value for a RadComboBox using Javascript.

I think the trouble I have is because the RadComboBox is loaded dynamically in a user control.

Actually the whole website is built based on multiple user controls with AJAX, which mean, there is no post back.

I tried:
function JSSelect() {
    var combo = $find("<%= RadComboBox1.ClientID %>");
    var itm = combo.findItemByValue('04');
    itm.select();
}

I want to call this function at a proper time when the user control which contain my RadComboBox is loaded. But I think it's because of "<%=" and "%>", the page will try to find RadComboBox1 first when the page is first request, but at this time, the user control which contains my RadComboBox has not been loaded. How can I solve this problem?
Harshad
Top achievements
Rank 1
 answered on 07 Mar 2012
1 answer
186 views
Is there a way to hide the "All Properties..." button in the "Insert Link" popup on the RadEditor?
Rumen
Telerik team
 answered on 07 Mar 2012
1 answer
76 views
Hi All,

I have a page in which a radeditor will be opened in a radwindow on a button click.

RadEditor works fine in IE8. But not working in IE9.

I cant  add anything to radeditor or even copy paste anything in rad editor.

Version I am using is  :2012.1.215.35.
Rumen
Telerik team
 answered on 07 Mar 2012
8 answers
416 views
Hi, is it possible to assign an aggregate to an autogenerated column and if so how can I do it. I haven't found an example and I don't see how to do it in the ColumnCreating or ColumnCreated events. Hopefully these can also be exported to excel.

Thanks.
Danyal Rashid
Top achievements
Rank 1
 answered on 07 Mar 2012
1 answer
85 views
I have a tabstrip that has an ImageButton assigned to each tabs tab template. The Image Buttons are used for exporting to excel. When the image button is clicked I want the method for the image button to reference the corresponding RadGrid to export. My question is, how do I determine which Tab the ImageButton is clicked on?
Dimitar Terziev
Telerik team
 answered on 07 Mar 2012
6 answers
207 views
1. We are currently using the beta version of the org chart control in our MVC app and in the process of purchasing the full suite.
Are there any major changes or breaking changes between the beta (v2.0.50727) and release version when we switch over?

2. We also have a requirement to generate a PDF or even a simple image to have a hard copy version of the chart. This is critical in our application. Do you know if this functionality will be supported or have an idea how to accomplish this?

Thanks!
Michael
Top achievements
Rank 1
 answered on 07 Mar 2012
5 answers
385 views
I am using RadWindow in my web application but when I press a escape key radwindow doesn't hide, when I checked the code of GetRadWindow() I found out that I am getting undefined object in my radwindow. I have also tried to hide my radwindow by using telerik shorcuts but the problem is that once it hides it never comes back again. I am showing my radwindow when user press a link button in my page. I don't understand that why I am getting undefined in my GetRadWindow() function. Any help would be greatly appreciated.

function closeWindow() {
            var oWnd = GetRadWindow();            
            oWnd.hide();
        }


 function GetRadWindow()
{
  var oWindow = null;
  
if (window.rwCustomerListDialog)
     oWindow
 = window.rwCustomerListDialog;
  
else if (window.frameElement.rwCustomerListDialog)
     oWindow
 = window.frameElement.rwCustomerListDialog;
  
return oWindow;
}  


        function pageLoad() {


            $addHandler(document, 'keydown', onKeypress);
        }


        function onKeypress(args) {


            if (args.keyCode == Sys.UI.Key.esc) {
                  closeWindow()
            }


        }

<telerik:RadWindow ID="rwCustomerListDialog" runat="server" Title="Add Customer"
                VisibleStatusbar="false" Behaviors="Move,Pin,Resize" InitialBehaviors="Pin" VisibleOnPageLoad="true"
                Visible="false" OffsetElementID="rwCustomerListDialog" Height="500" Width="510"
                Left="150px" KeepInScreenBounds="true" DestroyOnClose="true">
<ContentTemplate>
 <table id="tblAddCustomer" border="0" cellpadding="0" cellspacing="0" width="100%"
                        runat="server">
                        <tr>
                            <td width="26%" align="right">
                                <asp:Label ID="Label2" runat="server" Text="Customer code" Font-Bold="true" />
                            </td>
                            <td>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                            <td>
                                <asp:TextBox ID="tbCustomerCode" runat="server" Width="200px" />
                                &nbsp;<asp:RequiredFieldValidator ID="rfvCustomerCode" runat="server" ErrorMessage="required!"
                                    ControlToValidate="tbCustomerCode"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
</table>
</ContentTemplate>
</telerik:RadWindow>
Marin Bratanov
Telerik team
 answered on 07 Mar 2012
2 answers
152 views
I have this weird situation where my ComboBoxes stop calling the OnSelectedIndexChanged after a while.

The scenario is like this:

I have a grid that has 12 months, in each footer column there's a radComboBox with the values (yes/no).

I have other grids in the page that I can do drag/drop between them.

The comboboxes do postbacks and they call the OnSelectedIndexChanged event in my codebehind fine, this seems to break when I do drag/drop in the other grids. Once I do the drag/drop in the other grids the comboboxes stop calling the OnSelectedIndexChanged event period.

I went through the code and there's nowhere that I'm overriding the OnSelectedIndexChanged.

Thanks
Alex
Top achievements
Rank 2
 answered on 07 Mar 2012
4 answers
154 views
Well, I have an EditTemplate that I bound some data to some RadControl. The problem is when I try to insert, I got errors on bound item because they are DBnull. So how can I have the template with empty control while inserting?

Jocelyn
Jocelyn
Top achievements
Rank 1
 answered on 07 Mar 2012
2 answers
116 views
I am currently dynamically changing the Header Text of one of my grids using the following code:

Protected Sub gvYearByYearValueProjection_DataBound(sender As Object, e As System.EventArgs) Handles gvYearByYearValueProjection.DataBound
        Dim Season As Integer = Utility.GetCurrentSeason
        Dim headerItem As GridHeaderItem = gvYearByYearValueProjection.MasterTableView.GetItems(GridItemType.Header)(0)
        headerItem("Yr1").Text = Convert.ToString(Season & "-" & Right(Season, 2) + 1)
        headerItem("Yr2").Text = Convert.ToString(Season + 1 & "-" & Right(Season, 2) + 2)
        headerItem("Yr3").Text = Convert.ToString(Season + 2 & "-" & Right(Season, 2) + 3)
        headerItem("Yr4").Text = Convert.ToString(Season + 3 & "-" & Right(Season, 2) + 4)
        headerItem("Yr5").Text = Convert.ToString(Season + 4 & "-" & Right(Season, 2) + 5)
        headerItem("Yr6").Text = Convert.ToString(Season + 5 & "-" & Right(Season, 2) + 6)
    End Sub

I have also used this code as well but get the same result:

Protected Sub gvYearByYearValueProjection_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles gvYearByYearValueProjection.ItemDataBound
    Dim Season As Integer = Utility.GetCurrentSeason
    If TypeOf e.Item Is GridHeaderItem Then
        Dim header As GridHeaderItem = DirectCast(e.Item, GridHeaderItem)
        header("Yr1").Text = Convert.ToString(Season & "-" & Right(Season, 2) + 1)
        header("Yr2").Text = Convert.ToString(Season + 1 & "-" & Right(Season, 2) + 2)
        header("Yr3").Text = Convert.ToString(Season + 2 & "-" & Right(Season, 2) + 3)
        header("Yr4").Text = Convert.ToString(Season + 3 & "-" & Right(Season, 2) + 4)
        header("Yr5").Text = Convert.ToString(Season + 4 & "-" & Right(Season, 2) + 5)
        header("Yr6").Text = Convert.ToString(Season + 5 & "-" & Right(Season, 2) + 6)
    End If
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
    End If
End Sub

The problem I am running into is when I sort another grid on my page the headers resort back to Yr1, Yr2, Yr3, etc....

I am not sure where my error is, but I would be thrilled with any assistance.

Thanks,

Brad
Brad
Top achievements
Rank 2
 answered on 07 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?