Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
80 views
I am using telerik libraries. While running my application against "Any CPU"  things are working file but it is failing for "x86" target. Any idea about this issue ?
Kuldeep
Top achievements
Rank 1
 asked on 23 Nov 2015
3 answers
196 views
Hi,

We are using the ASP.NET Ajax Treeview control for our navigation in sharepoint. We have bound the Treeview to the PublishingNavigation:PortalSiteMapDataSource  SiteMapProvider="CombinedNavSiteMapProvider".

Our problem is that in our navigation a number of links have manually been added to the navigation structure, these links all point to the same page. This means that if you click one of these links you navigate to the actual page BUT on the page loading all nodes that contain any of these extra links are expanded as well as the actual page that we have selected/navigated to.

Here is the control as implemented in our masterpage:

<telerik:RadTreeView ID="RadTreeView1"  
   runat="server"
   DataSourceID="ourdatasourcename" 
   Flow="Vertical" 
   EnableEmbeddedSkins="false"
   SkinsPath="~\Telerik\Skins"
   Skin="ourskinname"
   ClickToOpen="true"
   SingleExpandPath="True"
   MultipleSelect="False"
   AutoPostBack="true" 
   ExpandMode="ClientSide"
   ExpandDirection="Down"
   OnClientLoad="On_Load">
   </telerik:RadTreeView>


I have set the property SingleExpandPath="True" this works if the client opens a node - all other open nodes close but has no effect on the multiple expanded nodes on page load.

I have tried to utilize javascript and close all expanded nodes and then only expand the selected node via the OnClientLoad, but this client side event does not fire (I could do this on a button click event and it works, I also called this function via the body onLoad which did not work - nothing happened).

I then created a code behind file for the masterpage and in the Page_Load used the following function RadTreeview1.CollapseAllNodes(); this did not respond at all, thought the clientid was displayed.

protected

void Page_Load(object sender, EventArgs e)

 

{

 

RadTreeview1.CollapseAllNodes();

 

 

Response.Write("load " + RadTreeview1.ClientID);

 

 

}


I then found the article 

Server side events not fired when a Navigation control is bound via SiteMap DataSource

http://www.telerik.com/support/kb/aspnet-ajax/menu/server-side-events-not-fired-when-a-navigation-control-is-bound-via-sitemap-datasource.aspx

Fire server-side events when the control is bound to SiteMap DataSource.
If a Navigation control is bound to a SiteMapDataSource, the NavigateUrl property of the items will be set.
This effectively disables PostBacks (ItemClick/NodeClick/TabClick events, etc.) because the item navigates
to the particular URL rather than posting back

I then tried to follow this example using the following events

 

protected void RadTreeview1_OnNodeDataBound(object sender, RadTreeNodeEventArgs e)

 

{

e.Node.Attributes[

"NavigateUrl"] = e.Node.NavigateUrl;

 

e.Node.NavigateUrl =

"";

 

}

 

protected void RadTreeview1_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)

 

{

 

Response.Redirect(e.Node.Attributes["NavigateUrl"].ToString());

 

 

 

}

 

Neither of these events seem to have any effect/do not fire.


We really need to stop this explosion of the treeview, and only have the selected node xepanded on the page load. Can you please help.

Vanessa



Varalakshmi
Top achievements
Rank 1
 answered on 21 Nov 2015
7 answers
1.0K+ views
Hi,
Can any one tell me how to persist the selected row even after post back when Allow multi row selection is false.
Any response will be really helpful.

Regards,
Antony K S
Harry
Top achievements
Rank 1
 answered on 21 Nov 2015
4 answers
679 views

Hi,

I want to embed the following HTML into a popup window, but I am unable to watch it fullscreen:

<iframe width="560" height="315" src="https://www.youtube.com/embed/sNIMCdVOHOM" frameborder="0" allowfullscreen></iframe>

This is due to internally telerik generates a window by using an iframe to load the content into, this iframe is missing the "allowfullscreen" attribute therefore the browser does not allow full screen.

How can I add an attribute to the iframe internally generated by telerik?

Chris

 

 

Chris
Top achievements
Rank 1
 answered on 21 Nov 2015
1 answer
129 views

I have an ASP.Net page with a button on it that the user can click on Export data from a database table.  Usually this can be a long process if there are thousands of records to export.

I was trying to the use the ProgressArea to show the progress of the export so the user can see how far along it is.

I tried following the basic demo you have that shows a "Start Processing" button.  But it is not coming out the same way on my ASP.Net when clicking on the Export button.

Version of the Telerik software I am using is 2015.3.930.40

The issues I am seeing:

- The text in the ProgressArea still shows "Uploading Files".  This has nothing to do with uploading files.  The export gets data from the database table and puts it in a file on the client side.

- The ProgressArea does not disappear after export has completed.

Attached is a screenshot of what I am seeing. 

Please help!

Sincerely,

Keith Jackson

Keith
Top achievements
Rank 1
 answered on 20 Nov 2015
6 answers
771 views
Hi,

I need to bind my dropdowns at server end with the list retrieved from service.
I tried to follow demo provided in http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

hard luck is; in demo the datasource is defined in designer itself but I need to bind the ASP dropdownlist dynamically with the data retrieved through services in form of datatable/ lists.

I tried following code block on ItemDataBound, ItemUpdate and ItemEdit events but no luck.

Designer code:

<rad:RadGrid ID="grdAssessmentConfig" runat="server" CssClass="table_heading" AllowPaging="false"
            AllowSorting="True" PagerStyle-AlwaysVisible="false" AllowMultiRowSelection="False"
            AllowMultiRowEdit="false" AllowAutomaticInserts="True"
            AllowAutomaticUpdates="True" OnBatchEditCommand="grdAssessmentConfig_ItemEdit" 
            OnItemDataBound="grdAssessmentConfig_ItemDataBound" EnableTheming="true" MasterTableView-AlternatingItemStyle-BackColor="#eaeff5"
            AutoGenerateColumns="false" GridLines="Vertical" FilterItemStyle-CssClass="RadGridFilter">
            <%--  <PagerStyle Mode="NextPrevAndNumeric" Width="100%" AlwaysVisible="true" />--%>
            <GroupingSettings CaseSensitive="false" />
            <MasterTableView HorizontalAlign="Right" DataSourcePersistenceMode="ViewState" CommandItemDisplay="None"
                EditMode="Batch">
                <%--<CommandItemSettings ShowExportToCsvButton="true"></CommandItemSettings>--%>
                <BatchEditingSettings EditType="Cell" OpenEditingEvent="Click"  />
                <Columns>
                    <rad:GridTemplateColumn HeaderText="Assess" UniqueName="Assessment"
                        DataField="Assessment">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblAssess" Text='<%# Eval("column1")%>'></asp:Label>
                            <asp:HiddenField ID="hdnAssess" runat="server" Value='<%#Eval("column1")%>' />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlAssesment" runat="server" CssClass="rad_Width">
                            </asp:DropDownList>
                        </EditItemTemplate>
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn HeaderText="Care">
                        <ItemTemplate>
                            <asp:HiddenField runat="server" ID="hdnCare" Value='<%#Eval("Column2")%>' />
                            <asp:Label runat="server" ID="lblCare" Text='<%#Eval("Column2")%>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="ddlCare" runat="server" DataSourceID="ds1" CssClass="rad_Width">
                            </asp:DropDownList>
                        </EditItemTemplate>
                    </rad:GridTemplateColumn>
                   <%-- <rad:GridEditCommandColumn UniqueName="EditCommandColumn">
                    </rad:GridEditCommandColumn>--%>
                </Columns>
            </MasterTableView>
            <%--<ClientSettings AllowKeyboardNavigation="true"></ClientSettings>--%>
        </rad:RadGrid>

 Code Behind:

   if (e.Item is GridDataItem)
                {

                    DropDownList ddlAssess = (DropDownList)e.Item.FindControl("ddlAssesment");

                    // GridEditableItem grdEdit = 

                    DropDownList ddlCare = (DropDownList)e.Item.FindControl("ddlCare");
                    HiddenField hdAssessment = (HiddenField)e.Item.FindControl("hdnAssess");
                    HiddenField hdCare = (HiddenField)e.Item.FindControl("hdnCare");
                    Label lblCare = (Label)e.Item.FindControl("lblCare");
                    Label lblAssess = (Label)e.Item.FindControl("lblAssess");


  Code successfully returns Label and Hidden controls as they are in ItenTemplate but not the dropdownlist.
I am unable to tress what I am missing.

Any help is appreciated.

Thanks






Lee
Top achievements
Rank 1
 answered on 20 Nov 2015
1 answer
88 views

I am using a RadListView with NeedDataSource binding, and Insert/Update/Delete capabilities.

After the item is inserted, the InsertItem disappears, I don't want to have a "New Record" button, I want to always be an InsertItem template at the bottom. 

The first try was to use:

    protected void RadListView1_ItemInserted(object sender, RadListViewInsertedEventArgs e)
    {
        e.KeepInInsertMode = true;
    }

This worked fine when I was using Simpe data-binding, as I have faced other problems, I switched to Advanced Data Binding. After that, the event ItemInserted is not reachedanymore (I suspect it is because the ListView is rebinded after the Insert)

 

Any solutions to my problem? Also, why is the property InsertItemPosition is not enough? What cases should the property be enough?

Pavlina
Telerik team
 answered on 20 Nov 2015
0 answers
167 views

Hello,

I would appreciate some help here.

I have the following code, which includes a RadComboBox, a hyperlink and an empty div element. On the hyperlink click event I load another apsx page in a jQuery dialog. After closing the dialog, I try to open the RadComboBox but it doesn't open and it gives the below JavaScript error:

 

Error: Sys.ArgumentTypeException: Object of type 'Telerik.Web.UI.RadComboBoxCancelEventArgs' cannot be converted to type 'Sys.CancelEventArgs'. Parameter name: instance

01.    <script type="text/javascript">
02. 
03.        $(document).ready(
04.            //Bind jQuery events
05.            function () {
06.                Load();
07.             
08. 
09.            var prm = Sys.WebForms.PageRequestManager.getInstance();
10.            if (prm) {
11.                prm.add_endRequest(
12.                    // re-bind jQuery events on End Request
13.                    function () {
14.                        Load();
15.                    });
16.            }});
17.        function Load() {
18.            $(".companyLink").click( //On a link  click event
19.            function () {
20.                $(".client-editor")
21.                    .load("../somepage.aspx"//Load the aspx page
22.                    .dialog({           //Prepare the dialog
23.                        autoOpen: false,
24.                        modal: true,
25.                        close: function () {   //Empty the page loaded on close
26.                            $(".client-editor").empty();
27.                        }
28.                    });
29.                $(".client-editor").dialog("open"); //Open the dialog
30.            });
31.        }
32.</script>

 

01.<asp:HyperLink id="HyperLink1" runat="server" CssClass="companyLink" Text="CLick Here" ></asp:HyperLink>
02. 
03.     <telerik:RadComboBox ID="ddlInvoiceStatus" runat="server" RegisterWithScriptManager="false">
04.        <Items>
05.            <telerik:RadComboBoxItem Text="option 1" Value="0" />
06.            <telerik:RadComboBoxItem Text="option 2" Value="1" />
07.            <telerik:RadComboBoxItem Text="option 2" Value="3" />
08.        </Items>
09.    </telerik:RadComboBox>
10.   
11.  
12.<div class="client-editor" title="Edit Client Details"></div>

Georgia
Top achievements
Rank 1
 asked on 20 Nov 2015
5 answers
355 views
how to open the excel file in a popup window as pdf gets opened in a popup window on click of file in rad file explorer folder.
Vessy
Telerik team
 answered on 20 Nov 2015
2 answers
83 views

Hi All,

How can I call to execute xhtml validator to just return true (if its valid xhtml) or false (if not valid). Will just add this code before saving content to database, so that it will only save valid xhtml format.

Thanks in advance,

Rj

RJ
Top achievements
Rank 1
 answered on 20 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?