Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
Hi,

The slider with previous releases has worked perfectly for me. However, since I updated to the latest Telerik release, as soon as I start to drag the slider, the browser pops up a "Microsoft JScript Runtime Error: Invalid arguments" error box. The problem only happens when I drag the marker. If I click on a different part of the slider, the marker moves to the clicked position fine.

When I tried to debug the problem, the debugger shows the following code:

...onDragStart:function(v){var r=v.element;
if(r===this._selectedRegionElement){return this._onDragStartRange(v);
}var k=parseInt($telerik.getCurrentStyle(r,"left",0));
if(isNaN(parseInt(r.style.left))){r.style.left=k+"px";
}var f=parseInt($telerik.getCurrentStyle(r,"top",0));
if(isNaN(parseInt(r.style.top))){r.style.top=f+"px";
}...

And the problem happens in the highlighted line. The value of "$telerik.getCurrentStyle(r,"left",0)" is "auto", and "r.style.left" is "". So you can see where the problem is. Any suggestions?

Thanks
Ning
Slav
Telerik team
 answered on 29 Nov 2012
8 answers
211 views
Hello Community,

i hope you can help me.

Is it possible to use my own Textbox for RadMonthYearPicker?

I need this because i have some css classes that not work with the default textbox of the RadMonthYear Control.
Or i don't know how.

I'm thankful for any Idea!
Danny
Daniel
Top achievements
Rank 1
 answered on 29 Nov 2012
3 answers
70 views
Hi I am trying to display a file from an uploaded file using the RadUpload Control. I want to click on an imagebutton where it will display the file that was uploaded. Is this possible?
Plamen
Telerik team
 answered on 29 Nov 2012
5 answers
154 views
Hey guys,

I have a radgrid with grouping enabled. The data source I use for the grid comes sorted from the db, using a more complicated algorithm.

However, the radgrid re-sorts my data, messing up the initial order.

Any ways to prevent that?

PS: I am using version 2012.2.904.40

Thanks!
Martin
Telerik team
 answered on 29 Nov 2012
1 answer
153 views
Hi,

I have radtool bar on page header. It will have only three toolbar items. I want first two align to left and third one to right. The tool bar occupies entire page width (100%). How to align items?

I have something like below all the items are aligned to left.

        <telerik:RadToolBar runat="server" ID="RadToolBar1" Skin="Hay" Width="100%">
            <Items>
                <telerik:RadToolBarButton ImageUrl="someimage.jpg"></telerik:RadToolBarButton>
                <telerik:RadToolBarButton Text="Application TITLE" Checked="true" CheckOnClick="true" AllowSelfUnCheck="false"></telerik:RadToolBarButton>
                <telerik:RadToolBarButton Text="Getout" ></telerik:RadToolBarButton>
            </Items>
        </telerik:RadToolBar>
Princy
Top achievements
Rank 2
 answered on 29 Nov 2012
4 answers
156 views
Hi,

I am working on a project and I want to change the forecolor of the first three rows of the radgrid and also make it bold so as to show that those top three records are the leading results in the radgrid.

Please help with how I can achieve this.

Thanks
Princy
Top achievements
Rank 2
 answered on 29 Nov 2012
3 answers
624 views
Hi,
How to bind datasource to the radlistview through javascript?







Thanks
Shinu
Top achievements
Rank 2
 answered on 29 Nov 2012
3 answers
39 views
Hi,
There is a link to "http://www.telerik.com/help/aspnet-ajax/single-expand-in-hierarchical-grid.html " from "http://www.telerik.com/help/aspnet-ajax/grdviewstatereductiontechniques.html", illustrating single expansion(single expand) on the telerik grid hierarchy.

Can we get it fixed?

Thanks and regards,
Giridhar.
Shinu
Top achievements
Rank 2
 answered on 29 Nov 2012
1 answer
133 views
I am using RadAsyncUpload with a custom handler based on the demo code. The handler works fine with larger files that take more than a couple seconds to upload. When uploading smaller files that upload almost instantly I get the following error in the custom handler:
Unable to cast object of type 'System.Web.HttpInputStream' to type 'System.IO.FileStream'.

Protected Overrides Function Process(ByVal myFile As Telerik.Web.UI.UploadedFile, ByVal context As HttpContext, ByVal configuration As IAsyncUploadConfiguration, ByVal tempFileName As String) As IAsyncUploadResult
 
    Dim result As MyAsyncUploadResult = CreateDefaultUploadResult(Of MyAsyncUploadResult)(myFile)
    Try
 
      Dim userID As String = ""
 
      Dim myConfiguration As MyAsyncUploadConfiguration = TryCast(configuration, MyAsyncUploadConfiguration)
      If myConfiguration IsNot Nothing Then
        userID = myConfiguration.UserID
      End If
 
      result.FileID = MySaveFile(myFile, userID)
 
    Catch ex As Exception
      Dim sRtn As String = SendErrorEmail(ex, "", "", "handler.ashx", "", "", "")
    End Try
 
    Return result
  End Function
 
  Public Function MySaveFile(ByVal upFile As Telerik.Web.UI.UploadedFile, ByVal userID As String) As String
    Dim sOutputEncrypt As String = ""
    Dim destinationPath As String = "C:\sitefolder\App_Data\Files\"
    Try
      Dim key As Byte() = CreateKey("password")
      Dim IV As Byte() = CreateIV("password")
      Dim sFileName As String = upFile.FileName
      sOutputEncrypt = destinationPath & upFile.GetName.Replace(".", "_") & ".encrypt"
 
      Using fStream As FileStream = upFile.InputStream 'File.Open(filename, FileMode.OpenOrCreate)
        Dim RijndaelAlg As Rijndael = Rijndael.Create()
        Using cStream As New CryptoStream(fStream, RijndaelAlg.CreateEncryptor(key, IV), CryptoStreamMode.Read)
          Using destination As FileStream = File.Create(sOutputEncrypt)
            cStream.CopyTo(destination)
          End Using
        End Using
      End Using
 
     Catch ex As Exception
      Dim sRtn As String = SendErrorEmail(ex, "", "", "handler.ashx", "", "", "")
    End Try
    Return sOutputEncrypt
  End Function
M B
Top achievements
Rank 1
 answered on 29 Nov 2012
3 answers
51 views
Hi,

We are having an issue with rendering the radgrid in IE 9 browser. It works fine on IE8. I am using the latest telerik dll's.
The radgrid we have defined has about 50 columns, so we have it wrapped within a div and it has to scroll horizontally. The grid is always designed to be in edit mode. When you Add a New Item, and place focus on any textboxes, blank lines keep getting inserted at the footer of the radgrid.

I am able to replicate this issue in a demo project, but for some reason there is no way I can provide an attachment on this new thread. Please let me know, I can email you the demo project.

I also noticed that if I do not include asp:menu, the issue does not occur, but that is not an option for us. We are using the Menu.

Please let me know how to proceed, I have tried implementing various css based on your forums, none of them have worked so far.

Thanks,
Aditi

CSS to include

.GridDock
{
    overflow-x: auto;
    overflow-y: hidden;                       
}
Page: Default.aspx

<
div class="GridDock" id="dvGridWidth" style="width:800px;">
  
          <telerik:RadGrid ID="RadGrid1" runat="server" Width="50%" 
                GridLines="None"
                AutoGenerateColumns="False" 
                PageSize="20"
                AllowPaging="True"
                AllowMultiRowEdit = "True" 
                AllowAutomaticDeletes="True"
                OnNeedDataSource="RadGrid1_NeedDataSource"
                ShowStatusBar="true" 
                Skin="Simple"
                AllowFilteringByColumn="false"  
                OnItemCreated="RadGrid1_ItemCreated"                     
                OnInsertCommand="RadGrid1_InsertCommand"       
                OnItemCommand="RadGrid1_ItemCommand"     
                OnItemDataBound="RadGrid1_OnItemDataBound"
                OnPreRender="RadGrid1_PreRender">
                  
                <GroupingSettings CaseSensitive="false" />                   
                  
                 <MasterTableView DataKeyNames="QuoteItemID" EditMode="InPlace" NoMasterRecordsText=""
                    InsertItemDisplay="Bottom" CommandItemDisplay="Top" CommandItemStyle-Wrap="false">
                      
                    <FooterStyle  HorizontalAlign="Left" /> 
                    <HeaderStyle HorizontalAlign="Left" /> 
                    <ItemStyle Wrap = "false" />
                    <CommandItemTemplate>
                        <asp:LinkButton ID="add" runat="server" Text="Add New Quote Item" CommandName="InitInsert" Height="20px" 
                           Font-Underline="true"  Font-Bold="true"></asp:LinkButton>
                        <asp:LinkButton ID="save" runat="server" Text="Add New Quote Item" CommandName="PerformInsert" Height="20px" 
                           CssClass="underlinedLinkButton" Font-Underline="true" Font-Bold="true" Visible="false"></asp:LinkButton>
                    </CommandItemTemplate>
  
                    <Columns>
  
                        <telerik:GridTemplateColumn UniqueName="ProductID" HeaderText="SKU" SortExpression="ProductID" 
                            ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="false" HeaderStyle-Width="140px" ItemStyle-Width="140px"
                            <ItemTemplate>
                                <telerik:RadTextBox ID="txtVal" Width="140px" 
                                    AutoPostBack="true" runat="server"></telerik:RadTextBox>                                
                            </ItemTemplate>
                            <HeaderTemplate><label style="color:Red; right:2px">*</label><label>SKU</label></HeaderTemplate>
                        </telerik:GridTemplateColumn>
  
                                     
                        <telerik:GridTemplateColumn UniqueName="ProductLine" HeaderText="Product Line" SortExpression="ProductLine"
                            ItemStyle-Width="124px" HeaderStyle-Width="124px" >
                         <EditItemTemplate>
                                <telerik:RadTextBox ID="txtProductLine" Width="140px" 
                                    AutoPostBack="true" runat="server"></telerik:RadTextBox>                                
                          </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        
                       <telerik:GridTemplateColumn UniqueName="Capacity" HeaderText="Capacity" SortExpression="Capacity"
                            ItemStyle-Width="70px" HeaderStyle-Width="85px" FilterControlWidth="50px">
                         
                        <EditItemTemplate>
                           <telerik:RadTextBox ID="txtCapacity" Width="140px" 
                                    AutoPostBack="true" runat="server"></telerik:RadTextBox>                                  
                        </EditItemTemplate>
                        <%--<HeaderTemplate><asp:Label ID="lblReqCapacity" Text="*" CssClass="requiredFieldStyle" runat="server" /></HeaderTemplate>--%>
                        <HeaderTemplate><label style="color:Red; right:2px">*</label><label>Capacity</label></HeaderTemplate>
                        </telerik:GridTemplateColumn>
  
                        <telerik:GridTemplateColumn UniqueName="RequestedQty" HeaderText="RequestedQty" ItemStyle-Width="80px" HeaderStyle-Width="100px"
                            <EditItemTemplate>  
                                <telerik:RadNumericTextBox ID="txtRequestedQty" runat="server" MaxLength="6" Width="80px" 
                                    DataField="RequestedQty" MinValue="0" MaxValue="999999999" >
                                       
                                    <NumberFormat GroupSeparator="" DecimalDigits="0" AllowRounding="true" 
                                        KeepNotRoundedValue="false"  /> 
                                </telerik:RadNumericTextBox>
                            </EditItemTemplate>  
                            <HeaderTemplate><label style="color:Red">*</label><label>RequestedQty/ Units (K)</label></HeaderTemplate>
                        </telerik:GridTemplateColumn>
  
                         <telerik:GridTemplateColumn UniqueName="TAM" HeaderText="TAM" ItemStyle-Width="80px" HeaderStyle-Width="100px"
                            <EditItemTemplate>  
                                <telerik:RadNumericTextBox ID="txtTAM" runat="server" MaxLength="6" Width="80px" 
                                    DataField="TAM" MinValue="0" MaxValue="999999999">
                                 <NumberFormat GroupSeparator="" DecimalDigits="0" AllowRounding="true" 
                                        KeepNotRoundedValue="false"  /> 
                                </telerik:RadNumericTextBox>
                            </EditItemTemplate>
                            <HeaderTemplate><label style="color:Red">*</label><label>TAM</label></HeaderTemplate>
                        </telerik:GridTemplateColumn>
  
                         <telerik:GridTemplateColumn UniqueName="TAMPercentage" HeaderText="% of TAM" ItemStyle-Width="60px" HeaderStyle-Width="100px" 
                            FilterControlWidth="50px">
                            <EditItemTemplate>  
                                <telerik:RadNumericTextBox ID="txtTAMPercentage" runat="server" Width="60px" CssClass="noBorder" ReadOnly="true" TabIndex="-1" />
                            </EditItemTemplate>  
                        </telerik:GridTemplateColumn>
  
                        <telerik:GridTemplateColumn UniqueName="RequestedPrice" HeaderText="Requested Price" ItemStyle-Width="100px" HeaderStyle-Width="100px"
                            <EditItemTemplate>  
                                <telerik:RadNumericTextBox ID="txtRequestedPrice" runat="server" MaxLength="6" Width="100px" 
                                    DataField="RequestedPrice" DataType="System.Decimal" Type="Number" NumberFormat-DecimalDigits="2"  />
                            </EditItemTemplate>
                            <HeaderTemplate><label style="color:Red">*</label><label>Requested Price</label></HeaderTemplate>
                        </telerik:GridTemplateColumn>
  
                        <telerik:GridTemplateColumn UniqueName="QtoQChange" HeaderText="Q-Q Change %" ItemStyle-Width="100px" HeaderStyle-Width="100px"
                            <EditItemTemplate>  
                                <telerik:RadNumericTextBox ID="txtQtoQChange" runat="server" Width="100px" CssClass="noBorder" ReadOnly="true" TabIndex="-1" />
                            </EditItemTemplate>  
                        </telerik:GridTemplateColumn>
  
                        <telerik:GridTemplateColumn UniqueName="Revenue" HeaderText="Revenue ($,K)" ItemStyle-Width="100px" HeaderStyle-Width="100px"
                            <EditItemTemplate>  
                                <telerik:RadNumericTextBox ID="txtRevenue" runat="server" Width="100px" CssClass="noBorder" ReadOnly="true" TabIndex="-1" />
                            </EditItemTemplate>  
                        </telerik:GridTemplateColumn>
                          
                        <telerik:GridTemplateColumn UniqueName="Application" HeaderText="Application" ItemStyle-Width="120px" HeaderStyle-Width="120px"
                            <EditItemTemplate>  
                                <telerik:RadTextBox ID="txtApplication" runat="server" Width="120px" DataField="Application"/>
                            </EditItemTemplate>
                            <HeaderTemplate><label style="color:Red">*</label><label>Application</label></HeaderTemplate>
                        </telerik:GridTemplateColumn>
  
                          
                    </Columns>
               </MasterTableView>
            </telerik:RadGrid>               
        </div>
        <asp:Label runat="server" ID="lblTest" Text="Floating Text"></asp:Label>
Page: Default.aspx.cs

using
System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;
  
namespace GridBlankLines
{
    public partial class _Default : System.Web.UI.Page
    {
        private static string commandName;
  
        protected void Page_Load(object sender, EventArgs e)
        {
  
        }
  
        protected void RadGrid1_PreRender(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                foreach (GridItem item in RadGrid1.MasterTableView.Items)
                {
                    if ((item is GridEditableItem) && (!(item is GridHeaderItem)))
                    {
                        GridEditableItem editableItem = item as GridDataItem;
                        editableItem.Edit = true;
                    }
                }
                RadGrid1.Rebind();
            }
  
            //to show the grid in insert mode after insert operation
            if (commandName == "PerformInsert")
            {
                commandName = "";
                RadGrid1.MasterTableView.IsItemInserted = true;
                RadGrid1.Rebind();
  
            }          
  
        }
                
        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = new DataTable();
              
        }
  
        protected void RadGrid1_InsertCommand(object source, GridCommandEventArgs e)
        {
        }
  
        protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
        {
             
  
        }
  
        protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.InitInsertCommandName)
            {
                commandName = "PerformInsert";
            }
        }
  
        protected void RadGrid1_OnItemDataBound(object sender, GridItemEventArgs e)
        {
              
             
             
        }        
  
    }
}
Site.master page
<
body
    <form runat="server"
    <telerik:RadScriptManager EnablePartialRendering="true" EnableScriptCombine="false" ID="radScriptMgr" runat="server"
</telerik:RadScriptManager
    <div class="page"
        <div class="header"
            <div class="title"
                <h1
                    Demo App 
                </h1
            </div
               
            <div class="clear hideSkiplink"
                <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"
                    <Items
                        <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/> 
                        <asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/> 
                    </Items
                </asp:Menu
            </div
        </div
        <div class="main"
            <asp:ContentPlaceHolder ID="MainContent" runat="server"/> 
        </div
        <div class="clear"
        </div
    </div
    <div class="footer"
            
    </div
    </form
</body>
Pavlina
Telerik team
 answered on 28 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?