Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
81 views
URL that demonstrates the issue:
http://testbed.dragocactoid.com

I have two issues, I have gotten rid of the border surrounding the root level of the menu (CSS override .rmRootGroup {border: none !important;} )

However, as you mouse over the menu items there are top and bottom borders being displayed. I want those to go away, too.

Secondly, the background color of the non-root menuitems is different than the root menuitems.  I don't really care if the background color stays the same or "highlights", but I want all the menu levels to behave the same.

Does someone know which styles I have to override to accomplish this?

Thanks,
Ken
Yana
Telerik team
 answered on 28 Sep 2010
1 answer
83 views
Hi everybody,

I'm playing around with RadChart and I want to make the chart dynamic.
I use the flowing code:
private static int[] huidigJaar = {135, 115, 79, 51, 5}; // ToDo: Values uit webService
private static int[] vorigeJaar = {110, 135, 47, 46, 15 }; // ToDo: Values uit webService
 
 
        protected override void OnLoad(EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                InitRadChart();
                SetGraphValues();
            }
            RadChart1.Skin = "Pastel";
            base.OnLoad(e);
        }
 
        private void SetGraphValues() // Vullen van de Bars in de Grafiek
        {
            ChartSeries aantalSeries = RadChart1.GetSeries("Huidig Jaar");
            if (aantalSeries != null)
            {
                if (aantalSeries.Items.Count > 0)
                {
                    foreach (ChartSeriesItem seriesItem in aantalSeries.Items)
                    {
                        seriesItem.YValue = huidigJaar[seriesItem.Index];
                    }
                }
                else
                {
                    for (int i = 0; i < 5; i++)
                    {
                        aantalSeries.AddItem(huidigJaar[i]);
                    }
                }
            }
 
 
            ChartSeries aantalVorig = RadChart1.GetSeries("Vorig Jaar"); // Vorige Jaar
            if (aantalVorig != null)
            {
                if (aantalVorig.Items.Count > 0)
                {
                    foreach (ChartSeriesItem seriesItem in aantalVorig.Items)
                    {
                        seriesItem.YValue = vorigeJaar[seriesItem.Index];
                    }
                }
                else
                {
                    for (int i = 0; i < 5; i++)
                    {
                        aantalVorig.AddItem(vorigeJaar[i]);
                    }
                }
            }
        }
 
 
        private void InitRadChart() //Initalisatie van de Graph.. hier ook bepalen hoeveel bars.
        {
            // Titel van chart afhankelijk van wat we gaan tekenen.
            const string TITLETEXT = @"Aanvragen in {0} over de tijds periode {1}";
            RadChart1.ChartTitle.TextBlock.Text = string.Format(TITLETEXT,
                                             RadComboBox2.SelectedItem.Text,
                                             RadComboBox1.SelectedItem.Text);
                      
            RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Font = new Font("Verdana", 10);
            RadChart1.PlotArea.XAxis.Appearance.TextAppearance.TextProperties.Color = Color.LightSlateGray;
 
            RadChart1.AutoLayout = true;
            RadChart1.PlotArea.XAxis.AutoScale = false;   // Moet op False anders wordt de label niet getoont.        
            RadChart1.PlotArea.XAxis.AddItem("Aangevraagd");
            RadChart1.PlotArea.XAxis.AddItem("Uitgebracht");
            RadChart1.PlotArea.XAxis.AddItem("Gepasseerd");
            RadChart1.PlotArea.XAxis.AddItem("Vervallen");
            RadChart1.PlotArea.XAxis.AddItem("Pijplijn");
            RadChart1.PlotArea.YAxis.VisibleValues = ChartAxisVisibleValues.Positive;
            RadChart1.Appearance.BarOverlapPercent = 40; // Huidige bar over de vorrige heen leggen           
             RadChart1.Series.Clear(); 
 
            //Bars voor het vorige jaar.. Wordt gevuld bij SetGraphValues
            ChartSeries aantallenVorrig = new ChartSeries("Vorig Jaar", ChartSeriesType.Bar);
            RadChart1.AddChartSeries(aantallenVorrig);
            aantallenVorrig.Appearance.ShowLabels = false;
 
            //Bars voor het huidige jaar.. Wordt gevuld bij SetGraphValues
            ChartSeries aantallenHuidig = new ChartSeries("Huidig Jaar", ChartSeriesType.Bar);
            RadChart1.AddChartSeries(aantallenHuidig);
            aantallenHuidig.Appearance.ShowLabels = true;
            aantallenHuidig.Appearance.TextAppearance.TextProperties.Color = Color.Black;
        }
 
        protected void RadComboBox_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            if ((RadComboBox1.SelectedItem != null) && (RadComboBox2.SelectedItem != null) )
            {
                InitRadChart();
                SetGraphValues();           
            }
        }
 

When I changed one of the RadCombo Boxes, the Title is updated perfectly but I get the,
extra serries in my chart.  
View screenshot.  

What is it, that I'm douing wrong ?




Erik
Top achievements
Rank 1
 answered on 28 Sep 2010
0 answers
89 views
Hi,

1.
Can I know how configure the related combobox "Country" don't auto open for every times I select "Continent"
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx

2.
Can I know why I try add Empty Message for Multi-column Combobox , but didn't show out.
http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx


Thanks.

aw
aw
Top achievements
Rank 1
 asked on 28 Sep 2010
1 answer
207 views

Hi,
i am using Radgrid and here is the column ...

 <telerik:GridHyperLinkColumn DataTextField="CostCentre" HeaderText="Cost Centre" SortExpression="CostCentre"
                            FooterStyle-Font-Bold ="true"
                            FooterStyle-HorizontalAlign ="Right"
                            UniqueName="CostCentre"
                            DataNavigateUrlFields="Id"
                            DataNavigateUrlFormatString="~/Allotment/Allotment.aspx?allotmentId={0}&ViewMode=ReadOnly"
                            Target="_blank"
                            HeaderStyle-HorizontalAlign="Right"
                            ItemStyle-HorizontalAlign="Right" HeaderStyle-Width="80px"
                            />

but when i am trying to access the text of this field i am getting error.

public static void PrintRadGrid(ref StringBuilder content, RadGrid radgrid, ArrayList fieldsList, string gridTitle)
    {

        //print rows
        foreach (GridDataItem item in radgrid.Items)
        {
            ArrayList newArray = new ArrayList();

            for (int i = 0; i < fieldsList.Count; i++)
            {   
                Type type = radgrid.Columns[i].GetType();

                if (type.Name == "GridHyperLinkColumn")
                {
                   newArray.Add(((HyperLink)item[fieldsList[i].ToString()].Controls[i]).Text);
                }
                else if (type.Name == "GridBoundColumn")
                {
                   newArray.Add(item[fieldsList[i].ToString()].Text);
                }
            }

            content.Append("<tr>");
            foreach (string value in newArray)
            {
                content.Append("<td>" + value + "</td>");
            }
            content.Append("</tr>");
        }


        content.Append("</table>");
        content.Append("<br />");

    }

and it is working fine for GridBoundColumn.


please help.
Shinu
Top achievements
Rank 2
 answered on 28 Sep 2010
2 answers
134 views
Hi there,


All Im wanting to do is get the value from the combo box when i do a post back so that I know what item was selected. This isnt in the manual but it must be a failry common task.

Please help.


Cheers,

Trent
trent
Top achievements
Rank 1
 answered on 28 Sep 2010
2 answers
144 views
Hi there, I am encountering a couple of problems using the scheduler and am wondering if anyone can help.
The first one is that I cannot seem to get appointments to show up under their appropriate resources. Without resources, the scheduler displays the appointments fine. Here is the code, see if you can see what I'm doing wrong:

Initializing resources:
ResourceType resType = new ResourceType("Vehicle");
resType.ForeignKeyField = "VehicleID";
tripScheduler.ResourceTypes.Add(resType);
 
Vehicle[] vehicles = Vehicle.GetVehiclesForDate(DateTime.Parse(txtDate.Text));
foreach (Vehicle vehicle in vehicles)
   tripScheduler.Resources.Add(new Resource("Vehicle", vehicle.ID, vehicle.SummaryTextLong));

Initializing appointments:
Trip[] clientTrips_scheduled = Trip.GetTripsForDate(date, true);
DataTable scheduledTripsTable = new DataTable();
scheduledTripsTable.Columns.Add("ID");
scheduledTripsTable.Columns.Add("Title");
scheduledTripsTable.Columns.Add("Start");
scheduledTripsTable.Columns.Add("End");
scheduledTripsTable.Columns.Add("VehicleID");
DataRow row;
 
foreach (Trip trip in clientTrips_scheduled)
{
    row = scheduledTripsTable.NewRow();
    row["ID"] = trip.ID;
    row["Title"] = trip.Summary;
    row["Start"] = trip.Start;
    row["End"] = trip.End;
    row["VehicleID"] = trip.VehicleID;
 
    scheduledTripsTable.Rows.Add(row);
}
 
tripScheduler.DataSource = scheduledTripsTable;
tripScheduler.DataBind();

The scheduler markup (although I am doing all of the work in code-behind, here's the markup so you can see what I'm doing):
<telerik:RadScheduler ID="tripScheduler" runat="server" DataKeyField="ID" DataSubjectField="Title" DataStartField="Start" DataEndField="End" DisplayDeleteConfirmation="true" onappointmentcreated="tripScheduler_AppointmentCreated" CustomAttributeNames="VehicleID">
    <TimelineView UserSelectable="false" />
    <WeekView UserSelectable="false" />
    <MonthView UserSelectable="false" />
    <DayView UserSelectable="false" />
</telerik:RadScheduler>

Now I don't know what I'm doing wrong, I thought the foreign key field of "VehicleID" should allow appointments to be auto-assigned to their appropriate resources based on their "VehicleID" column value? Or do I need to do more than this?

Any help is greatly appreciated, sorry if I've missed something really obvious :)

The other problem is a very simple one - is it possible to assign separate start and end availability times for each resource? ie each Vehicle on my scheduler will have a shift start/end time, and I want this to be reflected on the scheduler.
Ryan
Top achievements
Rank 1
 answered on 28 Sep 2010
2 answers
699 views
Hi. I'm trying to enable or disable the datepicker control from the client with the datepicker.enable() and datepicker.disable() but it doesn't seem to work. The browser throws an "object doesn't support this property or method". It works okay on a radtextbox control. Am I using the correct method? Thanks.

function ShowHideRefreshItems() {
                    var dp = $find("<%= rdpRefresh.ClientID %>");
                    //var textbox = $find("<%= rntSupportRef.ClientID %>");
                    if (dp.get_enabled())
                        dp.disable();
                    else
                        dp.enable();
                }

<asp:CheckBox ID="cbRefresh" runat="server" Text="Request a refresh of environment" ValidationGroup="vgEnvironmentUpdate" onclick="ShowHideRefreshItems()" />
<telerik:RadDatePicker ID="rdpRefresh" Skin="Default" runat="server" DateInput-ValidationGroup="vgEnvironmentUpdate"
                                    Enabled="false">
                                    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">
                                    </Calendar>
                                    <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                                    <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" ValidationGroup="vgEnvironmentUpdate">
                                    </DateInput>
                                </telerik:RadDatePicker>
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 28 Sep 2010
2 answers
281 views
Hi,
i have a big problem with radtextbox when the field content the character < and send a Insert procedure.
Example:
When the user enters the notes produced by other software in the database (sqlserver 2008 type field varchar(2000), it needs' to include this description:

Note product:
This product in very good,
the steeel is: OC2<HO3

and the software save it ok. (the software is a desktop application).

The select reads the data correctly and displays in a  RadTextBox correctly in a aspnet application. But when I do insert the orders, I get the error:

Errore di run-time di Microsoft JScript: Sys.WebForms.PageRequestManagerServerErrorException: Errore sconosciuto durante l'elaborazione della richiesta sul server. Codice di stato restituito dal server: 500
 
File: Telerik.Web.UI.WebResource_6.axd

it happens before the event:
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
 

Dizionario - Visualizza dizionario dettagliato

  1. congiunzione
    1. but
    2. yet
    3. however
    4. still

The problem is when the "<" character is inserted between two letters without a space.
The problem not persist when the character is insert with space, example: OC2 < HO3
 

Dizionario - Visualizza dizionario dettagliato

  1. sostantivo
    1. la
  2. abbreviazione
    1. A
  3. pronome
    1. it
    2. her
    3. you
  4. articolo
    1. the
    2. a
    3. an

It 's a problem of the radtextbox ?  or you can not enter the character < without spaces between two letters?

Tnks
Aurelio
Aurelio Righetti
Top achievements
Rank 1
 answered on 27 Sep 2010
2 answers
147 views
Hi there , 

I am not sure if its a feature or an issue, but it appears as though I cannot uncheck a checked item in the radlistbox when the radlisbox is disabled 

e.g. 

var list = $find('<%=RadListBoxRisk1.CLientID %>')
alert(list.get_enabled() ) // displays false
var checkeditems = list.get_checkedItems()
for (x =0; x <checkeditems.length ;x ++  )
{
 checkeditems[x].uncheck()
  alert(checkeditems[x].get_checked());  // displays true
}

if I change the code to this .. it works 

var list = $find('<%=RadListBoxRiskEffects.CLientID %>')
list.set_enabled(true)
alert(list.get_enabled() ) // displays true
var checkeditems = list.get_checkedItems()
for (x =0; x <checkeditems.length ;x ++  )
{
 checkeditems[x].uncheck()
  alert(checkeditems[x].get_checked());  // displays false
}
list.set_enabled(false)

thanks 

Mark
mark
Top achievements
Rank 1
 answered on 27 Sep 2010
1 answer
94 views
Hi,

Is it possible to change the background colour of the whole grid row?

Thx a lot.

MG 
Daniel
Telerik team
 answered on 27 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?