Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
175 views
I have an ItemTemplate defined for my RadListBox. My list box is bound to the results of a Linq to SQL Query. In this case, it's bound to objects of type MyObject.

I'd like to be able to add a new RadListIBoxItem defined by the user. Ideally, I'd like to create a new MyObject instance and call myListBox.Items.Add(new RadListBoxItem(myNewObject)). This would then create a new item and bind the values in the ItemTemplate appropriately.

Of course, this isn't an option. I can only pass a text and value to the new RadListBoxItem, and this of course won't map to many of the controls in my ItemTemplate.

So what's the correct approach here? Is this simply the wrong control to use?
Dimitar Terziev
Telerik team
 answered on 22 Feb 2011
2 answers
121 views
I am applying a theme to RadTab strip and I isolated the problem to a snippet of code in css file:

.RadTabStrip

 

 

.rtsLevel1 .rtsLink

 

{

 

 

background-image: url('TabStrip/office2007.gif');

 

 

 

 

background-color: transparent;

 

 

 

 

background-repeat: no-repeat;

 

 

}

on running, the application appears as in the attached file, with the text running out of the tab shape. Is there any solution to this?

Alex Fefer
Top achievements
Rank 1
 answered on 22 Feb 2011
4 answers
93 views
I am hoping someone can solve my issue with the colorpicker.  I need to add a colorpicker icon to the radpanelbar but all it seems to do is display the icon on its initial load (even outside the scrolling region) and when the scroll bar is moved, the colorpicker icons remain in place.

I have started with the demo of the Scheduler / First Look which shows on the left side of the splitter, 2 stacked calendars and a radPanelBar with selectable "Team Calendars" and "My Calendar".  I have a replaced the existing radPanelBar of the demo with mine as follows:

<telerik:RadPanelBar id="rpbMyCalendars" runat="server" width="220px" ExpandMode="MultipleExpandedItems"
PersistStateInCookie="true" CookieName="xyzMyCalendarPanelBarCookie"/>


I have isolated a bit of test code to populate this radPanelBar by calling the function testLoad() during Page Load:

protected void testLoad()
{
    rpbMyCalendars.Items.Clear();
    createPanel(1, 8);
    createPanel(2, 8);
}
 
protected void createPanel(int panelNum, int count)
{
    var rpiRoot = new RadPanelItem("Root Panel " + panelNum);
    rpbMyCalendars.Items.Add(rpiRoot);
 
    for (var i = 1; i < count; i++ )
    {
        var rpiSub = new RadPanelItem("");
        rpiRoot.Items.Add(rpiSub);
 
        var literal = new Literal
        {
            Text = "<div title='Sub Panel " + i + "'>Sub Panel " + i + "</div>",
            ID = "tx_" + i,
        };
        rpiSub.Controls.Add(literal);
 
        var cp = new RadColorPicker
        {
            ID = "cp_" + i,
            ShowIcon = true,
            SelectedColor = Color.FromArgb(i * 0x100 + i * 0x10 + i),
            PaletteModes = PaletteModes.HSB,
            AutoPostBack = true
        };
        cp.ColorChanged += cpMyCalendar_OnColorChanged;
        rpiSub.Controls.Add(cp);
    }
}

This works just fine under IE8, Google Chrome, Firefox and Safari.  But under IE7, I get rendering issues of the colorpicker icon as show in the attached picture.  When I scroll the left side, the colorpicker icons remain where they were initially rendered.

I attempted to add the style rule "position:relative" to the owning parent(s) but all this did was make the parent exhibit the same behavior as the icon.

Thanks in advance for helping me out on this.

Ed
Ed
Top achievements
Rank 1
 answered on 22 Feb 2011
1 answer
60 views
Is there an event that fires when the ContentURL changes or finishes loading?
Niko
Telerik team
 answered on 22 Feb 2011
4 answers
127 views
Hello Telerik family.

I am tring to use scheduler component in a mvc project.
here there is my view :

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Register Assembly="RadSchedulerDemo" Namespace="RadSchedulerDemo.Helpers" TagPrefix="cc1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<script runat="server">
    //needed to run RadScheduler without <form> tag
    public override void VerifyRenderingInServerForm(Control control) {
        //base.VerifyRenderingInServerForm(control);
    }
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1">
    </telerik:RadScriptManager>
 
    <!-- to allow for user authentication, a custom control needed to be created to handle
            the ASPXAUTH cookie during the GetResources call.  see
            and relevant code in Helpers\MyScheduler.cs
    -->
    <cc1:MyScheduler ID="MyScheduler1" runat="server" SelectedView="WeekView" StartInsertingInAdvancedForm="true"  AppointmentStyleMode="Default" 
        StartEditingInAdvancedForm="true">
        <AdvancedForm Enabled="true" Modal="true" />
        <WebServiceSettings Path="~/SchedulerService" ResourcePopulationMode="ServerSide" UseHttpGet="false" />
    </cc1:MyScheduler>
</asp:Content>

And here there is the override of teh GetAppointments from SchedulerProviderBase in my implementation of the WebServiceAppointmentController



public override IEnumerable<Appointment> GetAppointments(RadScheduler owner)
        {
            List<Appointment> list = new List<Appointment>();
            AppointmentDS.SchedarioDataTable dt = null;
            DateTime star;
            DateTime end;
            Dictionary<DateTime, List<Appointment>> dic = new Dictionary<DateTime, List<Appointment>>();
 
            int ora = 9;
            int cont = 0;
 
            try
            {
                dt = dal.getSchedarioDT(DateTime.Today, DateTime.Today.AddDays(-7), DateTime.Today.AddDays(7));
                foreach (AppointmentDS.SchedarioRow row in dt)
                {
 
                    Appointment item = owner.CreateAppointment();
 
                    item.ID = row.STR_Id;
                    if (row.IsTIS_NomeNull())
                        item.Subject = "";
                    else
                        item.Subject = row.TIS_Nome;
 
                    star = new DateTime(row.PST_DataScadenza.Year, row.PST_DataScadenza.Month, row.PST_DataScadenza.Day,0,0,0);
                    end = new DateTime(row.PST_DataScadenza.Year, row.PST_DataScadenza.Month, row.PST_DataScadenza.Day, 0, 0, 0);
                     
                    item.Start = star.ToUniversalTime();
                    item.End = end.ToUniversalTime();
 
                    item.BackColor = System.Drawing.Color.Yellow;
                    item.CssClass = "testtest";
 
                    list.Add(item);
 
                }
 
               

                 
            }
            catch (Exception ex)
            {
                 
                throw;
            }
            return list;
 
        }
How you can see I use the item.BackColor = System.Drawing.Color.Yellow;
But it don't take effect in the View.

Samebody can help me please?

Thanks a lot                   

Peter
Telerik team
 answered on 22 Feb 2011
2 answers
468 views
Hello, let's say I have a RadTextBox and a RadButton
with CSS:
.Control
{
    Width: 100%;
}
If I apply to both RadTextBox and RadButton ( CssClass="control" ), the RadTextBox will not expands to the maximum width, althought RadButton does, but the background image from RadButton's default style is gone.
When I try to set Width="100%" within the control, it work prefectly.
You can see the screenshot from the attachment, the first two control is RadTextBox and RadButton with CSS width 100% applied, the third and fourth control is Asp.Net's default TextBox and Button control with CSS width 100% applied.

I wonder if this an issue and have been fixed? Or just that the way I applied was wrong?
Since I haven't update my Telerik Componet since November.

Thanks
King Chan
Top achievements
Rank 1
 answered on 22 Feb 2011
3 answers
169 views
Hi Telerik Team !

Most of our users are using IE6, but we would like to use the Embedded Icons as available in RadButton. The Icons doesn't display well. Is there is any know remedy ?

Cheers,

S.F.
Sébastien
Top achievements
Rank 2
 answered on 22 Feb 2011
5 answers
700 views
Dear Telerik Team,

I am actually migrating the asp:button to telerik:radbutton and some logic doesn't work as expected.
For example, It was easy to use things like that to click a button using jQuery : 

function keyboardActions(event) {
    if (event.keyCode == 13) {
 
        eval($("#<%=btnSearch.ClientID %>").trigger('click')); // Doesn't work with RadButton Q3.2010
        return false;
    }
    //  other keypressed other actions ?
}
 
// If the client press ENTER, the Search button is clicked.
$(document).ready(function () {
    if ($.browser.mozilla) {
        $("#<%=txtName.ClientID %>").keypress(keyboardActions);
        $("#<%=txtCode.ClientID %>").keypress(keyboardActions);
     } else {
        $("#<%=txtName.ClientID %>").keydown(keyboardActions);
        $("#<%=txtCode.ClientID %>").keydown(keyboardActions);
    }
});

How may I do the same logic using RadButton ?

Cheers,

S.F.
Sébastien
Top achievements
Rank 2
 answered on 22 Feb 2011
3 answers
161 views

Hello,

I am displaying several RadSliders within a RadListView inside of a 'load on demand' RadTabStrip, and I am getting a rendering issue with the RadSlider on all browsers.

After my ‘compatibility’ tab loads the RadSliders look as you see them in ImageA.  You will notice that I have placed one test RadSlider outside of the RadListView which also displays incorrectly.

If I click on my ‘profile’ tab and then back to my ‘compatibility’ tab the RadSliders will display correctly and as expected in ImageB.

Does anyone know how to correct this issue?

Best regards,

~Dean

Dean
Top achievements
Rank 1
 answered on 22 Feb 2011
2 answers
279 views
Hello,
I'm using a userControl as an editForm for my radGrid. In the said editForm, I have a bunch of other userControl with contains custom radComboBox. I'm trying to add server-side SelectedItemChanged event to those comboBox, but the event never gets fired. Here's the way I'm adding the event:

dataComboBox.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(this.dataComboBox_SelectedItemChanged);

Since I use those userControl elsewhere, I know that the syntax isn't the issue. I tried to add the event withing my editForm userControl at a bunch of different place, such as in DataBinding and OnInit event. I also tried to add the event in the ItemDataBound event of my radGrid without any success. How or where can I add my SelectedItemChanged?

Thank you for your help,
LP
Louis-Philippe
Top achievements
Rank 1
 answered on 22 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?