Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
191 views
How can I utilize RadAsyncUpload to upload files to a SharePoint document library? Apparently, its not as simple as setting the TargetFolder of the RadAsyncUpload to a SharePoint document library URL. The ASP page hosting the control sits outside of SharePoint but in the same internet zone for authentication purposes.

Anybody have an unambiguous example of how to do this?

Here's the front code, but how to wire it together in the back-end C#?

<telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" Skin="Windows7" FileUploaded="RadAsyncUpload1_FileUploaded"
    AllowedFileExtensions="jpg,jpeg,gif,png">
</telerik:RadAsyncUpload>
<div>
    Valid image types: JPEG, GIF, PNG.</div>
<hr />
<telerik:RadButton ID="RadButton1" runat="server" Skin="Windows7" Text="Upload" OnClick="RadButton1_OnClick">
</telerik:RadButton>
Kalina
Telerik team
 answered on 04 Oct 2012
2 answers
183 views
Hello,
I have a multiline RadTextBox on my page:
<telerik:RadTextBox ID="DescriptionTextBox" TextMode="MultiLine" runat="server" Width="100%" Height="150px" />

Later, this textbox is made read-only (from code-behind - depending on permissions of user). Under Chrome and Firefox everything works well - even though the textbox is disabled, I can use scrollbar and read all the text. Unfortunately, under IE (both IE8 and IE9) the scrollbar is shown but it's not enabled.

Is there any way to make it usable?

Thank you in advance.
pawelg
Top achievements
Rank 1
 answered on 04 Oct 2012
1 answer
157 views
Please see attachment..
  Change update button text to Save
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Oct 2012
1 answer
104 views

Hello .. I hope someone can help. I have a RadGrid on a Web Form with master page... i need to select a row and capture selected row index in a Label, to use this javascript code:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
    <script type="text/javascript"
        function RowSelected(sender, args) { 
            document.getElementById("<%= Label1.ClientID  %>").innerHTML = args.get_itemIndexHierarchical();             
        
    </script
  </telerik:RadCodeBlock>

At runtime, in the internet explorer, I can see that Label change to value of Row Selected ... for example: 2, 4, 7, 11 .
However, when I press a button the value of Labelxx.Text is ever "Label", the value really never change. I read many forums and posed a possible solution and that many people have worked is:

1) In the webform.aspx replace the code

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

by this

<asp:HiddenField ID="Label1" runat="server" />

2) replace the next line in javascript code:

document.getElementById("<%= Label1.ClientID  %>").innerHTML = args.get_itemIndexHierarchical();

by this

document.getElementById('Label1').value = args.get_itemIndexHierarchical();

3) in the Webform.aspx.cs take the value of label with:

string value_row = Label1.value

Curiosly .. this solucion works for me when the Webform.aspx isnot with the masterpage... When Webform.aspx is with MasterPage ... the same code is not working; I checked variables, codes, script and dont working ... nothing :'(

The MasterPage only contain a RadToolBar, a scriptManager and ContentPaceHolder... its all.
The WebForm only contain a RadGrid, native asp Label and native asp button...

 any idea why this happens? .. Thanks in advance for your help.

Eyup
Telerik team
 answered on 04 Oct 2012
1 answer
84 views
Hi there,
     How can I change the forecolor of a grid bound column from code behind. Please do share I you have done this before or have an idea which can help me out.
thanks
Savyo
Shinu
Top achievements
Rank 2
 answered on 04 Oct 2012
1 answer
80 views

Hello .. I hope someone can help. I have a RadGrid on a Web Form with master page... i need to select a row and capture selected row index in a Label, to use this javascript code:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function RowSelected(sender, args) {
            document.getElementById("<%= Label1.ClientID  %>").innerHTML = args.get_itemIndexHierarchical();            
        }
    </script>
  </telerik:RadCodeBlock>

At runtime, in the internet explorer, I can see that Label change to value of Row Selected ... for example: 2, 4, 7, 11 .
However, when I press a button the value of Labelxx.Text is ever "Label", the value really never change. I read many forums and posed a possible solution and that many people have worked is:


1) In the webform.aspx replace the code

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

by this

<asp:HiddenField ID="Label1" runat="server" />

2) replace the next line in javascript code:

document.getElementById("<%= Label1.ClientID  %>").innerHTML = args.get_itemIndexHierarchical();

by this

document.getElementById('Label1').value = args.get_itemIndexHierarchical();

3) in the Webform.aspx.cs take the value of label with:


string value_row = Label1.value


Curiosly .. this solucion works for me when the Webform.aspx isnot with the masterpage... When Webform.aspx is with MasterPage ... the same code is not working; I checked variables, codes, script and dont working ... nothing :'(

The MasterPage only contain a RadToolBar, a scriptManager and ContentPaceHolder... its all.
The WebForm only contain a RadGrid, native asp Label and native asp button...

 any idea why this happens? .. Thanks in advance for your help.

Eyup
Telerik team
 answered on 04 Oct 2012
2 answers
75 views
Hello,

Ive searched for quite some time now trying to find information on how i get the values from the textboxes in the form when im adding a new record to my grid.

What event do i use to get these values and how do i get them out?

I simply want to save the inserted record to database.

Thanks
Robert
Top achievements
Rank 1
 answered on 04 Oct 2012
1 answer
93 views
Hi guys,
     How can I display the filesize next to my filename in asyncupload. Got any idea. Please share :)
thanks
Savyo
Princy
Top achievements
Rank 2
 answered on 04 Oct 2012
1 answer
27 views
Hello,
 I got some trouble during learning of  product.
It looks like Telerik provide huge flexibility on client side but I got (I think base issues) thanks I can’t resolve with out your help.
1. Update panel is not show at all, in grid status status bar,
2. Filer grid doesn’t work from JS part (in your examples it does)
3. OnDataBundel doesn’t call on page size changes. And images is not show.


Could you please help me thank. 


Looking forward to get answer from you


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Bekey.layouts.BeKey.Test" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2012.2.912.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>Test</title>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript" src="../../assets/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript">
        function page_init() {
            //$('.tbl_row:odd').addClass('tr_odd');
            //$('.tbl_row:even').addClass('tr_even');
            $('.show_tip').hover(function () {
                $(this).find('.td_tooltip').show();
            }, function () {
                $(this).find('.td_tooltip').hide();
            });
        }
 
        //
        function IsBundle(item) {
            var fieldName = "type";
            var value = item[fieldName];
            return value.toLowerCase() != "Address".toLowerCase();
        }
 
        function RowDataBound(sender, args) {
            var imageurl;
 
            if (!IsBundle(args.get_dataItem())) {
                imageurl = "/assets/images/address_icon.png";
            } else {
                imageurl = "/assets/images/bundle_icon.png";
            }
            $(args.get_item().findElement("AccessTypeImage")).attr("src", imageurl);
        }
 
        function AccessRowDeleting(sender, eventArgs) {
            var item = eventArgs.get_gridDataItem().get_dataItem();
            var isBundle = IsBundle(item);
            var paramData = JSON.stringify({ "access": item, "isBondle": isBundle });
            $.ajax({
                type: "POST",
                url: "/services/netkey.svc/DeleteAccess",
                contentType: "application/json",
                data: paramData,
                success: function (result) {
                    alert(result);
                },
                error: function (xhr) {
                    // console(xhr);
                }
            });
        }
 
        function RequestStart(sender, eventArgs) {
            alert('Request start initiated by: ' + eventArgs.get_eventTarget());
        }
 
        function ResponseEnd() {
        }
    </script>
</telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadLoadingPanel">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                                </UpdatedControls>
                            </telerik:AjaxSetting>
                        </AjaxSettings>
                        <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
                    </telerik:RadAjaxManager>
 
                    <telerik:RadAjaxLoadingPanel runat="server" ID="RadLoadingPanel" Skin="Default" InitialDelayTime="0"
                        MinDisplayTime="1000" Transparency="25">
                        <div style="background-color: #000000; width: 100%; height: 100%">
                            <img id="imgLoader" src="/assets/images/ajax_loader.gif" />
                        </div>
                    </telerik:RadAjaxLoadingPanel>
 
                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" AllowPaging="True"
                        AllowFilteringByColumn="True" AutoGenerateColumns="False" ShowStatusBar="true"
                        CellSpacing="0" GridLines="None">
                        <MasterTableView>
                            <Columns>
                                <telerik:GridImageColumn UniqueName="AccessTypeImage" DataAlternateTextField="type">
                                    <FilterTemplate>
                                        <telerik:RadComboBox runat="server" DataTextField="Value" DataValueField="Key" ID="cmbTypeFilter"
                                            OnClientSelectedIndexChanged="TypeSelectedIndexChanged">
                                            <Items>
                                                <telerik:RadComboBoxItem Text="All" />
                                                <telerik:RadComboBoxItem Text="Address" />
                                                <telerik:RadComboBoxItem Text="Bundle" />
                                            </Items>
                                        </telerik:RadComboBox>
                                        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                            <script type="text/javascript">
                                                function TypeSelectedIndexChanged(sender, args) {
                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                    var item = args.get_item();
                                                    var equalFilter = Telerik.Web.UI.GridFilterFunction.EqualTo;
                                                    var noFilter = Telerik.Web.UI.GridFilterFunction.NoFilter;
                                                    tableView.filter("type", item.get_text(), item.get_text() != "All" ? equalFilter : noFilter);
                                                
                                            </script>
                                        </telerik:RadScriptBlock>
                                    </FilterTemplate>
                                </telerik:GridImageColumn>
                                <telerik:GridBoundColumn DataField="zipCode" HeaderText="ZIP OR BUNDLE NAME">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="roadName" HeaderText="ADDRESS">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="addressType" HeaderText="TYPE">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="fromDatetime" HeaderText="FROM" DataFormatString="{0:MM/dd/yyyy}"
                                    ReadOnly="True" SortExpression="Dates">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="toDatetime" DataFormatString="{0:MM/dd/yyyy}"
                                    ReadOnly="True" HeaderText="TO">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="userName" HeaderText="USER">
                                </telerik:GridBoundColumn>
                                <telerik:GridClientDeleteColumn ConfirmTextFields="USER" ConfirmDialogType="Classic"
                                    ConfirmTextFormatString="Are you sure to delete {0}?" HeaderStyle-Width="35px"
                                    ButtonType="ImageButton" ImageUrl="/assets/images/close_del.png" DataTextField="userName"
                                    FilterControlAltText="Filter colDelete column" UniqueName="colDelete">
                                    <HeaderStyle Width="35px"></HeaderStyle>
                                </telerik:GridClientDeleteColumn>
                            </Columns>
                            <PagerStyle AlwaysVisible="True"></PagerStyle>
                        </MasterTableView>
                        <ClientSettings ReorderColumnsOnClient="True">
                            <ClientEvents OnRowDataBound="RowDataBound" OnRowDeleting="AccessRowDeleting" />
                            <DataBinding SelectMethod="GetAccessData" Location="/services/my.svc" SortParameterType="Linq"
                                FilterParameterType="Linq" >
                            </DataBinding>
                        </ClientSettings>
                    </telerik:RadGrid>
    </div>
    </form>
</body>
</html>
Andrey
Telerik team
 answered on 04 Oct 2012
3 answers
95 views
I am trying to add a custom webpart into a publishing html field that has radeditor applied to it. I am using radeditor 6.2 and this is in SP2010.
I can add the webpart, but it doesn't function properly at all. When clicking on the webpart drown down icon nothing happens. Also any updates to the webpart code are not reflected unless I delete it out and re-add it. I tried the same thing inside a publishing html field where radeditor was not present and it worked as expected. I've set both the AllowSpecialTags and AllowScripts fields to be true. Radeditor seems to be stripping something out that prevents the webpart from wiring up correctly.

Please help.
Rumen
Telerik team
 answered on 04 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?