Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
50 views

Is there a way to find all the radsearchbox objects on a page on clientside? I know for comboboxes I would use the following code, but I'm not sure how to find for radsearchboxes.

 

for (var i = 0; i < Telerik.Web.UI.RadComboBox.ComboBoxes.length; i++) {
    var objComboBox = Telerik.Web.UI.RadComboBox.ComboBoxes[i];
    alert('Combobox ClientId : ' + objComboBox.get_id());
 
}
steve
Top achievements
Rank 2
 asked on 06 Apr 2017
1 answer
196 views

Dim radChart As New RadHtmlChart()
radChart.ID = "Rad" & iRadCharts
Dim oSeries As Telerik.Web.UI.ColumnSeries = New Telerik.Web.UI.ColumnSeries
oSeries.LabelsAppearance.Visible = False
oSeries.Stacked = True
oSeries.GroupName = "test"
 
LOOP
  Dim oCategorySeriesItem As Telerik.Web.UI.CategorySeriesItem = New Telerik.Web.UI.CategorySeriesItem
  oCategorySeriesItem.Y = Format(v, "0.00")
  radChart.PlotArea.XAxis.Items.Add(sDate)
  oSeries.SeriesItems.Add(oCategorySeriesItem)
      
  Dim oCategorySeriesItem2 As Telerik.Web.UI.CategorySeriesItem = New Telerik.Web.UI.CategorySeriesItem
  oCategorySeriesItem2.Y = Format(vMax, "0.00")
  oCategorySeriesItem2.BackgroundColor = Drawing.Color.Beige
  radChart.PlotArea.XAxis.Items.Add(sDate)
  oSeries.SeriesItems.Add(oCategorySeriesItem2)
END LOOP
radChart.PlotArea.Series.Add(oSeries)
HtmlChartHolder.Controls.Add(radChart)
Peter Milchev
Telerik team
 answered on 06 Apr 2017
12 answers
240 views
Hi,
 I am using Rad grid control for displaying some data and also using command Iterm display property on rad grid.
There is problem for showing static  headers.Multiple headers and Command Items  are displaying when i set static headers property true .Hoping a favourable solutions for my problem.

Thanks in advance,
Preethy
Pavlina
Telerik team
 answered on 06 Apr 2017
0 answers
75 views

Hello All,

Before this we had an issue related to Firefox and already resolved by this solution - http://www.telerik.com/forums/radeditor-paste-not-working-in-firefox.

Ultimately, after the changes made as given in above link we are facing another issue and observed that after copy pasting the text/word the cursor should appear at the end but it remains at the starting position
E.g. If we copy paste the text as 'testing' then the cursor appears just before 't' it should appear after 'g'.

We are using Telerik.Web.UI.dll of 2013.3.114.35.

Thanks,
Shivlila

Pranav
Top achievements
Rank 1
 asked on 06 Apr 2017
5 answers
307 views

label formattig issue with comma

 

for example ,

 

123456789

i need to display it as 1,23,456,789

see attached file

Stamo Gochev
Telerik team
 answered on 06 Apr 2017
0 answers
192 views

Hi,

I have RadComboBoxes in a templated RadListView:

<telerik:RadListView ID="RadListView_ProductDetails" runat="server" OnNeedDataSource="RadListView_ProductDetails_NeedDataSource" DataKeyNames="ID" ItemPlaceholderID="ProductDetailsItemContainer" OnItemCommand="RadListView_ProductDetails_ItemCommand" OnItemDataBound="RadListView_ProductDetails_ItemDataBound">
    <LayoutTemplate>
        <div style="clear: both; margin-bottom: 3px">
            <asp:PlaceHolder ID="ProductDetailsItemContainer" runat="server"></asp:PlaceHolder>
        </div>
    </LayoutTemplate>
    <ItemTemplate>
        <div class="productdetail">
            <div class="productdetailcolumn productdetailtitle"><%#Eval("ProductDetailTitle")%></div>
            <div class="productdetailcolumn productdetailoptions"><telerik:RadComboBox ID="RadComboBox_ProductDetail" ClientIDMode="Static" AllowCustomText="false" EnableTextSelection="false" runat="server" Width="200px" DataTextField="ProductDetailItemKey" DataValueField="ProductDetailItemValue"></telerik:RadComboBox></div>
            <div class="productdetailcolumn productdetailbutton addbutton"><telerik:RadButton ID="RadButton_AddProductDetail" runat="server" Text="Ekle" CommandName="Add"><Icon PrimaryIconCssClass="rbAdd" /></telerik:RadButton></div>
        </div>
    </ItemTemplate>
</telerik:RadListView>

On ItemDataBound, rename all RadCombobox ID's to unique one.

protected void RadListView_ProductDetails_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
{
    RadListViewDataItem rlvi = (RadListViewDataItem) (e.Item);
    Int32 iProductDetailTitleID = Convert.ToInt32(rlvi.GetDataKeyValue("ID").ToString());
    RadComboBox rcb = (RadComboBox) rlvi.FindControl("RadComboBox_ProductDetail");
    rcb.ClientIDMode = ClientIDMode.Static;
    rcb.ID = "RadComboBox_ProductDetail_" + iProductDetailTitleID;
}

Then add items to all comboboxes:

RadListView_ProductDetails.Rebind();
foreach (RadListViewDataItem rlvi in RadListView_ProductDetails.Items)
{
    Int32 iProductDetailTitleID = Convert.ToInt32(rlvi.GetDataKeyValue("ID").ToString());
    RadComboBox rcb = (RadComboBox) rlvi.FindControl("RadComboBox_ProductDetail_" + iProductDetailTitleID);
    RadControlActions.FillRadComboBox(rcb, "SELECT PreviouslyUsedValue AS ItemText, PreviouslyUsedValue AS ItemValue FROM ProductDetailTitlesPreviousValues WHERE ProductDetailTitleID = " + iProductDetailTitleID + " ORDER BY PreviouslyUsedValue", "");
}

 

All OK to this point. 

But when i hit save button, i can't access selected values of RadComboBoxes with this method, because RadComboBox is null:

foreach (RadListViewDataItem rlvi in RadListView_ProductDetails.Items)
{
    Int32 iProductDetailTitleID = Convert.ToInt32(rlvi.GetDataKeyValue("ID").ToString());
    RadComboBox rcb = (RadComboBox) (rlvi.FindControl("RadComboBox_ProductDetail_" + iProductDetailTitleID));
    String strProductDetail = rcb.SelectedValue
}

I get error "System.NullReferenceException: Object reference not set to an instance of an object."

How can get new selected values of this comboboxes?

Thanks.

H. Baris
Top achievements
Rank 1
 asked on 06 Apr 2017
1 answer
182 views

How do we get the material design look for input as shown here: http://www.material-ui.com/#/components/text-field 

Using the Telerik input controls?

 

also, is there a demo page where I can toggle the page 'skin' to see what the skin looks like on a multitude of Telerik Controls?

Doug
Top achievements
Rank 1
 answered on 05 Apr 2017
4 answers
124 views
Hi,

i want to use Radmaskedtextbox in different sytle,like if i set mask as 'None' it has to behave like textbox(which allows any character).

Could you please help me
Scott
Top achievements
Rank 1
 answered on 05 Apr 2017
1 answer
119 views

Hello,

I'm trying to display my individual start/stop datetimes by asset in a single bar, as seen in mockup.png.
I have been working with the Range Bar tied to my SQL data and am currently getting results seen in the results.png file.
My stored proc is returned results seen in SQL Proc.png

My questions are:

  • How do I group my YAxis so that I see 1 bar for the asset?
  • How do I show times along the X Axis?  When I formatted to HH:MM, I didn't get any results in the chart.

 

Here is the code I'm using:

<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="ShiftTimeline._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" DataSourceID="SqlDataSource1" Height="648px" Width="978px"  >
<PlotArea >
    <XAxis DataLabelsField = "MachineName" >
       
    </XAxis>
    <YAxis Name="MinsElapsed" >
    </YAxis>
    <Series>
        <telerik:RangeBarSeries DataFromField="StartDate" DataToField="EndDate" Name="RangeBarSeries1">
        </telerik:RangeBarSeries>
    </Series>
</PlotArea>
        </telerik:RadHtmlChart>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ProdMGRConnectionString %>" SelectCommand="bbx_rpt_MachineTruth2" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:Parameter DefaultValue="999" Name="MachineID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>

Many thanks,

 

David

 

Peter Milchev
Telerik team
 answered on 05 Apr 2017
1 answer
150 views

I'm using a RadComboBox in the load on demand (lazy) mode with a web service.

I'm using a client side item template of this form: <input type='checkbox' id='cb_#= Value #'/><span>#= Text #</span> (adding a checkbox before each item's text)

In the itemDataBound client side handler for this RadComboBox I'm retrieving the particular item's DOM element and the nested checkbox'es DOM element and adding a click handler function for each of them (using jquery's $(element).click(function() {})).

 

The click handler functions work fine until I scroll the items out of view and then scroll back, after that the click handlers are not called anymore.

 

I suppose this is because the DOM elements representing the items get re-created as they are scrolled in and out of view. But the itemDataBound event is raised only once and is not raised again when an item is scrolled back in view.

The only workaround I can think of is to use the onclick attribute in the HTML and reference a global function from there, but this is ugly.

Is there a nicer solution for this then using the onclick attribute?

 

Thanks,

Aleksey

 

 

 

 

 

Aleksey
Top achievements
Rank 1
 answered on 05 Apr 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?