Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
45 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
90 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
226 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
7 answers
908 views
Hi,

I have a CardView radgrid that shows accounts.

        <telerik:RadGrid ID="RadGridAccounts" DataSourceID="SqlDataSourceAccounts" runat="server" 
            OnItemDataBound="RadGridAccounts_OnItemDataBound" AllowPaging="True" PageSize="10" ShowHeader="false">  
           <PagerStyle Mode="NextPrevAndNumeric" /> 
           <MasterTableView><ItemTemplate>  
 
        <h4>Account # <%# DataBinder.Eval(Container.DataItem, "AccountNumber") %> </h4>     
 
        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>   
        <br /> 
          
        <asp:PlaceHolder ID="PlaceHolder2" runat="server"></asp:PlaceHolder> 
        <br /> 
 
        <asp:PlaceHolder ID="PlaceHolder3" runat="server"></asp:PlaceHolder> 
                  
    </ItemTemplate> 
</MasterTableView> 
   </telerik:RadGrid> 
 

 

For each account I show different account details in three radgrids that I create dynamically.

                RadGrid1 = new RadGrid();     
                RadGrid1.Skin = "Office2007";     
                RadGrid1.Width = Unit.Percentage(100);     
                RadGrid1.AutoGenerateColumns = false;     
    
                boundColumn = new GridBoundColumn();     
                boundColumn.DataField = "Asset";     
                boundColumn.HeaderText = "Asset";     
                RadGrid1.MasterTableView.Columns.Add(boundColumn);     
    
                boundColumn = new GridBoundColumn();     
                boundColumn.DataField = "Value";     
                boundColumn.HeaderText = "Value";     
                boundColumn.DataFormatString = "{0:C}";     
                RadGrid1.MasterTableView.Columns.Add(boundColumn);     
    
                RadGrid1.DataSource = dt;     
                RadGrid1.DataBind();     
    
                PlaceHolder1.Controls.Add(RadGrid1);     
 

What I need to do is dynamically add a checkbox to each row in the radgrid. When I try this:

                GridCheckBoxColumn checkboxColumn = new GridCheckBoxColumn();  
                checkboxColumn.DataField = "Problem";  
                checkboxColumn.HeaderText = "Problem?";  
                RadGrid1.MasterTableView.Columns.Add(checkboxColumn);  
 

then the checkboxes are disabled. I guess I need to put the grid in edit mode? How would I do that? I don't want the users to edit any columns besides checking the checkboxes.

Another question is - after a user checks some checkboxes and clicks on "Save", how do I refer to the checkboxes inside the grids inside the accounts grid to save the changes to the database?

Thanks,
Julia

Pavlina
Telerik team
 answered on 26 Nov 2012
0 answers
31 views
Hi,
I am using radtreeview, i need to use ajax for binding the values based on the radtreeviewcontext menu. How i Can restrict ajax for the specific <telerik:RadTreeViewContextMenu> (for the Exporting pdf). 







Thanks

Dhamodharan
Top achievements
Rank 1
 asked on 26 Nov 2012
1 answer
80 views
I'm using RadPanelBar on a master page as a main navigation control. On some content pages I make calls to Response.Redirect() method and I want the PanelBar SelectedItem to be changed accordingly. How can I achieve this? I have to mention that I use PersistStateInCookie="true" for state persistence.
Any help?
Boyan Dimitrov
Telerik team
 answered on 26 Nov 2012
1 answer
59 views
Hello,
I an new to telerik controls and coding.
I have a task where I need to use a Radalert, that uses javacript funtion to open a new page,  from a resource file. Is it possible?? Can i use a Radlaert from a resource file? If yes please guide how can i do this?  Appreciate your answers.

Thanks
Rumen
Telerik team
 answered on 26 Nov 2012
1 answer
413 views
Hello everybody,

We have a project that uses several RadGrids in many ASP sites. We created the RadGrid in an seperate UserControl and this works very well. Now I have an issue from a customer that concerns the filtering.

Init / Problem:
We enable the filtering by default in our colums and that's works good too. So the user can enter a value, then hit the TAB or ENTER key and the RadGrid filters with it's values. Now in some cases the user would like to enter all of the filter values first and start the filtering by pressing the ENTER key.

I've searched a lot in your forums and found that some users had a similar problem. What I tested now is to add the folowing code (in the ItemDataBound event from the RadGrid) to prevent the execution of the filter by pressing the TAB key in the filter textbox or loosing it's focus.

filterBox.Attributes.Add("OnChange", "javascript:return false;")

Now this works also very well and the filtering start by pressing the ENTER button, but I figured out that this not solve my problem. Because when I enter a filter value in 2 or more colums only the last entered value will be filtered and sometimes the filter is cleared and the RadGrid is not filtered.

You can see this behavior in this demo project provided from "Tsventina" (Link: Filtering on ENTER key). Please notice that we use the last release of the Telerik Controls but the behavior is the same.

You can see the problem by testing as follows:
1. Enter value in column "ContactName" and press ENTER -> Result: RadGrid is filtered OK
2. Enter value in column "ContactName" and press TAB and then ENTER -> Result: Value in column is cleared, RadGrid is not filtered
3. Enter value in column "ContactName" go to for e.g. column "Address" and enter a second filter value and press ENTER -> Result: Value in column "ContactName" is cleared, value in column "Address" is filtered.
4. Enter value in column "ContactName" go to for e.g. column "Address" and enter a second filter value and press TAB (you're possibly in column "City") and then press ENTER -> Result: All filter values are gone, RadGrid is not filtered

I hope you're understand what I'd like to say and it would be very nice if someone of you have a workarround for me.

Thanks in advance.

Best greetings from Switzerland
Reto

PS: Maybe...sorry for my bad english :)
Kostadin
Telerik team
 answered on 26 Nov 2012
1 answer
74 views
The editable image height and width are getting '0' in firefox and other browsers.

var imgWidth = editor.getEditableImage().get_width();
 var imgHeight = editor.getEditableImage().get_height();     

image original height and width are getting only in internet explorer.how can i get original width and height using all browsers.

aspx:

 <telerik:RadImageEditor ID="rieControl" runat="server" OnImageLoading="rieControl_ImageLoading"
                        OnClientLoad="OnClientLoad" OnClientToolsDialogClosed="dialogclose" ExternalDialogsPath="ImageEditorDialogs"
                        ImageUrl="" OnClientCommandExecuted="OnClientCommandExecuted" ImageManager-EnableContentProvider="true"
                        Width="1030px" Height="700px" ToolsFile="~/XmlFiles/PbUserContentImageEditor_ToolBasic.xml">
                    </telerik:RadImageEditor> var editor = $find("<%= rieControl.ClientID %>");
script:
 function OnClientLoad(sender, args) {
            if (sender._imageKey != undefined) {
  var imgWidth = editor.getEditableImage().get_width();
                var imgHeight = editor.getEditableImage().get_height();                       
                if (!isNaN(Number(imgWidth)) && Number(imgWidth) != 0 && !isNaN(Number(imgHeight)) && Number(imgHeight) != 0) {
                    if (imgWidth > 1000 || imgHeight  > 700) {
                        var widthPercentage = (1000 * 100) / Number(imgWidth);
                        var heightPercentage = (700 * 100) / Number(imgHeight);
                        widthPercentage = Math.floor(widthPercentage);
                        heightPercentage = Math.floor(heightPercentage);
                        if (heightPercentage > widthPercentage) {
                            sender._zoomImage(widthPercentage);
                            objhdnReset.value = widthPercentage;
                        }
                        else {
                            sender._zoomImage(heightPercentage);
                       }
                    }
                }
            }
Vessy
Telerik team
 answered on 26 Nov 2012
6 answers
159 views
Hi Telerik Team,

I am facing two problems using RadGrid Grouping.
1. The RadGrid is not rendering properly when it is loaded for the first time. (Please find the screenshot.)
2. If I Drag and Drop any column to GroupPanel then it is showing below error.
     Error Message : "Expression cannot be null or empty"


I can see both the above issues only when the RadGrid is loaded for the first time.
If I do any action like ungroup the initail grouped column/ Changed the paging/ Refresh/ Sort then it is rendering properly and then onwards it is working fine as expected.

Could you please suggest me a solution for this.?
Many Thanks,
Vamsikamal
Vamsi Kamal
Top achievements
Rank 1
 answered on 26 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?