Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
226 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
65 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
264 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
169 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
159 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
113 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
105 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
128 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
17 answers
834 views
Hello,

I am working on a project with a RadGrid.

The project requires that when a user clicks on a button, the RadGrid resets the scroll position.

My code: 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
  
                function ResetGridPosition() {
                    var grd = document.getElementById('RadGrid1');
                    var grd1 = $find("<%= RadGrid1.ClientID%>");
                      var master = grd1.get_masterTableView().get_element().parentNode;
                      master.scrollLeft = 0;
                      master.scrollTop = 0;
                  }
  
  
            </script>
        </telerik:RadCodeBlock>
 
  
 <telerik:RadAjaxManager runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadButton1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" UpdatePanelCssClass="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
 
 <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Both" AllowSorting="true" AllowPaging="true" PageSize="30" Width="900px">
                        <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" ></Scrolling>
            </ClientSettings>
                    </telerik:RadGrid>
 
 <telerik:RadButton ID="RadButton1" runat="server" Text="Reset Grid Position" OnClientClicked="ResetGridPosition">

It seems this code really resets the scroll position, but after the postback the
grid scroll position returns to the previous position. [See Video

How do I solve this?

Thanks,
Daniel.
Konstantin Dikov
Telerik team
 answered on 05 Apr 2017
1 answer
187 views

Hello,

 

I am using a Telerik RadSpreadsheet (Telerik.Web.Spreadsheet.dll v. 2016.3.1024.40) in our application. I am testing with Chrome v. 57.

 

The spreadsheet is configured with a ColumnCount of 29 (i.e., A through AC) and these are displaying correctly.

 

However:

  • It is possible to horizontally scroll past the end of the columns.
  • The horizontal scrollbar slider is not resized according to the ratio of visible columns versus total columns (e.g., like the vertical scrollbar slider).
  • Dragging the slider left or right scrolls quickly past the end of the columns and is therefore not usable. (Clicking the right and left buttons scrolls about 1 column at a time and is usable.)

 

I am using the following code to load and populate the spreadsheet server-side:

        // set template spreadsheet
        protected void Page_Init(object sender, EventArgs e)
        {
            // get provider instance
            FTSpreadsheetDocumentProvider provider;
            provider = new FTSpreadsheetDocumentProvider(Server.MapPath(SPREADSHEET_VIRTUAL_PATH), this);
            RadSpreadsheet1.Provider = provider;
        }

 

        // bind template spreadsheet
        protected void RadSpreadsheet1_DataBinding(object sender, EventArgs e)
        {
            RadSpreadsheet1.ColumnsCount = SPREADSHEET_COLUMNS_COUNT; // =29
            RadSpreadsheet1.RowsCount = SPREADSHEET_ROWS_COUNT; // =21
        }

        // populate the data
        protected void RadSpreadsheet1_DataBound(object sender, EventArgs e)
        {
            var sheet = RadSpreadsheet1.Sheets[0];
            sheet.FrozenColumns = 2;
            sheet.Rows[0].Cells[0].Value = ...

 

The attached screenshot shows the page with the horizontal slider about halfway across, which is well past the end of the columns (except for the 2 frozen columns). (PS It's not much better without the frozen columns.)

 

Can you please let me know how to get the horizontal scrollbar working correctly?

 

Thanks,
Severin B.

Severin
Top achievements
Rank 1
 answered on 04 Apr 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?