Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
122 views
Dear Telerik team

Kindly review the sample code below for an idea of what I need to acheive...

I am getting following error on compilation...The similar script is working fine with page not using Panelbar...

Error
The name 'txtRegister' does not exist in the current context

<script language="javascript" type="text/javascript">
    function btnTemplate_onclick() {
            checkscript();
        
  
 function checkscript(){
  
            var editor = $find("<%=txtRegister.ClientID  %>"); //get a reference to RadEditor client object
  
            mytext = editor.get_html(true);
//Some more steps
}
</script>
  
<telerik:RadPanelBar ID="RadPanelBar1" Runat="server" Width="750px" 
    AllowCollapseAllItems="True" Skin="Office2007">
    <Items
  
<telerik:RadPanelItem runat="server" Text="Deleted Templates" 
            Value="DeletedTemplates">
              <Items>
                <telerik:RadPanelItem runat="server" Value="Test">
                 
                    <ItemTemplate>
  
<telerik:RadEditor ID="txtRegister" Runat="server" EditModes="Html" 
                                        Height="100px" ReadOnly="false" Skin="Sitefinity" ToolbarMode="ShowOnFocus" 
                                        Width="100%" Visible="False">
                                    </telerik:RadEditor>
  
<input id="btnTemplate" type="button" value="Do Something" onclick="return btnTemplate_onclick()" />
  </ItemTemplate>
                 
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelItem>
    </Items>
</telerik:RadPanelBar>
Shinu
Top achievements
Rank 2
 answered on 26 Aug 2010
1 answer
191 views
I have a "bug report" where they are complaining that when you enter invalid/non-parsable data (such as "oapsd") via the keyboard into a RadDatePicker or a RadTimePicker, the invalid input does not persist on postback.  They wanted the invalid input to be preserved for the user to correct upon explicit prodding, rather than clearing it for them and asking them to do it over again.

Is this something we can do easily?
Dimo
Telerik team
 answered on 26 Aug 2010
1 answer
126 views
Hi,

I am used RadGrid with filter option.

1. i have to put validation on filter box like accept only char, only numeric etc.
2. if my column is GridNumericColumn then number should be display 4321 instead of 4.321 in filter box.

Plz give the suggestion ASAP.

Regards,
Parthesh
Princy
Top achievements
Rank 2
 answered on 26 Aug 2010
1 answer
421 views
The web application runs fine on my local DEV machine.  When published to the web server, all pages that have RadControls generate a Java Script Error. "'Sys' undefined" when the page loads.

Checking the forums, there are lots of references to configuring the application to run AJAX. 

I have tried adding a <location> section to add user authorization - no change.

When I run the "configure application" wizard from the Telerik menu in VS2010, it changes my web.config file and adds additional information in the <modules> tag: <modules runAllManagedModulesForAllRequests="true">  
With that added, I get an internal server error on the web server when I try to load the page,   

Any ideas?

Erjan Gavalji
Telerik team
 answered on 26 Aug 2010
3 answers
127 views
Hi,

If I run the jscript function [Disable] on a button click, it works perfect, but, when this function is called by the window.onload, I get a error. The error ocorre because $find doesn't return a valid object, instead, it return a null. Why this happen? There is a way to work around it?

window.onload = function() 
{
   Disable();
}
  
function Disable()
{
  var txt = $find("RadTextBox1");
  txt.disable();
}
Dimo
Telerik team
 answered on 26 Aug 2010
1 answer
148 views
Hi,
I have a hierarchical grid that I am binding to a dataset.  One table is summary data and the second table is the detail data.  I have definied a relation using a field called ExpenditureType.  I am building all of my columns dynamically.  All works well, but my details table displays twice when I expand.  The code is pretty simple, so I can't figure out what is causing it.  I have attached a screenshot as well.  Do you see what I am doing wrong? 

Thanks!  Tami
private void BindGrid()
       
           RadGrid1.DataSource = _dsBudgetVerification.Tables["BVSummary"];
           RadGrid1.Width = Unit.Percentage(98);
           RadGrid1.AutoGenerateColumns = false;
           RadGrid1.GridLines = GridLines.Both;  //TODO:  This doesn't seem to work
           RadGrid1.CssClass="gridborder";
           RadGrid1.MasterTableView.DataKeyNames = new string[] { "ExpenditureType" };
           RadGrid1.MasterTableView.Name = "tvSummary";
           RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.ServerBind;
           //RadGrid1.MasterTableView.HierarchyLoadMode = GridChildLoadMode.Client;
           //RadGrid1.ClientSettings.AllowExpandCollapse = true;
            
           //Add Summary table
           RadGrid1.MasterTableView.Width = Unit.Percentage(100);
           GridBoundColumn boundColumn;
           GridDropDownColumn ddlColumn;
           foreach (DataColumn dataColumn in _dsBudgetVerification.Tables["BVSummary"].Columns)
           {
               //these apply to every column in Summary
               boundColumn = new GridBoundColumn();
               RadGrid1.MasterTableView.Columns.Add(boundColumn);
               boundColumn.HeaderText = dataColumn.Caption;
               boundColumn.HeaderStyle.CssClass = "gridheader";
               //we know the column names of the text fields, so let's set their formatting
               switch (dataColumn.Caption)
               {
                   case "EscalatorID":
                   case "EscalatorName":
                       
                           //TODO:  figure out how to add combobox here
                           boundColumn.DataField = dataColumn.Caption;
                           break;
                       }
                   case "ExpenditureType":
                   case "ExpenditureTypeExists":
                       {
                           boundColumn.DataField = dataColumn.Caption;
                           if (dataColumn.Caption == "ExpenditureTypeExists") boundColumn.Visible = false;
                           break;
                       }
                     
                   default:
                       //anything else will be an amount
                       {
                           boundColumn.DataField = dataColumn.Caption;
                           boundColumn.HeaderStyle.Width = 50;
   
                           //also build our list of months for use in the Total column
                           lstMonths += '"' + dataColumn.ColumnName + '"' + ',';
                           break;
                       }
               }
           }
          
           //now trim the last comma off the list
           lstMonths = lstMonths.Substring(1, lstMonths.Length - 3);
           //now add a calculated Total column at the end of the summary
           CreateCalcColumn(RadGrid1.MasterTableView, lstMonths);
                                    
           //Add Details table
           GridTableView tableViewDetails = new GridTableView(RadGrid1);
           RadGrid1.MasterTableView.DetailTables.Add(tableViewDetails);
           tableViewDetails.Width = Unit.Percentage(100);
           tableViewDetails.DataSource = _dsBudgetVerification.Tables["BVDetails"];
           tableViewDetails.DataMember = "BVDetails";
           tableViewDetails.DataKeyNames = new string[] { "ExpenditureType" };
           tableViewDetails.Name = "tvDetails";
           GridRelationFields relationFields = new GridRelationFields();
           relationFields.MasterKeyField = "ExpenditureType";
           relationFields.DetailKeyField = "ExpenditureType";
           tableViewDetails.ParentTableRelation.Add(relationFields);
           RadGrid1.MasterTableView.DetailTables.Add(tableViewDetails);
           foreach (DataColumn dataColumn in _dsBudgetVerification.Tables["BVDetails"].Columns)
           {
               switch (dataColumn.Caption)
               {
                   case "EscalatorID":
                   case "EscalatorName":
                       
                           //ddlColumn = new GridDropDownColumn();
                           //tableViewDetails.Columns.Add(ddlColumn);
                           //ddlColumn.UniqueName = "Escalator";
                           //ddlColumn.ListTextField = "Escalator";
                           //ddlColumn.ListValueField = "EscalatorID";
                           //ddlColumn.ListDataMember = "Escalator";
                           //ddlColumn.DataSourceID = "dsrcEscalators";
                           //ddlColumn.DataField = dataColumn.Caption;
                           //ddlColumn.HeaderText = dataColumn.Caption;
                           //ddlColumn.HeaderStyle.CssClass = "gridheader";
                           //ddlColumn.EditItemTemplate = new ddlTemplate();
                           break;
             
                       }
                   default:
                       {
                           boundColumn = new GridBoundColumn();
                           tableViewDetails.Columns.Add(boundColumn);
                           boundColumn.DataField = dataColumn.Caption;
                           boundColumn.HeaderText = dataColumn.Caption;
                           boundColumn.HeaderStyle.CssClass = "gridheader";
                           break;
                       }
               }
           }
           //now add a calculated Total column at the end of the details
           CreateCalcColumn(tableViewDetails, lstMonths);
       }
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadGrid1">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
   </telerik:RadAjaxLoadingPanel>
   <telerik:RadGrid ID="RadGrid1" runat="server" OnItemDataBound="RadGrid1_ItemDataBound" />

Pavlina
Telerik team
 answered on 26 Aug 2010
5 answers
313 views
HI,

I need to enable jquery to run in the radeditor in design mode, so i can enable drag and drop of entire panels not only Html elements.
I already set the allowscript property to true, but still with no success neither in design mode or preview mode.

Any help Please.
Thanks.
Dobromir
Telerik team
 answered on 26 Aug 2010
3 answers
152 views
Hi,

I have implemented grouping feature for my rad grid. I set by default ExpandGroup as false so the all grouped cols are collapsed after grid loaded.
After that i did expanded some group columns and fortunately a button is clicked in then page and postback occurs. after post back again those grouped columns are collapsed. but i need those expanded items to be maintained.

Please give the solution to solve this issue. hope my explanation reaches the problem i am facing,

thanks
Maria Ilieva
Telerik team
 answered on 26 Aug 2010
2 answers
102 views
Hi,

I am using RadTimePicker.
i want to set specific time value when my page is load [Code Behind].

Plz suggest me ASAP.

Regards,
Parthesh
Gourangi
Top achievements
Rank 1
 answered on 26 Aug 2010
3 answers
77 views
The problem is that when I am using the down arrows to scroll through results, when the virtual scroll kicks in a loads more items, the focus gets changed to the input box and hence my scrolling starts again from the top element.

To reproduce:

Go to this page:
1. http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx
2.  click in the box for the web service example.
3.  click the down arrow on your keyboard 11 times.
4.  Notice that the selected item is the 1st item in the list when it should be the 11th.
Simon
Telerik team
 answered on 26 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?