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

I am trying to add a dropdown column in the edit form of a RadGrid that is bound to an ObjectDatasource and populated by a WCF Service and using the Entity Framework for Data Access.

Sample: Item has a Item Type Foreign Key.

I can display the text of the foreign key in the RadGrid by using the GridTemplateColumn and Eval("{ForeignKeyEntity}.{DisplayValue}"). I can also display the dropdown column in the edit form but as soon as I change the selected item and I update the row I get a script error where the selected value cannot be converted to a EntitySet.

Can someone please help me with a sample of the proper way to edit the Foreign Key items on an entity using a object datasource.

Thank you,
Obed
Top achievements
Rank 1
 answered on 14 Feb 2011
9 answers
319 views

Hi,

We are using Modal Popup extender from AjaxToolkit version 3.5.40.412.2 and hosted Radgrid on this modal popup extender- We are using Asp.net 3.5.

Now while we open modal popup exteder background color does not apply.

Also, we are using skins for Radgrid and skin applies only when modal popup extnder opens second time.

Request you to please suggest.

Thanks and regards,

Manishkumar Patel

Tsvetina
Telerik team
 answered on 14 Feb 2011
3 answers
177 views
Hi,
 I have 2 issues. below I mention please feel free to give the solution.
1.  In my application folder structure I have a folder inside I kept a some .pdf files, I'm using Telerick:radeditor (Q2 2010 version). when It's editable mode , I'm using Hyperlink manager Icon in toolbar(Insert Hyperlink icon), here I specify the link of particular .pdf file(http://~Common/StaticContent/test.pdf). but when I run the application when I click on link the path(url path of the file).pdf file is not open. Please help me.I need a urgent solution on that.

 2. and also previosully I'm using classic (Q2 2009 version) rad editor, I  implemented below event EditableChanged.
This can be work fine to me. but when I update my telerick control(Q2 2010 ) and implemented same event I got a error in Toolbars propertie.
  Below message /error I got when I run the application.
'Telerik.Web.UI.RadEditor' does not contain a definition for 'Toolbars' and no extension method 'Toolbars' accepting a first argument of type 'Telerik.Web.UI.RadEditor' could be found (are you missing a using directive or an assembly reference?) 

 

 

protected void RadEditor1_EditableChanged(object sender, Telerik.WebControls.EditableChangedEventArgs e)

 

{

 

 

 

try

 

 

{

 

 

Toolbar toolbar = RadEditor1.Toolbars["DecisionsToolbar"];

 

 

 

 

if (toolbar == null)

 

{

toolbar =

 

 

new Toolbar("DecisionsToolbar");

 

toolbar.ShowToolsText =

 

 

true;

 

toolbar.IsDockable =

 

 

false;

 

RadEditor1.Tools.Add(toolbar);

}

 

 

 

ToolbarButton button = toolbar.Tools.FindToolByCommandName("button") as ToolbarButton;

 

 

 

 

if (button == null)

 

{

button =

 

 

new ToolbarButton("button");

 

 

 

 

//button.ShowText = true;

 

 

button.ShowIcon =

 

true;

 

toolbar.Tools.Add(button);

}

}

 

 

 

catch (Exception)

 

{

 

 

 

 

throw;

 

}

 

}
 Below message /error I got when I run the application.
'Telerik.Web.UI.RadEditor' does not contain a definition for 'Toolbars' and no extension method 'Toolbars' accepting a first argument of type 'Telerik.Web.UI.RadEditor' could be found (are you missing a using directive or an assembly reference?) 

  Please give me solution asap to me.

 Thanks in Advance
 Mr. Perfect.

 

Rumen
Telerik team
 answered on 14 Feb 2011
1 answer
56 views
I have a RadComboBox on my page which has an ItemTemplate defined containing a  RadAsyncUpload control.  When the file is uploaded I would like to populate the combobox with the name of the uploaded file.  Please can anyone explain why this code doesn't work:

<telerik:RadComboBox ID="RadComboBoxDocument" runat="server" EmptyMessage="Choose an existing SPA or upload a new one" AppendDataBoundItems="true" Height="200px" Width="300px">
  <ItemTemplate>
    <div>
      <telerik:RadAsyncUpload ID="RadAsyncUploadDocument" runat="server" ControlObjectsVisibility="None" MultipleFileSelection="Disabled" MaxFileInputsCount="1" AllowedFileExtensions="pdf" Width="300px" OnClientFileUploaded="fileUploaded">
      </telerik:RadAsyncUpload>
    </div>
  </ItemTemplate>
  <Items>
    <telerik:RadComboBoxItem Text=" " />
  </Items>
</telerik:RadComboBox>
Princy
Top achievements
Rank 2
 answered on 14 Feb 2011
0 answers
39 views
Hi, I am new to RadMenu, I am having defficulties finding out what went wrong with my RadMenu, it appears correctly on most of the browsers, (IE7, IE8, FF, Chrome) but apparently problem in IE6,

The menu have 4 tiers,1 tier main items. in IE6 only up to 2nd tier appeared, 3rd and 4th does not appear. I am using default skin, with few customised .css for RadMenu.

Would appreciate if you guys could pin point what is the problem.

Heres the link to the website, the 1st link is the problematic one. the 2nd link is the website that was made by another designer which works ok.

1. http://www.eita.com.my/
2. http://preview28.teneotech.net/

Thank you in advance.
Cravemar
Top achievements
Rank 1
 asked on 14 Feb 2011
3 answers
118 views
I have a combo box on a page with some code in the sekectedindexchanged event (this populates a second combo based on the contents of the first)

Whenever I select an item in the first combo box, it initiates a full page postback despite it being setup in an ajax proxy manager, am I doing something wrong ?

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
       <telerik:AjaxSetting AjaxControlID="RadAjaxManagerProxy1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadComboBoxType" />
                            <telerik:AjaxUpdatedControl ControlID="RadComboBoxArtistGenre" />
                        </UpdatedControls>
            </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadComboBoxType">
            <updatedcontrols>
                <telerik:AjaxUpdatedControl ControlID="RadComboBoxType"
                    LoadingPanelID="RadAjaxLoadingPanel1" />
            </updatedcontrols>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadComboBoxArtistGenre">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadComboBoxArtistGenre"
                    LoadingPanelID="RadAjaxLoadingPanel2" />
            </UpdatedControls>
        </telerik:AjaxSetting>
         
         
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

<div class="cellArtistControl">
                 
                <telerik:RadComboBox ID="RadComboBoxType" Runat="server"
                        Skin="Vista" 
                        Width="250px"
                        onselectedindexchanged="RadComboBoxType_SelectedIndexChanged"
                        AutoPostBack="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
             </telerik:RadComboBox>
              
             <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                            ControlToValidate="RadComboBoxType" ErrorMessage="*" Font-Bold="True"
                            InitialValue="-- Select A Type --" ValidationGroup="ArtistValidation"></asp:RequiredFieldValidator>
                </div>
            <div class="cellArtistControl">
             
                <telerik:RadComboBox ID="RadComboBoxArtistGenre" runat="server" Skin="Vista" Width="250px">
                    </telerik:RadComboBox>
             
                </div>
            </div>

Simon
Telerik team
 answered on 13 Feb 2011
4 answers
77 views
Hi, I have a user control that is wrapped by a RadAjaxPanel.  Inside the user control, I have a RadCombo using a template with a TreeView.  This works fine without the AjaxPanel, but I found that the FindNode javascript is failing to find the TreeView on a partial post-back.  It works fine with full post backs.   I should note, I'm using the sample code here for a treeview inside a RadCombo and I'm also using the sample FindNode and other JavaScript (see below for both), and this is a problem with and without the java script inside a RadCodeBlock.

There must be an issue with OnClientLoad and the controls collection at time of partial post back because this works with a full post back.

Note: I'm loading the combo datasource on init view time - i.e. is not postback.  I think that is correct.

thanks
Marty

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RentSell_Info.ascx.cs"
    Inherits="RentMyStuffWeb.Shell.Views.RentSell_Info" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

    <script type="text/javascript">
        function FindNode(comboBox, args) {
            var PassedValue = $get('<%=NodeValue.ClientID%>').value
            var treevw = comboBox.get_items().getItem(0).findControl("RadTreeViewCategories");
            if (treevw) {
                var node = treevw.findNodeByValue(PassedValue);
                if (node) {
                    node.select()
                    comboBox.set_text(node.get_text());
                    comboBox.trackChanges();
                    comboBox.get_items().getItem(0).set_value(node.get_text());
                    comboBox.commitChanges();
                }
            }
            else {
                alert("treevw is null");   ********************** IS NULL on partial postback
            }
        }

        function nodeClicking(sender, args) {
            var comboBox = $find("<%= cbCategories.ClientID %>");
            var node = args.get_node()
            document.getElementById('<%=NodeValue.ClientID%>').value = node.get_value();
            document.getElementById('<%=NodeText.ClientID%>').value = node.get_text();
            comboBox.set_text(node.get_text());
            comboBox.trackChanges();
            comboBox.get_items().getItem(0).set_value(node.get_text());
            comboBox.commitChanges();
            comboBox.hideDropDown();
        }

        function StopPropagation(e) {

            if (!e) {
                e = window.event;
            }

            e.cancelBubble = true;
        }

        function OnClientDropDownOpenedHandler(sender, eventArgs) {
            var treevw = sender.get_items().getItem(0).findControl("RadTreeViewCategories");
            var node = treevw.findNodeByText(sender.get_items().getItem(0).get_value());
            if (node != null) {
                node.select();
                node.get_parent().expand();
                node.scrollIntoView();
            }
        }
    </script>

</telerik:RadCodeBlock>
<style type="text/css">
    .InfoStyle1
    {
        width: 100%;
    }
</style>
<div id="divRentSellInfo">
    <fieldset>
        <legend class="groupBoxCaption">Item Summary</legend>
        <table class="InfoStyle1">
            <tr>
                <td>
                    <div class="informational">
                        Pick the category that best describes your item.</div>
                    <div>
                        <asp:Label runat="server" CssClass="tableLabel" Text="Category:"></asp:Label>
                    </div>
                    <div>
                        <telerik:RadComboBox ID="cbCategories" runat="server" Width="400px" Height="400px"
                            EmptyMessage="Select a Category" HighlightTemplatedItems="true" Skin="Sitefinity"
                            AutoPostBack="false" DataTextField="CategoryName" OnClientLoad="FindNode" OnClientDropDownOpened="OnClientDropDownOpenedHandler">
                            <itemtemplate>
                                <div id="divCategoryTreeView" onclick="StopPropagation(event)">
                                    <telerik:RadTreeView ID="RadTreeViewCategories" runat="server" Skin="Sitefinity"
                                        Width="100%" CausesValidation="False" OnClientNodeClicking="nodeClicking">
                                        <NodeTemplate>
                                            <div id="divCatNodeTemplate">
                                                <%#DataBinder.Eval(Container, "Text") %>
                                            </div>
                                        </NodeTemplate>
                                        <ExpandAnimation Duration="300" />
                                    </telerik:RadTreeView>
                                </div>
                            </itemtemplate>
                            <items>
                                <telerik:RadComboBoxItem />
                            </items>
                        </telerik:RadComboBox>
                        <input id="NodeValue" value="0" runat="server" enableviewstate="true" type="hidden" />
                        <input id="NodeText" value="" runat="server" enableviewstate="true" type="hidden" />
                    </div>
                    <div>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorCategories" runat="server"
                            ControlToValidate="cbCategories" ValidationGroup="SubmitPage" EnableClientScript="false"
                            CssClass="RequiredFieldErrorMessage" Display="Dynamic" ErrorMessage="Please select at least one category from the list."></asp:RequiredFieldValidator>
                    </div>
                </td>
            </tr>
            <tr>
.
.
.
.
.

I can attach the HTML of the page source if you need
Simon
Telerik team
 answered on 13 Feb 2011
2 answers
131 views
Hi
I have a radgrid wich his first column is a bounded GridDropDownColumn.
I want (after binding) to remove the DropDown from the first column of the first row.
How do i do it ?
Thanks ,
Gerry
Gerry Polami
Top achievements
Rank 1
 answered on 13 Feb 2011
1 answer
204 views
Hi ,

Is there a way to disable submit button while upload is in progress .

Thanks so much.
 
Kate
Telerik team
 answered on 12 Feb 2011
1 answer
107 views
Hi,

I have a MasterPage with 2 ContentPlaceHolder's on it. The one is for my menu (created with RadPanel) and the other is the actual contents. Is it possible to update the contents_contentplaceholder from the Radpanel without reloading the complete page and without a splitter control on the page?

Thanx

Peter
Telerik team
 answered on 12 Feb 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?