Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
116 views
The issue I have was not present in 2010 Telerik versions but we are just upgrading to 2012-Q3, and this is true for 2012-Q2.

I have two Comboboxes e.g. Country, State. When a Country is selected the States get loaded dynamically using javascript methods. As soon as states are loaded (OnClientItemRequested) we try to showDropDown. But the values dont get displayed in the dropdown. We have to click somewhere else on the page and then once we reclick on the combobox then only values get displayed. Its bit weird problem.

Any clues? I tried .repaint() for the combobox from OnClientItemRequested but that does not help.


Piyush Bhatt
Top achievements
Rank 2
 answered on 27 Nov 2012
0 answers
81 views
Hi  I just installed the Telerik control
. Not sure how to run the installed samples in C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q3 2012\Live Demos\Grid\Examples\Overview.

I am looking for the gridview sample.Did not find any solution file in the folder.
So I created a .net 2010 project and added the DefaultCS.aspx files to the project and it is giving error like RadGrid1 not found.

Is there any instruction to run the samples. I am running win7, 64 bit.
Any help would be apprecaited.
Thanks,
Jay

-----------------------
Never Mind.I found it.Thanks.  
  ------------------------------------
Jayan
Top achievements
Rank 1
 asked on 27 Nov 2012
7 answers
246 views
I use asp:requiredfieldvalidator to validate RadTextBox.
Big problem if i use requiredfieldvalidator and set SetFocusOnError="True" to validate the RadTextBox in Chrome and Safari.
No problem in Explorer and Firefox
If I type in the RadTextBox and go to the next cleared what I wrote and Empty Message is displayed instead.
MG-Hakan
Top achievements
Rank 2
 answered on 26 Nov 2012
2 answers
111 views
HI 

Can someone help me here... 

I have a grid with a popup edit form that seems to timeout, so that when the Update button is clicked there is an exception error (seems to be a 404) and the data entered in the form is lost. The timeout seems to be at about 20 minutes as per the default session value. Before that point the Update works entirely as expected.

Access to the grid requires a login which is maintained in a session variable, so may be is related to that ?  I am not sure because
I have increased the session timeout in web.config as below.

Is there something timing out in view state that needs to be increased?  Please help. Client users are getting mad at losing their inputs...

Thanks

Clive
PS Q2 2010 and asp.net 4.0
<system.web>
        <sessionState timeout="60"></sessionState>
Clive Hoggar
Top achievements
Rank 1
 answered on 26 Nov 2012
1 answer
123 views
Hi everyone,

I had a problem with radchart type pie.

I had two chartseriesitem and there is not problem when two items have value. The problem comes when one of two haven't value. In this case, there is a line that appears and shows something like the end of the item that has value (100%).

A possible solution is to remove the border, but I can't remove because a requeriment is that pie have borders.

for example, you have a pie with two sectors. Both sectors have borders. The first of sector, have 100% value and second 0%. If we remove the borders, the line dissapears, but the border of the first sector too. Is any way to preserve the border of the first sector without the line?



Thanks in advance
Petar Kirov
Telerik team
 answered on 26 Nov 2012
1 answer
103 views
hello,
use a radwindow to create a custom message. I have a problem, when you acknowledge that you have read the message, the radwindow must close and you must open a normal aspx page. To close the radwindow use this code that runs a javascript function:

code vb.net:
Me.ClientScript.RegisterStartupScript(Me.GetType, "", "Close();", True)

code html:

<script type="text/javascript">
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
        return oWindow;
    }
 
    function Close() {
        GetRadWindow().close();
    }
</script>

now here's the code I would use to close the radwindow and open a normal page aspx:

Protected Sub ImgBtncontinua_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgBtncontinua.Click
    Me.ClientScript.RegisterStartupScript(Me.GetType, "", "Close();", True)
    Session.Add("Profilo", 0)
    Response.Redirect("~/profilo.aspx")
End Sub

but the page is loaded into the profilo.aspx radwindow instead I would like to close the radwindow and open the page profilo.aspx, how do it?

Bye
Rumen
Telerik team
 answered on 26 Nov 2012
1 answer
443 views
I am helping a guy with an asp.net project using rad controls.  It's pretty much a database administration site.  So there are a bunch of RadGrids displaying the data.  The problem is there is horizontal scrolling necessary, and I think that looks terrible.  I would rather the columns get narrower, based on some set of minimum sizes, and word wrap as necessary.  I found I could sort of do this like this:

Form[action="JobPosting.aspx"] colgroup col:nth-child(1)
          {
          
              width: 50px  !important;
          }​
Form[action="JobPosting.aspx"] colgroup col:nth-child(2)
          {
         
              width: 100px  !important;
          }

Here is the full asp code:
<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="JobPosting.aspx.cs" Inherits="ASPNETCMS.JobPosting.JobPosting" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 
</asp:Content>
 
 
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   
 
  <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
            <script type="text/javascript">
            function RowDblClick(sender, eventArgs)
            {
              sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }
            </script>
     
        </telerik:RadCodeBlock>
         
         
    <telerik:RadGrid Width="90%" Height="400px" ID="RadGrid1" runat="server"
        AllowAutomaticInserts="True"
       GridLines="None" Skin="Hay" AllowFilteringByColumn="True"
        AllowPaging="True" DataSourceID="LinqDataSource1"
        onselectedindexchanged="RadGrid1_SelectedIndexChanged"
        AutoGenerateColumns="False"
        oninsertcommand="RadGrid1_InsertCommand"
         OnDeleteCommand="RadGrid1_DeleteCommand"
        onitemcommand="RadGrid1_ItemCommand">
          <ClientSettings>
                <Selecting AllowRowSelect="True" />
                <ClientEvents OnRowDblClick="RowDblClick" />
                <Resizing EnableRealTimeResize="true" />
<Scrolling AllowScroll="True" UseStaticHeaders="false"></Scrolling>
            </ClientSettings>
<MasterTableView  CommandItemDisplay="Top"
            DataSourceID="LinqDataSource1" PageSize="25" EditMode="EditForms"   >
             <Columns>
                 <telerik:GridButtonColumn CommandName="Select" Text="Select"
                     UniqueName="column1" ItemStyle-Wrap="true">
                 </telerik:GridButtonColumn>
                 <telerik:GridBoundColumn DataField="jobID" DataType="System.Int32"
                     HeaderText="jobID" SortExpression="jobID" UniqueName="jobID"
                     Visible="False" Resizable="true" ItemStyle-Wrap="true" >
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="jobTitle" HeaderText="Title"
                     SortExpression="jobTitle" UniqueName="jobTitle"  ItemStyle-Wrap="true">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="jobLocation" HeaderText="Location"
                     SortExpression="jobLocation" UniqueName="jobLocation" Visible="False">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="jobType" HeaderText="job Type"
                     SortExpression="jobType" UniqueName="jobType">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="jobContactEmail" HeaderText="jobContactEmail"
                     SortExpression="jobContactEmail" UniqueName="jobContactEmail"
                     Visible="False">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="jobContactAddress"
                     HeaderText="jobContactAddress" SortExpression="jobContactAddress"
                     UniqueName="jobContactAddress" Visible="False">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="jobDescription"
                     HeaderText="jobDescription" SortExpression="jobDescription"
                     UniqueName="jobDescription" Visible="False">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="jobStatus"
                     HeaderText="job Status" SortExpression="jobStatus" UniqueName="jobStatus">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="opening_date" HeaderText="opening date"
                     SortExpression="opening_date" UniqueName="opening_date" Visible="False"
                     DataType="System.DateTime">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="closing_date" HeaderText="closing date"
                     SortExpression="closing_date" UniqueName="closing_date"
                     DataType="System.DateTime">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="start_date" HeaderText="start_date"
                     SortExpression="start_date" UniqueName="start_date" Visible="False"
                     DataType="System.DateTime">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="end_date" HeaderText="end date"
                     SortExpression="end_date" UniqueName="end_date" DataType="System.DateTime">
                 </telerik:GridBoundColumn>
                 <telerik:GridBoundColumn DataField="openUntilFilled"
                     HeaderText="openUntilFilled" SortExpression="openUntilFilled"
                     UniqueName="openUntilFilled" Visible="False">
                 </telerik:GridBoundColumn>
                 <telerik:GridButtonColumn CommandName="Delete" Text="Delete"
                     UniqueName="column"   ButtonType="ImageButton" ImageUrl="~/images/trash_can.png">
                 </telerik:GridButtonColumn>
             </Columns>
             <EditFormSettings EditFormType="WebUserControl" PopUpSettings-ScrollBars="Both"    UserControlName="JobPostingDetail.ascx"   >
                <%--  <PopUpSettings ScrollBars="Auto" Width="800px" Height="600" /> --%><EditColumn UniqueName="EditCommandColumn1"></EditColumn>
 
<PopUpSettings ScrollBars="Both"></PopUpSettings>
             </EditFormSettings>
 
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
 
    <PagerStyle Mode="Slider" />
    
</MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
    </telerik:RadGrid>
 
 
    <asp:LinqDataSource ID="LinqDataSource1" runat="server"
        ContextTypeName="ASPNETCMS.JobPosting.JobsDBDataContext" EnableDelete="True"
        EnableUpdate="True" TableName="tblJobListings" OrderBy="end_date desc">
    </asp:LinqDataSource>
</asp:Content>


 The problem is this seems inconsistent.  Also, the top rows (sort row) and titles don't size accordingly. I have been trying to accomplish this with just modifiying the css and html.  I don't have the actual radcontrols on my computer.  I guess I can try to modify the css for the title and sort row, but in three places it seems redundant, and wrong.

Is there a easy way to do this?

Here is a link of the skewed columns

screenshot

Edit:
There defiantly has to be a pretty simple way to do this.  Using this code:
Form[action="JobPosting.aspx"] #ctl00_ContentPlaceHolder1_RadGrid1_ctl00 colgroup col:nth-child(1)
          {
         background-color:Yellow;
              width: 50px  ;
          }​
Form[action="JobPosting.aspx"] #ctl00_ContentPlaceHolder1_RadGrid1_ctl00  colgroup col:nth-child(2)
          {
         background-color:Blue  !important;
              width: 50px ;
          }
      Form[action="JobPosting.aspx"] #ctl00_ContentPlaceHolder1_RadGrid1_ctl00  colgroup col:nth-child(3)
          {
              background-color:Red;
              width: 10px;
          }
     Form[action="JobPosting.aspx" ] #ctl00_ContentPlaceHolder1_RadGrid1_ctl00  colgroup col:nth-child(4)
          {
               background-color:Orange;
              width: 10px !important;
          }
    Form[action="JobPosting.aspx" ] #ctl00_ContentPlaceHolder1_RadGrid1_ctl00  colgroup col:nth-child(5)
          background-color:Purple;
             
              width: 10px !important;
          }
    Form[action="JobPosting.aspx" ] #ctl00_ContentPlaceHolder1_RadGrid1_ctl00  colgroup col:nth-child(6)
          background-color:Black;
            
              width: 10px !important;
          }
     Form[action="JobPosting.aspx" ] #ctl00_ContentPlaceHolder1_RadGrid1_ctl00  colgroup col:nth-child(7)
          background-color:White;
               
              width: 10px !important;
          }

I get the second screenshot here  screenshot2

The second column isn't being touched.  I don't see why.  


Edit #2:
Ok, So setting the width in the asp control for the grid column's work.  That makes it act like a min-width.  Now the titles and sort row widths are not the same as the regular column widths.  
Pavlina
Telerik team
 answered on 26 Nov 2012
1 answer
48 views
Hi
I have a problem when I open a site, that use radcontrol, in firefox:
  • Errore: ReferenceError: TelerikNamespace is not defined
  • Errore: ReferenceError: RadEditorCommandList is not defined
Thanks
Rumen
Telerik team
 answered on 26 Nov 2012
1 answer
103 views
Hello,

Update:  I just tried other pages that use the ajax manager and none of them now work.

I have a number of dropdowns that on selectedindexchange refresh a grid.  I am using the ajax manager with these controls.  For some reason I am getting this error and I don't believe anythign has changed that I can tell.  I am not certain what it means though.  Anyone have any idea what causes it or how to fix it?  

I don't think it has anything to do with the code behind as this all worked and when i select an item in the dropdown the selectedindexchanged event never gets hit.  It is something happening in between. 

I thought I could attach a screenshot but doesn't look as thought I can.  The error is as follows:  

Microsoft JScript runtime error:  Unable to get value of the property 'id':  object is null or undefined.  

If i click break the code that is erroring is as follows:
if(Array.contains(h,e.get_postBackElement().id)){this._isRequestInProgress=true;

Thanks.

Here is the markup of one of the dropdowns
<div class="row-fluid">
        <div class="span8">
            <div class="category-select">
                <div class="control-group">
                    <label for="ddlStore" class="control-label">Store: </label>
                    <div class="controls">
                        <asp:DropDownList ID="ddlStore" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlStore_SelectedIndexChanged">
                        </asp:DropDownList>
                    </div>
                </div>
            </div>
        </div>
        <div class="span2">
        </div>
    </div>

Markup of the ajax manager
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="ddlStore">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlItemType">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlItemStatus">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlVendor">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlMinorCode">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="ddlPriceTagType">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="txtSKU">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="grdPriceTags" LoadingPanelID="rajaxLoading" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
 
 
               </telerik:RadAjaxManager>

Code Behind:
protected void ddlStore_SelectedIndexChanged(object sender, EventArgs e)
        {
            FillTagGrid();
        }
 
protected void FillTagGrid()
        {
            //check for valid params
 
            Database.sp_PriceTagList_Select ds = new sp_PriceTagList_Select();
            Database.sp_PriceTagList_SelectTableAdapters.PriceTagList_SelectTableAdapter ta = new Database.sp_PriceTagList_SelectTableAdapters.PriceTagList_SelectTableAdapter();
            ta.Fill(ds.PriceTagList_Select,
                this.ddlItemType.SelectedIndex,
                this.ddlItemStatus.SelectedIndex,
                this.ddlStore.SelectedValue,
                this.ddlVendor.SelectedValue,
                this.ddlMinorCode.SelectedValue,
                (String.IsNullOrEmpty(txtSKU.Text) ? null : txtSKU.Text));
 
            this.grdPriceTags.DataSource = ds.PriceTagList_Select;
            this.grdPriceTags.DataBind();
 
            //
            InitGrid();
 
            //update footer with tag count
            string footer = "Price Tags: {0}";
            if (grdPriceTags.FooterRow != null && ds.PriceTagList_Select.Rows != null)
                this.grdPriceTags.FooterRow.Cells[1].Text = String.Format(footer, ds.PriceTagList_Select.Rows.Count.ToString());
        }

Pavlina
Telerik team
 answered on 26 Nov 2012
6 answers
233 views
If i have a radlistbox that is ajaxified and EnableDragAndDrop is true then when i click around somewhat fast I get [SCRIPT28: Out of stack space] error in ie developer. in Google chrome I get [Uncaught RangeError: Maximum call stack size exceeded]. Sometimes it says there is a long running script. There is nothing else on the page and the page_load event is the only code-behind. After it happens once it starts happening more frequently.

  • Telerik Q3 2012  - (2012.3.1016.35)
  • C# - asp.net 3.5
  • windows 7, 8GB RAM
  • ie9 & google chrome
  • IIS Worker Process Memory is at about 100K in task manager, CPU at 0%


<telerik:RadAjaxManager ID="RadAM1" runat="server">
     <AjaxSettings>
          <telerik:AjaxSetting AjaxControlID="btn">
             <UpdatedControls>
                 <telerik:AjaxUpdatedControl ControlID="radSelected"  />
             </UpdatedControls>
         </telerik:AjaxSetting>
     </AjaxSettings>
 </telerik:RadAjaxManager>
 
 <telerik:RadListBox ID="radSelected" runat="server" Width="100%" Height="400px" SelectionMode="Single" EnableDragAndDrop="true" AutoPostBack="true">
 </telerik:RadListBox>
 <asp:Button ID="btn" runat="server" Text="refresh" />

protected void Page_Load(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        List<string> strs = new List<string>();
        for (int i = 0; i < 500; i++)
            ints.Add("This is just some text to fill the listbox to show that it will get [SCRIPT28: Out of stack space] when you click around fast for about 20 seconds or less. The listbox freezes and then i get the script error when looking in ie development tool. " + i);
        radSelected.DataSource = ints;
        radSelected.DataBind();
    }
}




Any ideas?

Mitchell
Top achievements
Rank 1
 answered on 26 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?