Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
97 views
I have an issue with silk skin with radmenu. I click on an item in ajax mode it postback and load fine. But when i click on browser window on any empty place why it lost highlighted item?

watch following video.

http://screencast.com/t/L5Y4jdvxmNwo
Muhammad Imran
Top achievements
Rank 1
 asked on 26 Oct 2013
2 answers
135 views
I have a vertical RadMenu on my page who's button clicks bring up popup windows.

We have a little formula that determines the placement of each window (just to the right of the button clicked), but on IE9, the offsetTop value for the menu item element is off by 60, which pushes down our window lower than we want.  Other browsers display it fine.

Any ideas why?  Here's the menu:
<telerik:RadMenu ID="RadMenu1" runat="server" flow="Vertical" Width="100%" OnClientItemClicked="MenuOpenWindow('RadWindow1')">
    <Items>
        <telerik:RadMenuItem ImageUrl="../Images/button.png" Value="RadWindow1"  />
    </Items>
</telerik:RadMenu>

And Javascript:
function MenuOpenWindow(windowTitle) {
    var oWindow;
    var offsetElementBounds;
    var menu = $find("<%=RadMenu1.ClientID%>");
    var menuItem = menu.findItemByValue(windowTitle).get_element();
 
    if (windowTitle == "RadWindow1") {
        if (lastWindowTitle != "RadWindow1") {
            oWindow = $find("<%=winRadWindow1.ClientID%>");
            oWindow.show();
            if (oWindow.get_offsetElementID()) {
                offsetElementBounds = $telerik.getBounds($get(oWindow.get_offsetElementID()));
                var x = parseInt(offsetElementBounds.x + (menuItem.offsetWidth / 3));
                var y = parseInt(menuItem.offsetTop + offsetElementBounds.y - (menuItem.offsetHeight / 3));
                alert(menuItem.offsetTop);
                alert(offsetElementBounds.y);
                alert(menuItem.offsetHeight);
                alert(x);
                alert(y);
                oWindow.moveTo(x, y);
            }
            return false;
        }
    }
}
Amanda
Top achievements
Rank 1
Iron
 answered on 25 Oct 2013
33 answers
906 views
Hello,

We need to style RadInput (RadTextBox) with rounded corners. The ideal solution of course would be to use FormDecorator, but at this point it does not apply to RadInput. After searching through support forums I found following workaround:

http://www.telerik.com/community/forums/aspnet-ajax/form-decorator/raddatepicker-rounded-corners.aspx

Which basically requires to add following code to each and every RadTextBox present on the page:

<script runat="server">  
  
    protected void Page_PreRenderComplete(object sender, EventArgs e)  
    {  
        if (Request.Browser.IsBrowser("IE"))  
        { 
            RadTextBox1.EnabledStyle.CssClass = String.Empty; 
            RadTextBox1.HoveredStyle.CssClass = String.Empty; 
            RadTextBox1.FocusedStyle.CssClass = String.Empty; 
            RadTextBox1.InvalidStyle.CssClass = String.Empty;  
        }  
        else  
        { 
            RadTextBox1.EnabledStyle.CssClass = "rfdInput rfdRoundedCorners"
            RadTextBox1.HoveredStyle.CssClass = "rfdInput rfdRoundedCorners"
            RadTextBox1.FocusedStyle.CssClass = "rfdInput rfdRoundedCorners"
            RadTextBox1.InvalidStyle.CssClass = "rfdInput rfdRoundedCorners";  
        }  
    } 
     
</script>  

The good thing - it works, not so good - you can imagine what needs to be done if there are multiple RadTextBoxes on multiple pages. Which brings me to my question - is there a better way of handling this? Can this be done by modifying CSS for the Skin that we're using without actually adding any code?

Thank you,
Andrei



Ivan Zhekov
Telerik team
 answered on 25 Oct 2013
0 answers
76 views
Hi 
I m using the rad scheduler with mvc
I m  facing the issue that my Get Appointment method is calling multiple times.
Gaurav
Top achievements
Rank 1
 asked on 25 Oct 2013
2 answers
986 views
Hi,

Is there a way to use the dataformatstring on a gridboundcolumn to display negative numbers in red?

DataType="System.Int16" DataFormatString="{0:#,###,##0;-#,###,##0}"



Thank You
Tracy
Tracy
Top achievements
Rank 1
 answered on 25 Oct 2013
5 answers
300 views
Hello,

I have an application with several pages that contain RadComboBoxes.  When I select an option in the first RadComboBox it triggers the other RadComboBoxes to load options based on that selection.  Or rather, it used to do this.  This application has been working this way for years after having been developed in Visual Studio 2008 targeting the 3.5 .NET framework.  Recently, I tried upgrading this application to the 4.0 .NET framework so I could develop in Visual Studio 2010.  Now the RadComboBoxes will not be updated properly when the 1st one's selected option is changed.

Here is the first combobox:
<telerik:radcombobox id="ebaCountry" runat="server" DataTextField="Text" DataValueField="Value" MarkFirstMatch="True" AllowCustomText="False" OnClientSelectedIndexChanging="LoadCountryDependentCombos" OnItemsRequested="ebaCountry_ItemsRequested" OnClientSelectedIndexChanged="EbaChangeCountry" OnClientBlur="EbaChangeCountry" OnClientLoad="SetCountryClientId"></telerik:radcombobox>

The important attribute here is OnClientSelectedIndexChanging.  It triggers javascript code that should cause other RadComboBoxes to be populated with data.  The javascript looks like this:
var item = eventArqs.get_item();
ebaParticipant.set_text(" Loading...");
ebaParticipant.requestItems(item.get_value(), false);

Here is what the second combobox looks like:
<telerik:RadComboBox runat="server" ID="ebaParticipant" MarkFirstMatch="true" DataSourceID="objdsParticipant" OnClientItemsRequested="ItemsLoaded" AllowCustomText="False" OnClientSelectedIndexChanged="EbaChangeParticipant" OnClientBlur="EbaChangeParticipant" OnItemDataBound="ebaParticipant_ItemDataBound" OnClientLoad="SetParticipantClientId" OnItemsRequested="ebaParticipant_ItemsRequested">
                        <ItemTemplate>
                            <ul>
                                <li style="float: left; width: 110px; margin: 0; padding: 0 5px 0 0; line-height: 14px">
                                    <%# DataBinder.Eval(Container.DataItem, "PersonName") %></li>
                                <li style="float: left; width: 110px; margin: 0; padding: 0 5px 0 0; line-height: 14px">
                                    <%# DataBinder.Eval(Container.DataItem, "MinistryName") %></li>
                            </ul>
                        </ItemTemplate>
</telerik:RadComboBox>

The function in the code-behind, ebaParticipant_ItemsRequested, triggered by the OnItemsRequested event sets up a couple of parameters for ObjectDataSource used by the RadComboBox then calls "ebaParticipant.DataBind()" to fill this second combobox with data based on the selected option in the first combobox. 

While debugging in VS2010 I can step through the code and see that the SelectMethod defined for the ObjectDataSource is being called and I can see the data returned from its database query.  The correct data is being returned.  And here is where something breaks down.  For some reason the second combobox on the web page is no longer being filled with the returned data.  Can anyone suggest a way to debug this step in the process?  Any ideas what's going wrong?  Does it have something to do with the change from .NET 3.5 to 4.0?  I'm using version 2011.1.519.35 of Telerik.Web.UI.dll.

-- Tom 
 
Hristo Valyavicharski
Telerik team
 answered on 25 Oct 2013
4 answers
1.3K+ views
Hi All,
If HTML tags (eg: <<test>>) are entered in the textboxes, throws exception.
This is a problem in asp.net textbox as well. To fix this problem there are two solutions I know:
1) turn of the ValidationRequest.
2) Write a javascript to encrypt/decrypt or replace the tags with &lt; and &gt;
I would like to know if anyone has a better suggestion to resolve this issue.
As turning off validationRequestion opens it for cross-site scripting attacks.
If I try the second option, when the page is rendered and displayed, it shows as &lt; for fraction of seconds and then changes to <. This looks odd to the users. The problem exists both in VS2008/.net3.5 and VS2010/.net4.0
Any suggestions would be highly appreciated.
Thanks,
Richa
Vasil
Telerik team
 answered on 25 Oct 2013
2 answers
196 views
Hi all,

I have created a RadScheduler that uses a TimelineView. I have an issue with the height of the rows. Ideally the height of the rows would match the appointments' height, but it seems it has some other height defined which is much higher than the appointment (see screenshot). When I change the RowHeight property I change the height of the appointment, but not of the entire row. I guess it is somehow related to the grouping.
I feel I've tried changing all height properties I can find, but no success.

How can I make each row be only as high as the appointment (all appointments have a fixed height, so if I can hardcode the rows to be 25px thats fine)?

My markup is shown below:

<div style="clear:both;">
<telerik:RadScheduler runat="server"
    ID="Scheduler"
    DataStartField="Start"
    DataEndField="End"
    DataSubjectField="CustomText"
    DataKeyField="Id"
     
    ShowResourceHeaders="True"
    AllowDelete="False"
    AllowEdit="False"
    AllowInsert="False"
    SelectedView="TimelineView"
    GroupingDirection="Vertical"
    DayStartTime="08:00:00"
    DayEndTime="19:00:00"
    TimeZoneOffset="02:00:00"
    OverflowBehavior="Expand"
    ReadOnly="True"
    RowHeight="25"
    FirstDayOfWeek="Monday"
    LastDayOfWeek="Sunday"
    AppointmentStyleMode="Simple"
    NumberOfHoveredRows="0"
 
    OnAppointmentDataBound="AppointmentDatabound"
    OnResourceHeaderCreated="ResourceCreated"
     
>
    <TimelineView
        GroupingDirection="Vertical"
        SlotDuration="7.00:00:00"
        NumberOfSlots="12"
        ColumnHeaderDateFormat="dd/MM"
        UserSelectable="False" >
    </TimelineView>
    <MonthView UserSelectable="False" />
    <DayView UserSelectable="False" />
    <WeekView UserSelectable="False" />
    <AppointmentTemplate>
        <div >
            <label style="color:black; font-size:7pt; display:block; text-align: center;"><%# Eval("Subject") %></label>
        </div>
    </AppointmentTemplate>
</telerik:RadScheduler>
Michael
Top achievements
Rank 1
 answered on 25 Oct 2013
4 answers
181 views
How do I determine (client-side) if a tile is being moved to a different group?
zAxis
Top achievements
Rank 1
 answered on 25 Oct 2013
4 answers
462 views
Hi,

Iam having a rad grid, when i press tab on rad grid, the first header gets focussed and then it goes till last header, after that it goes to paging links(1,2,3,4) and then to inner content of grid. where as i need the following sequence

1.Headers
2. Inner content
3. pagination links

So as per screenshot it should go from from start date->Inner checkbox->Pagination Links

Kindly suggest me what needs to be done in this regard.
Venelin
Telerik team
 answered on 25 Oct 2013
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?