Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
57 views
i am working on creating a page that when is in edit mode, the RadDockLayout, RadDockZones and RadDocks will dynamically be loaded. The user will be able to add controls, drag and drop etc. However, when in live mode I of course do not want the RadDock features.  I still want to use RadDock features to load the zones from state and locate the docks from the state. However, when the page is rendered, I do not want the docking abilities in live mode.

What is the best practice to disable for live mode?
Slav
Telerik team
 answered on 24 Aug 2011
1 answer
37 views
Hi,

I am using Telerik version 2010.1.415.35. In Rad Grid filter menu, after clicking on any filter menu button nothing happens and java script error is generated on line:

"Telerik.Web.UI.GridFilterFunction.parse=function(b,a){return(typeof b=="number")?b:Sys$Enum$parse.call(this,b,!!a);"
in Telerik.Web.UI.dll as:

"Sys$Enum$parse is undefined"

Previously, I was using 2011 version. There it caused no problem.

Can anyone help me on this and let me know how can I resolve this as we have licensed version of this dll only.

Thanks.
Veli
Telerik team
 answered on 24 Aug 2011
1 answer
179 views
Hi

We are currently experiencing a problem with our grid control when a user switches their language to anything other than en-GB.

The problem is occurring when we hit the search button twice and the columns of the grid attempt to resize, using an auto resize JS function we have registered on the page. This function should resize the columns to the size of the values in the columns themselves.

I have attached the code I believe the problem exists. Can you provide a possible fix for this issue?

function AutoResizeColumns() 
	{
	    var gridMinWidth = 0;
 
	    var grid = window['grid_' + '<%= grd.ClientID %>'];
	    for (var i = 0; i < grid.MasterTableView.Columns.length; i++) {
 
	        var maxColumnSize = 0;
            
            for (var j = 0; j < grid.MasterTableView.Rows.length + 1; j++) {
                var gridRow = j < grid.MasterTableView.Rows.length ? grid.MasterTableView.Rows[j].Control : grid.MasterTableView.HeaderRow;
 
                var textContent = "";
                if (gridRow.cells[i].childNodes.length > 0 &&
                (typeof gridRow.cells[i].childNodes[0].getElementsByTagName == "function" || typeof gridRow.cells[i].childNodes[0].getElementsByTagName == "object")) {
                    var childNodes = gridRow.cells[i].childNodes[0].getElementsByTagName("span");
                    if (childNodes.length > 0) {
                        textContent = childNodes[0].innerText;
                    }
                }
 
                if (textContent != null) {
                    var rowColLength = textContent.trim().length;
                    if (rowColLength > maxColumnSize) {
                        maxColumnSize = rowColLength;
                    }
                }
            }
 
            if (maxColumnSize > 0) {
                gridMinWidth += (maxColumnSize * 7.5);
                grid.MasterTableView.ResizeColumn(i, maxColumnSize * 7.5);
            }
            else {
                gridMinWidth += 2;
                grid.MasterTableView.ResizeColumn(i, 2);
            }
	    }
 
	    document.getElementById(grid.ClientID).style.width = "100%";
	    document.getElementById(grid.MasterTableView.ClientID).style.width = "100%";
 
	    document.getElementById(grid.ClientID).style.minWidth = gridMinWidth + 100;
	    document.getElementById(grid.MasterTableView.ClientID).style.minWidth = gridMinWidth + 100;
	}
Vasil
Telerik team
 answered on 24 Aug 2011
2 answers
147 views
Dear Support,

I'm trying to follow your example here and set up a web part that utilizes all the features.  My problem is getting the ajax scripts running.  I followed the instructions from this thread, and also I tried registering the scripts from this article.  So far I'm registering the following:

string telerikAssembly = typeof(RadScheduler).Assembly.FullName;
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Splitter.RadSplitterScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.TouchScrollExtender.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Splitter.RadSlidingZoneScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Ajax.Ajax.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.Core.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.jQuery.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.jQueryPlugins.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.Popup.PopupScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Common.Navigation.NavigationScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Menu.RadMenuScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Menu.ContextMenu.RadContextMenuScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Input.TextBox.RadInputScript.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Input.DateInput.RadDateInputScript.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Input.NumericTextBox.RadNumericInputScript.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Calendar.RadTimeViewScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Calendar.RadCalendarCommonScript.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Calendar.RadCalendarScript.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Calendar.RadDatePicker.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Calendar.RadDateTimePickerScript.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.ComboBox.RadComboBoxScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.RadSchedulerScripts.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.ContextMenu.Plugin.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Week.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Week.GroupedByResource.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Week.GroupedByDate.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.MultiDay.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.MultiDay.GroupedByResource.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.MultiDay.GroupedByResource.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Day.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Day.GroupedByResource.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Month.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Month.GroupedByResource.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Month.GroupedByDate.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Timeline.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Timeline.GroupedByResource.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Views.Timeline.GroupedByDate.Model.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Scheduling.AdvancedTemplate.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.Helpers.DateTime.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.Scheduler.RecurrenceEditor.RecurrenceEditor.js", telerikAssembly));
scriptManager.Scripts.Add(new ScriptReference("Telerik.Web.UI.PanelBar.RadPanelBarScripts.js", telerikAssembly));


The callbacks only work if I put the RadScheduler control on the page and nothing else.  Once I start adding the other elements from the example, I can't use any of the built-in functionality, like collapse/expand the left pane, scroll through dates, switch scheduler views, etc.  Please help!

I'm using the build version=2011.2.712.35.

Thank you,

Dasha.
Dasha
Top achievements
Rank 1
 answered on 24 Aug 2011
5 answers
435 views

Hi,
i am D.Srinivasa,

                       in my project i have a RadGrid to Display a Data from the DataBase, in my RadGrid i have a RadDatePicker Control to display a date from backend,  here enabled the maximum date condition in Raddatepicker,

the following coding is the condition for maximum date operation in RadDatePicker, it checks whether the database can have the data or not, if data is available then it sets the maximum date to that RadDatePicker,

it returns an error is Specified Cast in Not Valid..

Code Is : 

<telerik:GridTemplateColumn UniqueName="gridActStart" HeaderText="Actual Start" AllowFiltering="false" ItemStyle-HorizontalAlign="Center"><br>
 <
ItemTemplate><br>                     
 <
telerik:RadDatePicker ID="actstart" runat="server" MaxDate='<%#If((Eval("early_start_display") IsNot DBNull.Value), Convert.ToDateTime(Eval("early_start_display")), CType("10/10/2011", System.Nullable(Of DateTime))) %>' Width="100px" Calendar-ShowOtherMonthsDays="false" Calendar-ShowRowHeaders="false" DbSelectedDate='<%# Bind("actual_start") %>' DateInput-DateFormat="MM/dd/yyyy">                     
</
telerik:RadDatePicker><br>                       
</
ItemTemplate><br>                   
 </
telerik:GridTemplateColumn>

and the following attachment is the database for my application. How to resolve this problem,

Thank You,
D.Srinivasa
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Aug 2011
11 answers
131 views
I have a VERY simple RibbonBar on an othewise blank test page that is throwing a JavaScript error: "object does not support this property or method" in the dynamically generated Telerik WebResource file. Here is the source code of the page. The only code behind is the button click handler which has no code in it. What am I calling out on the Ribbon that is not supported?? See the attached screenshot for the debugger capture.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="foo.aspx.vb" Inherits="testing_foo" %>
 
<%@ Register Src="../HR/controls/Credentials.ascx" TagName="Credentials" TagPrefix="uc1" %>
<%@ Register src="../protected/payroll/controls/AuthorizationsEdit.ascx" tagname="AuthorizationsEdit" tagprefix="uc2" %>
<%@ Register src="../controls/Authorizations.ascx" tagname="Authorizations" tagprefix="uc3" %>
<%@ Register src="../controls/CaseNotes.ascx" tagname="CaseNotes" tagprefix="uc4" %>
<%@ Register src="../controls/searchers/CustomerSearcher.ascx" tagname="CustomerSearcher" tagprefix="uc5" %>
<%@ Register src="../controls/pickers/Customer_Picker.ascx" tagname="Customer_Picker" tagprefix="uc6" %>
<!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>
 
</head>
<body>
    <form id="form1" runat="server">
   
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
   
    <telerik:RadRibbonBar ID="radMainRibbon" runat="server" SelectedTabIndex="0">
        <telerik:RibbonBarTab Text="Home">
            <telerik:RibbonBarGroup Text="General">
                <Items>
                    <telerik:RibbonBarButton ID="btnHomeHome" runat="server" Size="Large" Text="&nbsp;Home&nbsp;" Value="~/Default.aspx" ImageUrlLarge="~/images/home-m.gif" />
                </Items>
            </telerik:RibbonBarGroup>
        </telerik:RibbonBarTab>
    </telerik:RadRibbonBar>
    <asp:Button ID="Button1" runat="server" Text="Button" />
    </form>
</body>
</html>

Kate
Telerik team
 answered on 24 Aug 2011
3 answers
262 views
Hi All

I have a grid that is using static headers with columns declaring widths using the header.width property. However I have no control over the grid size by resizing my columns,  as resizing one column stretches out the other so the grid fits the whole page, like it is auto resizing to fit the page. Any Ideas on how to have control of grid widths greatly appreciated.

<telerik:RadGrid ID="gvDefleetCapIds" runat="server" AllowSorting="True" 
                  AutoGenerateColumns="False" CellSpacing="0" Font-Names="Verdana" 
                  Font-Size="X-Small" GridLines="None" 
                  ondetailtabledatabind="gvDefleetCapIds_DetailTableDataBind" 
                  oneditcommand="gvDefleetCapIds_EditCommand" 
                  onitemcommand="gvDefleetCapIds_ItemCommand" 
                    
                  onupdatecommand="gvDefleetCapIds_UpdateCommand" Width="1246px" 
                  AllowPaging="True" PageSize="30" AllowCustomPaging="True" Skin="WebBlue" 
                  onneeddatasource="gvDefleetCapIds_NeedDataSource" 
                  onitemdatabound="gvDefleetCapIds_ItemDataBound">
                  <headercontextmenu cssclass="GridContextMenu GridContextMenu_Default" >
                  </headercontextmenu>
                  <mastertableview autogeneratecolumns="False" cellspacing="0" 
                      datakeynames="CapID,Year,Plate" font-names="Verdana" font-size="X-Small">
                                              <CommandItemSettings ExportToPdfText="Export to PDF" />
                      <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                      </RowIndicatorColumn>
                      <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" 
                          Visible="True">
                      </ExpandCollapseColumn>
                      <Columns>
                        
                          <telerik:GridBoundColumn DataField="CapID" HeaderStyle-Width="25px"
                              FilterControlAltText="Filter column2 column" HeaderText="CapID" 
                              UniqueName="column2">
                          </telerik:GridBoundColumn>
                            
                          <telerik:GridBoundColumn DataField="V_Description"
                              FilterControlAltText="Filter column1 column" HeaderText="V_Description" 
                              UniqueName="column1">
                          </telerik:GridBoundColumn>
                            
                          <telerik:GridBoundColumn DataField="Plate" HeaderStyle-Width="10px"
                              FilterControlAltText="Filter column column" HeaderText="Plate" 
                              UniqueName="column">
                          </telerik:GridBoundColumn>
                            
                           <telerik:GridBoundColumn DataField="Year" 
                              FilterControlAltText="Filter column4 column" HeaderText="Year" HeaderStyle-Width="20px"
                              UniqueName="column4">
                          </telerik:GridBoundColumn>
                            
                          <telerik:GridBoundColumn DataField="Units" HeaderStyle-Width="10px"
                              FilterControlAltText="Filter column6 column" HeaderText="Units" 
                              UniqueName="column6">
                          </telerik:GridBoundColumn>
                            
                          <telerik:GridBoundColumn DataField="Price" HeaderStyle-Width="25px"
                              FilterControlAltText="Filter column3 column" HeaderText="CAP_Price" 
                              UniqueName="column3">
                          </telerik:GridBoundColumn>                         
                           
                          <telerik:GridBoundColumn Aggregate="Sum" DataField="AvgMiles" 
                              FilterControlAltText="Filter column5 column" HeaderText="AvgMiles" HeaderStyle-Width="25px"
                              UniqueName="column5">
                          </telerik:GridBoundColumn>
                            
                          <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                              ConfirmDialogType="RadWindow" ConfirmText="Delete this CAPID ?" 
                              ConfirmTitle="Confirm Delete" Text="Delete" UniqueName="DeleteColumn">
                              <ItemStyle CssClass="DeleteButton" HorizontalAlign="Center" />
                          </telerik:GridButtonColumn>
                      </Columns>
                      <EditFormSettings>
                          <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                          </EditColumn>
                      </EditFormSettings>
                  </mastertableview>
               <clientsettings>
                      <Scrolling AllowScroll="True" SaveScrollPosition="true"  ScrollHeight="625px" />
                  </clientsettings>
                  <filtermenu enableimagesprites="False">
                  </filtermenu>
              </telerik:RadGrid>
Sebastian
Telerik team
 answered on 24 Aug 2011
3 answers
120 views
I implemented an Outlook Web Access type mailbox using RadGrid eons ago and have only had to perform minor maintenance over the years. It is currently using Q1 2011 controls and has been limited to single row selections. I capture the client side rowclick event and perform a callback to the server passing the newly selected index as an argument. Server side I reset the colour of the previously selected row (grid.SelectedItems[0]) and unselect it, then darken the colour of the newly selected row (the index of which was passed as an argument in the callback), selecting it server side.

My client now wants to enable multirow select (to delete multiple emails, for example). I would of course like to do this with as few changes as possible, but during the callback, the server does not know whether the newly selected row is part of a multiple selection or a single selection, so it does not know whether the previously selected row needs to be unselected or not. Is there any argument that I can pass to the server as part of the callback which indicates whether the ctrl key was depressed at the time of the new selection (or, even better, an attribute of the grid that shows which is the current selection "mode")? If not, what's the best way of reading all selected row indexes client side so that I can pass an argument array to the server?

Many thanks.
Pavlina
Telerik team
 answered on 24 Aug 2011
1 answer
43 views
Hi,

I have tried implementing multiple comboboxes (2 comboboxes) from example
http://mono.telerik.com/Combobox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx

Its working fine. Now If I set the selected value like

FirstcomboBox.SelectedValue = somevalue

for 1st combobox (on page load) I want to fire event to load the 2nd combobox currently which is not working. Do I need to set any property for this?


Thanks,
Balaji
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 Aug 2011
1 answer
67 views
<ajaxpanel>
     <httppanel>
          <radgrid>
              <checkbox>
              </checkbox>
          </radgrid>
          <button>
          </button>
      </httppanel>
</ajaxpanel>
hi,
i have radgrid whic contains checkboxes, this rad grid is placed inside an xmlhttppanel whic is placed inside an ajax panel. A button is placed inside the ajaxpanel ,like shown above
no under the 'OnClick' (server side) event of the button am tracking the selected checkboxes, this doest works for the first button click. but it works after the first click ... any solutions..?

Pero
Telerik team
 answered on 24 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?