Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
102 views
I'd like to override the subject textbox and have a listbox there instead. Do I need to use advancedinserttemplate for this? This is the only input field I want to customize. Do I have to explicitly define every field on the insert form if I do it that way. Are there any decent examples of this?

Thanks,
Dan
Plamen
Telerik team
 answered on 24 Aug 2011
1 answer
81 views
I have stumbled upon a very odd bug.  The following are the pertinent details:

  1. You have an aspx web page and on the initial load, you have a hidden display: none div.  
  2. An action is taken by the user, and the div is shown using javascript.
  3. The div that is now shown contains a numeric text box, a rad dropdown, and various other controls.
  4. The contents of this div are all enclosed in an Update Panel.
  5. The dropdown in this div causes an async postback

The scene goes like this:  User loads page, clicks something to show the hidden div, selects a value from the dropdown, the page posts back and populates another dropdown, the user enters a value in the numeric text box, the user clicks submit.  At this point, the page again posts back asynchronously and when the value of the numeric text box is checked, it is Nothing.

If the user enters a value in the numeric text box BEFORE they select a value from the dropdown that causes a postback, the value on submit is accurate.  If the user selects a value from the dropdown that causes a postback, then enters a value in the numeric text box, tabs to the next control, then re-enters a different value in the numeric text box, the value on submit is accurate.  It is only when you select a value from the dropdown which causes an async postback, enter a value in the numeric text box and submit (tabbing out after or not doesn't make a difference) that the value of numerictextbox.value = Nothing


Any help in troubleshooting this issue would be appreciated.  I was using a prior version of the telerik controls, but updated to 2011.2.712.40 and retested, the issue persisted.  

Karl
Vasil
Telerik team
 answered on 24 Aug 2011
3 answers
120 views
Hello

 

I have followed this guide 'Hiding expand/collapse images when no records' on the telerik site and got it working great, but when i change
HierarchyDefaultExpanded="False" then the images dont show when I now there are child rows in the 2nd table.  If i change it to "True" it loads them expanded with the image showing...Does anyone know how i can have it collapsed when first entering the pages but with the images showing when there are child rows?

Many thanks

Iana Tsolova
Telerik team
 answered on 24 Aug 2011
1 answer
159 views
hi,
I need to assign a font color and underline for legend's Text in pie chart

thanks,
Mohamed Taraman
Evgenia
Telerik team
 answered on 24 Aug 2011
1 answer
134 views
I'm migrating several radmenu functions into a radribbonbar.  I have a scenario where I use a radconfirm to intercept a menuclick.  It appears that the ribbonbar doesn't support the .click() method for the buttons.  I could use a javascript confirm, then a .set_cancel() method but I want to use the radconfim if possible.

sample scripts:

var btnclickCalledAfterRadconfirm = false;
var RRB_lastClickedItem = null;
 
function btn_confirmCallbackFunction(args) {
                alert('debug 1');
                if (args) {
                    btnclickCalledAfterRadconfirm = true;
                    alert('debug 2');
                    // this works if this was a radmenuitem object
                     RRB_lastClickedItem.click(); --
                    alert('debug 3');
                }
                else
                    btnclickCalledAfterRadconfirm = false;
 
                RRB_lastClickedItem = null;
            }
 
            function RRB_Btn_OnClientItemClickingHandler(sender, eventArgs) {
 
                if (!btnclickCalledAfterRadconfirm) {
                    RRB_lastClickedItem = eventArgs.get_button();
                    var myText = RRB_lastClickedItem.get_text();
                    //alert('debug: ' + myText);
                    if (myText == 'Clear All') {
                        eventArgs.set_cancel(true);
                        radconfirm("Clear all Alarms?", btn_confirmCallbackFunction);
                    }
                    if (myText == 'Delete All') {
                        eventArgs.set_cancel(true);
                        radconfirm("Delete all Alarms?", btn_confirmCallbackFunction);
                    }
                    if (myText == 'Acknowledge All') {
                        eventArgs.set_cancel(true);
                        radconfirm("Acknowledge all Alarms?", btn_confirmCallbackFunction);
                    }
                    if (myText == 'Clear') {
                        eventArgs.set_cancel(true);
                        radconfirm("Clear selected Alarms?", btn_confirmCallbackFunction);
                    }
                    if (myText == 'Delete') {
                        eventArgs.set_cancel(true);
                        radconfirm("Delete selected Alarms?", btn_confirmCallbackFunction);
                    }
 
                    if (myText == 'Refresh') {
                        //alert('refresh');
                        eventArgs.set_cancel(true);
                        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequestWithTarget('<%= lbHiddenRefresh.UniqueID %>', '');
                    }
                }
                btnclickCalledAfterRadconfirm = false;
 
            }

Simon
Telerik team
 answered on 24 Aug 2011
2 answers
152 views
Hello, i'm having a problem to format the with the size of the header columns of my RadGrid...At this moment I don't know why the header has a bigger size then on default appearence.How can i manipulate the column header size and column texts?

Here my code:
<asp:Content ID="content" ContentPlaceHolderID="DefaultContent" runat="Server">
    <h1 style="text-align: center;">
        Assign Invoices</h1>
    <br />
    <asp:Panel runat="server" ID="ViewChooserWrapper">
        <telerik:RadTabStrip runat="server" ID="ViewChooser" AutoPostBack="True" SelectedIndex="0"
            MultiPageID="RadMultiPage1" Skin="Black">
            <Tabs>
                <telerik:RadTab Text="Daily Resume" Selected="True" />
                <telerik:RadTab Text="Assign Invoices" />
            </Tabs>
        </telerik:RadTabStrip>
        <div class="content">
            <asp:Panel runat="server" ID="Panel1">
            </asp:Panel>
        </div>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" BorderColor="Black" BorderStyle="Solid"
            BorderWidth="1px" SelectedIndex="0" ClientIDMode="Static" RenderSelectedPageOnly="True">
            <telerik:RadPageView ID="pvDailyResume" runat="server">
                <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Black" CellSpacing="0" GridLines="None"
                    AllowMultiRowSelection="True">
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="True" ScrollHeight="400px" UseStaticHeaders="True" />
                    </ClientSettings>
                    <MasterTableView>
                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            <HeaderStyle Width="20px"></HeaderStyle>
                        </ExpandCollapseColumn>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Windows7">
                    </HeaderContextMenu>
                </telerik:RadGrid>
            </telerik:RadPageView>
            <telerik:RadPageView ID="pvAssignInvoices" runat="server">
                <table>
                    <tr>
                        <td>
                            <telerik:RadListBox ID="RadListBox1" runat="server" AllowReorder="True" Skin="Black"
                                Sort="Ascending" Height="400px" Width="220px" EnableDragAndDrop="True">
                                <ButtonSettings TransferButtons="All"></ButtonSettings>
                                <HeaderTemplate>
                                    <h5 style="color: White; text-align: center">
                                        USERS</h5>
                                </HeaderTemplate>
                            </telerik:RadListBox>
                        </td>
                        <td>
                            <telerik:RadListBox ID="RadListBox2" runat="server" EnableDragAndDrop="True" Height="400px"
                                AllowReorder="True" Width="140px" Skin="Black">
                                <ButtonSettings TransferButtons="All"></ButtonSettings>
                                <HeaderTemplate>
                                    <h5 style="color: White; text-align: center">
                                        STAGING</h5>
                                </HeaderTemplate>
                            </telerik:RadListBox>
                        </td>
                        <td>
                            <telerik:RadListBox ID="RadListBox3" runat="server" SelectionMode="Multiple" EnableDragAndDrop="True"
                                Height="400px" Width="140px" AllowReorder="True" Skin="Black">
                                <ButtonSettings TransferButtons="All"></ButtonSettings>
                                <HeaderTemplate>
                                    <h5 style="color: White; text-align: center">
                                        GROUP</h5>
                                </HeaderTemplate>
                            </telerik:RadListBox>
                        </td>
                        <td>
                            <telerik:RadButton ID="RadButton1" runat="server" Text="Assign" Skin="Black" Width="100px"
                                Height="40px" OnClick="RadButton1_Click">
                            </telerik:RadButton>
                            <br />
                            <br />
                            <telerik:RadButton ID="RadButton2" runat="server" Text="Unassign" Skin="Black" Width="100px"
                                Height="40px" OnClick="RadButton4_Click">
                            </telerik:RadButton>
                            <br />
                            <br />
                            <telerik:RadButton ID="RadButton3" runat="server" Text="Unassign All" Skin="Black"
                                Width="100px" Height="40px" OnClick="RadButton3_Click">
                            </telerik:RadButton>
                        </td>
                        <td style="width: 10px">
                        </td>
                        <td>
                            <telerik:RadGrid ID="RadGrid2"  runat="server" Skin="Black" CellSpacing="0" GridLines="None"
                                Width="460px" Height="400px" AllowSorting="True" AllowMultiRowSelection="true"
                                OnNeedDataSource="RadGrid2_NeedDataSource">
                                <ClientSettings>
                                    <Selecting AllowRowSelect="True" />
                                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                </ClientSettings>
                                <MasterTableView DataKeyNames="UserName,Group,Staging">
                                    <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                        <HeaderStyle Width="20px"></HeaderStyle>
                                    </ExpandCollapseColumn>
                                    <EditFormSettings>
                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                        </EditColumn>
                                    </EditFormSettings>
                                </MasterTableView>
                                <FilterMenu EnableImageSprites="False">
                                </FilterMenu>
                                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Windows7">
                                </HeaderContextMenu>
                            </telerik:RadGrid>
                        </td>
                    </tr>
                </table>
Ricardo
Top achievements
Rank 1
 answered on 24 Aug 2011
1 answer
81 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
51 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
219 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
186 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?