Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
158 views
Hi,

I need to select a combobox item programatically via javascript.

This does not work for an auto complete combo box which get its items from a web service:

ddlDriverA.trackChanges();
            var item = ddlDriverA.findItemByValue(driverName);
            item.select();
            ddlDriverA.commitChanges();

I'm working with version 2011.1.413.40
I tried several options with no luck...
Ivana
Telerik team
 answered on 21 Dec 2011
1 answer
106 views
Hi,

I have a RadPanelBar in a RadPane which is part of a Rad Splitter.  I have one vertical splitter, thus one left pane and one right pane.  The panel bar is in the left pane and should resize to maintain the width of the left pane as the left pane resizes.

In my attempt to accomplish this, I have caught the OnClientBeforeResize event on the RadPane.  I then set the width of the PanelBar accordingly.  I have used the http://www.telerik.com/help/aspnet-ajax/panelbar-resize-to-the-width-of-the-widest-radpanelitem.html for guidance.  I try to retrieve the current width of the bar then add the value from args.get_delta() on the BeforeResize event but I am not getting any joy here since panelBar.width() returns null and panelbar.width(500) (for example) simply doesn't resize the bar.

This is in IE8 and I notice that the documentation guidance linked to above specifically tests for IE6 and IE7.

Please help!

Thanks

function RadPaneMainNavigation_OnClientBeforeResize(sender, Args) {
    alert(Args.get_delta());
    var panel = $telerik.$("<%= PanelBarNavigation.ClientID %>");
    alert(panel.width());
    panel.width(500);
}

Kate
Telerik team
 answered on 21 Dec 2011
3 answers
393 views
Panel and Data below, some where I read that the root must have null values so I wrote a stored proc to convert the root ParentIDs to nulls (please see below)
But I still get the error '

These columns don't currently have unique values. '

<

 

 

telerik:RadPanelBar ID="RadPanelBar1" runat="server" Height="600px"

 

 

 

Width="200px" ExpandMode="FullExpandedItem"

 

 

 

DataFieldID="LectureID"

 

 

 

DataFieldParentID="SectionID"

 

 

 

DataSourceID="SqlDataSource1" DataTextField="Name">

 

</

 

 

telerik:RadPanelBar>

 

SectionID LectureID label LecturesID Name
NULL 1 NULL 329 1:1
NULL 2 NULL 330 1:2
NULL 3 NULL 331 1:3
NULL 4 NULL 332 1:4
NULL 5 NULL 333 1:5
NULL 6 NULL 334 1:6
NULL 7 NULL 335 1:7
NULL 8 NULL 336 1:8
NULL 9 NULL 337 1:9
NULL 10 NULL 338 1:10
NULL 11 NULL 339 1:11
NULL 12 NULL 340 1:12
2 1 NULL 341 2:1
2 2 NULL 342 2:2
2 3 NULL 343 2:3
2 4 NULL 344 2:4
2 5 NULL 345 2:5
2 6 NULL 346 2:6
2 7 NULL 347 2:7
3 1 NULL 348 3:1
3 2 NULL 349 3:2
3 3 NULL 350 3:3
3 4 NULL 351 3:4
3 5 NULL 352 3:5
4 1 NULL 353 4:1
4 2 NULL 354 4:2
4 3 NULL 355 4:3
4 4 NULL 356 4:4
4 5 NULL 357 4:5
4 6 NULL 358 4:6
4 7 NULL 359 4:7
4 8 NULL 360 4:8
4 9 NULL 361 4:9
4 10 NULL 362 4:10
4 11 NULL 363 4:11
4 12 NULL 364 4:12
5 1 NULL 365 5:1
5 2 NULL 366 5:2
5 3 NULL 367 5:3
5 4 NULL 368 5:4
5 5 NULL 369 5:5
6 1 NULL 370 6:1
6 2 NULL 371 6:2
6 3 NULL 372 6:3
6 4 NULL 373 6:4
6 5 NULL 2602 6:5
Kate
Telerik team
 answered on 21 Dec 2011
5 answers
435 views
I have been working on this for two days and cannot get passed this error message when working with the RadFileExplorer.
I have read almost every post I can find on this topic.
The issue is after setting the viewpaths and uploadpaths, the RadFileExplorer displays the data just find. But when I click on the refresh button, I get the error "Invalid Characters in Folder Name". I also get this error If I try to programmatically set the path after a click event somewhere else on the page. 

Do I need to set the initial path attribute? Any value I set seems to result in the same error. Please help me find a fix for this. I am using version 2010.2.836.35, but also tried version 2010.3.1109.35

My code is very similar to the example posted at this link:

http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/physical-paths-and-different-content-types.aspx

Any help is appreciated.

I have also tried the fix recommend here: http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/change-initialpath-not-working.aspx

...but to no avail.....
Marin Bratanov
Telerik team
 answered on 21 Dec 2011
7 answers
195 views

Hi, i have problem with RadUpload control version 2011.1.519.35. In SharePoint 2010 progress bar don't increase when i using yours sample code in my WebPart. I have registered the RadUploadProgressHandler etc.

My code:

<telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
 
<telerik:RadUpload ID="RadUpload1" runat="server" MaxFileSize="100000000" >
</telerik:RadUpload>
 
<telerik:RadProgressArea ID="RadProgressArea1" runat="server" DisplayCancelButton="True" >
</telerik:RadProgressArea>
 
<asp:Button ID="Button1" runat="server" Text="Upload" onclick="Button1_Click">
</asp:Button>

and

protected void Page_Load(object sender, EventArgs e)
{
 if (!IsPostBack)
 {
  RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount;
 }
 RadProgressArea1.Localization.UploadedFiles = "Completed Steps: ";
 RadProgressArea1.Localization.CurrentFileName = "Step: ";
 RadProgressArea1.Localization.TotalFiles = "Total Steps:";
}
   
protected void Button1_Click(object sender, EventArgs e)
{
 UpdateProgressContext();
}
 
private void UpdateProgressContext()
{
 const int total = 100;
 
 RadProgressContext progress = RadProgressContext.Current;
 progress.Speed = "N/A";
 
 for (int i = 0; i < total; i++)
 {
  progress.PrimaryTotal = 1;
  progress.PrimaryValue = 1;
  progress.PrimaryPercent = 100;
 
  progress.SecondaryTotal = total;
  progress.SecondaryValue = i;
  progress.SecondaryPercent = i;
 
  progress.CurrentOperationText = "Step " + i.ToString();
 
  if (!Response.IsClientConnected)
  {
   //Cancel button was clicked or the browser was closed, so stop processing
   break;
  }
 
  progress.TimeEstimated = (total - i) * 100;
  //Stall the current thread for 0.1 seconds
  System.Threading.Thread.Sleep(100);
 }
}
Kalina
Telerik team
 answered on 21 Dec 2011
3 answers
150 views
i wants to create radmenu with different css. i have one example of menu , i wants exactly same css for radmenu.
i checked option on telerik site as create own css , but not able to achieve what i want.

Please find attached file and if is it possible can you plz send me the css.
i want to use less images for css , wants to use color rather than image.


Kate
Telerik team
 answered on 21 Dec 2011
1 answer
281 views
I getting a error when I have a updatePanel inside RadGrid Control

Error description:
Cannot unregister UpdatePanel with ID 'udpItemOption' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
Parameter name: updatePanel

Code behind
 protected void grdWishList_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
                   switch (e.CommandName)
                    {
                        case "Remove":
                            int.TryParse(e.CommandArgument.ToString(), out _selectedIndex);
                            WishListPresenter presenter = (WishListPresenter)this.GetPresenter();
                            presenter.RemoveWishListItem();
                            pnlWishList.DataBind();
                            break;
                    }
        }

Page HTML Code:

    <div class="scWishListWrapper">
        <asp:Panel ID="pnlWishList" runat="server">
                    <div id="table-container" visible="<%# _hasWishListItems %>">
                        <telerik:RadGrid ID="grdWishList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            OnPageIndexChanged="grdWishList_PageIndexChanged" 
                            AllowSorting="true" SkinID="RadGrid" OnItemCommand="grdWishList_ItemCommand"
                            OnItemDataBound="grdWishList_ItemDataBound" OnPageSizeChanged="grdWishList_PageSizeChanged">
                            <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Bottom">
                                <Columns>
                                    <telerik:GridTemplateColumn SortExpression="RefProductNumber" ItemStyle-CssClass="GridItemOptionColum">
                                        <ItemTemplate>
                                            <uc3:wucItemOption runat="server" ID="wucItemOption1" ItemNumber='<%# Eval("ItemNumber") %>'
                                                RefProductNumber='<%# Eval("RefProductNumber")%>' AddToCartCommandName="AddToCart" />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                </Columns>
                                <CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="false" ShowExportToWordButton="true"
                                    ShowExportToExcelButton="true" ShowExportToCsvButton="true" ShowExportToPdfButton="true" />
                            </MasterTableView>
                            <SortingSettings EnableSkinSortStyles="false" />
                            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                            <ExportSettings ExportOnlyData="False" FileName="ExportedRadGrid" OpenInNewWindow="True"
                                IgnorePaging="True" />
                        </telerik:RadGrid>
                    </div>
                
        </asp:Panel>
    </div>

HTML wucItemOption:

<div class="scItemOption">
    <asp:UpdatePanel ID="udpItemOption" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Button SkinID="addtoCartButton" ID="lnkAddToCart" runat="server" Text="Add To Cart"/>
        </ContentTemplate>
    </asp:UpdatePanel>
</div>
Maria Ilieva
Telerik team
 answered on 21 Dec 2011
2 answers
93 views
Hi all,

I have a grid where I want to switch columns and rows, so the column header should be displayed lefthand:

Normal grid:
Firstname - Lastname - Country
Joe       - Black    - USA
Tom       - Cruise   - USA
Tom       - Hanks    - USA

I want:
Firstname:  Joe   - Tom    - Tom
LastName:   Black - Cruise - Hanks
Country:    USA   - USA    - USA


I've found some old postings from 2007 and 2009 recommending this demo http://demos.telerik.com/aspnet-ajax/grid/examples/programming/pivot/defaultvb.aspx but the postings are already 2 years old and I wonder whether this is now possible easier? I also need to have the filters but it seems with current demo it just creates one large table, removing all the advantages (filtering, sorting, etc.) which are offered by RadGrid normally.

Many thanks!
Kai
Top achievements
Rank 2
 answered on 21 Dec 2011
2 answers
62 views

On my form all controls are in a asp panel. This panel is added to the RadAjaxManager in the UpdatedControls.  This panel contains a lot of textboxes that are validated with the jQuery validate plugin (bassistance.de). There is also a texbox that should be update form the server with a postback (the value comes from a webservice call). When the postback is done the whole main panel gets updated and my jQuery validation messages are gone. Is it possible just to update the one textbox and let the rest of the form as it is? The code sample is a test i can't get working like this.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AjaxPanelTester.aspx.cs"
    Inherits="BuckarooTester.AjaxPanelTester" ClientIDMode="Static" %>

<!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>
    <link rel="stylesheet" type="text/css" media="screen" href="jquery.validate.password.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="Scripts/jquery.validate.js" type="text/javascript"></script>
    <script src="Scripts/jquery.validate.password.js" type="text/javascript"></script>
    <script src="Scripts/jquery.metadata.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>

        <script id="validation" type="text/javascript">

            $(document).ready(function () {
                // validate signup form on keyup and submit
                var validator = $("#form1").validate({

                    rules: {
                        tbCompanyName: {
                            required: true,
                            minlength: 2
                        }
                    },

                    messages: {
                        tbCompanyName: {
                            required: "Bedrijsnaam verplicht",
                            minlength: jQuery.format("Minimaal {0} karakters voor bedrijfsnaam")
                        }
                    },

                    success: function (label) {
                        label.html("&nbsp;").addClass("checked");
                    }

                });

            });
        </script>

        <telerik:RadScriptManager ID="ScriptManagerMaster" runat="server" EnableScriptGlobalization="True">
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="pOrder">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="pMain">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pMain" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pSub" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"
            AnimationDuration="500">
        </telerik:RadAjaxLoadingPanel>

        <asp:Panel ID="pMain" runat="server" Height="100%">
            <table style="width: 500px; height: 100px; background-color: #FFFFCC;">
                <tr>
                    <td align="left" style="width: 50px;">
                        <asp:Label ID="Label1" runat="server" Text="Bedrijfsnaam:"></asp:Label>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td align="left">
                        <asp:TextBox ID="tbCompanyName" runat="server" MaxLength="50">
                        </asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="left" colspan="3">
                        <asp:Panel ID="pSub" runat="server">
                            <asp:Button ID="btnUpdate" runat="server" Text="Update Button" OnClick="btnUpdate_Click" />
                            &nbsp;
                            <asp:TextBox ID="tbSubUpdate" runat="server" Text="Update me"></asp:TextBox>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    </form>
</body>
</html>

Emiel
Top achievements
Rank 1
 answered on 21 Dec 2011
3 answers
116 views
Hi

I have one problem

In my grid I set pagesize =10

I added 11 records

It was showing in 2 pages.

When I removed 11th record from second page, It is not pointing to  first oage whihc has values.

It is showing 2nd page and saying that , there are no records to display.
Could you please help me to resolve this issue.

I really appreciate , if some one helps me regarding this.

Thanks
Usha
Mira
Telerik team
 answered on 21 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?