Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.7K+ views
Hi All,

I am looking for a way to set the border color of ComboBox from code behind using PreRender handler of the ComboBox. I have tried the following code and it does not work. Can someone please help me with this?

protected void rcbMyCombo_PreRender(object sender, EventArgs e)
{
        rcbMyCombo.BorderColor = System.Drawing.Color.Red;
        rcbMyCombo.ToolTip = "Error occurred with the data of the control.";
}

Regards,
Prasad
Marin Bratanov
Telerik team
 answered on 17 Apr 2018
1 answer
144 views

I have an  chart (sparkline) I am trying to render into a group header.

I have no problems accessing the group header and pushing text to it, but have no idea how to render a control and reading through all the documentation I haven't found out how to do it.

Simple rendering of text example:

       RadGrid1.MasterTableView.ColumnGroups.FindGroupByName("TrendChartHeader").HeaderText = "Hello World.";

Thanks for any assistance anyone can provide.

 

~T

Marin Bratanov
Telerik team
 answered on 17 Apr 2018
2 answers
322 views

How fix the css like the attached image, like the blue text..

 

My css now

<style>
    html .RadNavigation .rnvRootGroup .hiddenNode {
        display: none;
    }
 
    html .RadNavigation {
        font-size: 18px;
        font-family: 'Roboto', sans-serif;
        font-weight: 400;
        color: #204b9b;
        background-color: #dfd10e;
    }
 
        html .RadNavigation .rnvRootGroupWrapper {
            border-width: 0;
        }
 
        html .RadNavigation .rnvRootGroup > .rnvItem {
            margin: 12px;
        }
 
        html .RadNavigation .rnvMore,
        html .RadNavigation .rnvRootLink {
            margin: 0;
            padding-top: 0;
            padding-bottom: 0;
            border-width: 0;
        }
 
        html .RadNavigation .rnvHovered.rnvMore,
        html .RadNavigation .rnvSelected.rnvMore {
            margin: 0;
            border-width: 0;
        }
 
            html .RadNavigation .rnvHovered.rnvMore.rnvRight,
            html .RadNavigation .rnvSelected.rnvMore.rnvRight {
                margin: 0;
            }
 
        html .RadNavigation .rnvHovered .rnvRootLink {
            background-color: #f1e890;
        }
 
        html .RadNavigation .rnvToggle {
            line-height: 1.6em;
        }
 
    .rnvPopup {
        background-color: white;
        border-color: #cfd8dc;
        font-size: 16px;
        font-family: 'Roboto', sans-serif;
        color: #204b9b;
    }
 
        .rnvPopup .rnvHovered {
            background-color: #eceff1;
            border-color: #cfd8dc;
            color: #159eda;
        }
</style>
Marin Bratanov
Telerik team
 answered on 17 Apr 2018
3 answers
136 views

Requirements

Telerik Product and Version

Scatter Chart

Supported Browsers and Platforms

Visual Studio 2017, Microsoft Edge / Google Chrome

Components/Widgets used (JS frameworks, etc.)



I want to implement the demo in my local environment from following demo but running through various errors.

https://demos.telerik.com/aspnet-ajax/htmlchart/examples/charttypes/scatterchart/defaultcs.aspx?show-source=true

1. "ScatterSeriesItem" is not a known element

2. Type 'Telerik.Web.UI.HtmlChart.PlotArea.AxisLabelsAppearance' does not have a public property named 'Skip'.

What are the basic things which I need to take care of so that I can run this demo successfully in my local environment.

Vessy
Telerik team
 answered on 17 Apr 2018
2 answers
844 views
Hello,

I want to use a RadNumericTextBox as input for integers. But there is still a problem: The user can still insert a decimal separator.
How can I prevent this?
This is the code:

textBox = new RadNumericTextBox();
textBox.ID = "NumTextBox";
textBox.Type = NumericType.Number;
textBox.DataType = typeof(int);
textBox.NumberFormat.DecimalDigits = 0;
textBox.ShowSpinButtons = true;

What else must I set?

Thanks!
Gabriel
Top achievements
Rank 2
 answered on 17 Apr 2018
0 answers
142 views

I need to repaint chart in iframe from "parent".

Not sure how to do it without proper "handle" of the chart.

Can it be done?

Thank you

David
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 16 Apr 2018
3 answers
148 views

I have a simple object with some string properties ('name', 'Id', 'GeoJson'). I want to use this object as datasource in a map as shape layer. It's quite a bit ago I worked with Telerik. So, sorry for my stupid question.

Thanks

Peter Milchev
Telerik team
 answered on 16 Apr 2018
3 answers
254 views

I'm trying to apply a background image to the Diagram Control. 

I got it to work when viewing on the webpage by adding style="background-image: url('btest.png'); background-repeat: no-repeat; top: 0px;" to the RadDiagram control, but when I export the finished diagram to PDF or SVG the background image doesn't show.   Is there a different way I could add the background image to the diagram where it would work with the exporting tools?

 

 

 

 

 

Vessy
Telerik team
 answered on 16 Apr 2018
2 answers
228 views

I am facing an annoying issue regarding the default behavior of RadListBox. If you have a list displayed that is long enough to show the scroll bars, scroll down a bit so the top selection is partially hidden by the top of the list box. When you click on the top selection, the list gets reorganized so that the selected item is now at the bottom of the list.

To see what I'm talking about, you can use the demo: https://demos.telerik.com/aspnet-ajax/listbox/examples/overview/defaultcs.aspx

Scroll down on the left list so that the top of France is cut off, so the top bar of the F is hidden but the lower case letters are all intact. Now select France. You see that the list is repositioned so that France is now at the bottom.

Where this is an issue is when you associate double-click selection to the list. What happens is that on the first click the list gets reorganized, and the second click now selects the new element under the cursor. So using the above example, you double-click France but Brazil gets selected instead.

Is there a way to disable the list reorganization and to retain the scroll position?

 

 

Gilbert
Top achievements
Rank 1
 answered on 13 Apr 2018
0 answers
172 views

Hi;

I'm trying your component. I had added an autocompletebox to a page and created itemtemplate as described in demo. But only client template is working and i can't add attributes to client template. For that reason i need to use serverside template. When i use DropDownItemTemplate , i'm not getting any error but it's showing DataTextField, not template... Here is my code for webservice and aspx;

ClientSide Event for webservice filter

  function requestingIdNr(sender, eventArgs) {
        var context = eventArgs.get_context();
        //Data passed to the service.
        context["ogrnr"] = "det_info";
    }

              <telerik:RadAutoCompleteBox ID="txtNr" runat="server" Width="300px" AllowCustomEntry="true"
                    Filter="StartsWith" DropDownWidth="300px" DropDownHeight="250px" DataTextField="idnr"
                    InputType="Token" MaxResultCount="10" MinFilterLength="3" TextSettings-SelectionMode="Single"
                    AutoPostBack="true" OnClientRequesting="requestingIdNr" OnEntryAdded="txtNr_EntryAdded" OnEntryRemoved="txtNr_EntryRemoved">
                    <WebServiceSettings Method="fillActBoxTC" Path="AutoCompletes.asmx" />
                    <DropDownItemTemplate>
                        <table >
                            <tr>
                                <td style="width: 25%"><%# DataBinder.Eval(Container.DataItem, "idnr")%>
                                </td>
                                <td style="width: 50%">
                                    
                                </td>
                            </tr>
                            <tr>
                                <td>Name:
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "name")%>
                                </td>
                            </tr>
                            <tr>
                                <td>Class:
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "classcode")%>
                                </td>
                            </tr>
                            <tr>
                                <td>Nr:
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "nr")%>
                                </td>
                            </tr>
                        </table>
                    </DropDownItemTemplate>
                </telerik:RadAutoCompleteBox>

And WebService Side :

        [WebMethod(EnableSession = true)]
        public AutoCompleteBoxData fillActBoxTC(RadAutoCompleteContext context)
        {
            string searchString = context.Text;
            idsBE.idsDataTable data = bll.getidsbyNr(((compBE.usrRow)Session["actUser"]).compid, searchString);
            List<AutoCompleteBoxItemData> result = new List<AutoCompleteBoxItemData>();

            foreach (idsBE.idsRow row in data)
            {
                AutoCompleteBoxItemData childNode = new AutoCompleteBoxItemData();
                childNode.Text = row["idnr"].ToString();
                childNode.Value = row["idnr"].ToString();
                childNode.Attributes.Add("idnr", row["idnr"].ToString());
                childNode.Attributes.Add("name", row["name"].ToString());
                childNode.Attributes.Add("classcode", row["classcode"].ToString());
                childNode.Attributes.Add("nr", row["nr"].ToString());
                result.Add(childNode);
            }

            AutoCompleteBoxData res = new AutoCompleteBoxData();
            res.Items = result.ToArray();

            return res;
        }

Alper
Top achievements
Rank 1
 asked on 13 Apr 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?