Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
125 views

Hello,


there is a strange bug in RadEditor control. Opening RadWindow from editor doesn't work in Chrome.



Check this page (in Chrome) http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

and click on "Document manager" icon.



Opened window is uninitialized and there is "jQuery is undefined" error. It comes from jQueryPlugins.js Telerik file.



Any chance to fix it or is there any workaround? It works in Firefox and IE, but doesn't work in Chrome and Opera (if I remember)



Thnx

Marin Bratanov
Telerik team
 answered on 13 Dec 2013
1 answer
137 views
Hello,

I just want to know where can I find the files for Radeditor 2010? Because it's easy to find the installation files for 2007 but not for 2010 version.

Thanks.
Stanimir
Telerik team
 answered on 13 Dec 2013
2 answers
200 views
I reviewed a number of support articles and forum messages regarding scrollIntoView.

The radTreeView is within an iframe.   When I call scrollIntoView with or without a timeout, it does not scroll.

I tried changing the page to use a radpane with a radsplitter, but I can't get rid of the border.  I didn't get far enough to see if the scrolling methods would work.

Do the scroll methods work when the object is within an iframe?
Peter
Top achievements
Rank 1
 answered on 13 Dec 2013
8 answers
167 views
I use a DetailsView directly in NestedViewTemplate. It is workable.
But I use a RadTabStrip in NestedViewTemplate, and DetailsView in RadTabStrip PageView.
I got a  tricky result. that is the DetailsView show one second and then disappear. 
Could anyone tell my what's wrong in it? Thanks.
the following is my code:
<div>
            <telerik:RadGrid ID="RadGrid1" runat="server" Culture="zh-TW" DataSourceID="LinqDataSource_apply" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" CellSpacing="0" GridLines="None" AllowFilteringByColumn="True" AllowSorting="True">
                <MasterTableView AutoGenerateColumns="False" DataSourceID="LinqDataSource_apply" CommandItemDisplay="Top" DataKeyNames="user_email" AllowPaging="True" PageSize="15">
                    <NestedViewTemplate>
                        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1
"
SelectedIndex="0" Skin="Windows7">
                            <Tabs>
                                <telerik:RadTab runat="server" Text="USER" PageViewID="RadPageView1
"
></telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
                            <telerik:RadPageView ID="RadPageView1" runat="server">
                                <asp:LinqDataSource ID="LinqDataSource_register" runat="server" ContextTypeName="db_DataContext" EntityTypeName="" TableName="register" Where="email == @email">
                                    <WhereParameters>
                                        <asp:ControlParameter ControlID="Label1" Name="email" PropertyName="Text" Type="String" />
                                    </WhereParameters>
                                </asp:LinqDataSource>
                                <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("user_email") %>' Visible="false" runat="server"></asp:Label>
                                        <asp:DetailsView ID="DetailsView_user" runat="server" DataSourceID="LinqDataSource_register" Width="300px" Height="300px" AutoGenerateRows="false">
                                            <Fields>
                                                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="id" />
                                                <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
                                                <asp:BoundField DataField="orgnaization" HeaderText="orgnaization" SortExpression="orgnaization" />
                                            </Fields>
                                        </asp:DetailsView>
                            </telerik:RadPageView>
                        </telerik:RadMultiPage>
                    </NestedViewTemplate>
                    <Columns>
                        <telerik:GridBoundColumn DataField="apply_no" FilterControlAltText="Filter apply_no column" HeaderText="apply_no" SortExpression="apply_no" UniqueName="apply_no" DataType="System.Int32" ReadOnly="True">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="user_email" FilterControlAltText="Filter user_email column" HeaderText="user_email" SortExpression="user_email" UniqueName="user_email">
                            <ColumnValidationSettings>
                                <ModelErrorMessage />
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="type" FilterControlAltText="Filter type column" HeaderText="type" SortExpression="type" UniqueName="type">
                            <ColumnValidationSettings>
                                <ModelErrorMessage />
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="usage" FilterControlAltText="Filter usage column" HeaderText="usage" SortExpression="usage" UniqueName="usage">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="date_apply" DataType="System.DateTime" FilterControlAltText="Filter date_apply column" HeaderText="date_apply" SortExpression="date_apply" UniqueName="date_apply">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="review_status" FilterControlAltText="Filter review_status column" HeaderText="review_status" SortExpression="review_status" UniqueName="review_status">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="reject" DataType="System.Int32" FilterControlAltText="Filter reject column" HeaderText="reject" SortExpression="reject" UniqueName="reject">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text="" />
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                    </Columns>
                    <EditFormSettings>
                        <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1" ButtonType="ImageButton">
                        </EditColumn>
                        <PopUpSettings Modal="true" />
                    </EditFormSettings>
                    <ItemStyle HorizontalAlign="Center" />
                    <AlternatingItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" />
                    <FilterItemStyle HorizontalAlign="Center" />
                </MasterTableView>
            </telerik:RadGrid>
        </div>
        <asp:LinqDataSource ID="LinqDataSource_apply" runat="server" ContextTypeName="db_DataContext" EntityTypeName="" TableName="apply" EnableDelete="True" EnableInsert="True" EnableUpdate="True"></asp:LinqDataSource>




Viktor Tachev
Telerik team
 answered on 13 Dec 2013
11 answers
457 views
I've checked the documentation, but I don't see anything about disabling the "Image Editor" feature of the Image Manager dialog.  Can it be done?

Vessy
Telerik team
 answered on 13 Dec 2013
1 answer
125 views
Hi,

I am using File Explorer first time.
Is this possible to have a folder to be listed in this control from 'D' drive of local machine.
Please give me a solution for this.

Thanks in advance.

Regards,
AGM Raja.
Vessy
Telerik team
 answered on 13 Dec 2013
1 answer
692 views
I'm going to try and make this as short as possible another developer created some controls, I am attempting to use a checkboxlist that when an item is selected to have the data entered in a Listbox.  With using a postback the page refreshes every time I select an item, so I started searching on how to postback without refreshing the page. The closest that I have gotten is with the attached code; the issue with the current code is the information is entered into the box but it is as though some event is waiting to happen after I select an item because I am getting the spinning symbol when I move around various spots on the page and it prevents me from clicking on a seperate button while this is occurring.  If anyone can provide any assistance please help.  I have attempted to use the below forums as reference.

http://www.telerik.com/community/forums/community-forums/web-2/radgrid-refresh-without-postback.aspx

http://www.telerik.com/community/forums/aspnet-ajax/window/radwindow-and-radajaxpanel.aspx
 
in ascx
<telerik:RadComboBox ID="rcb_County" runat="server" OnDataBound="rcb_County_DataBound">
                                <ItemTemplate>
                                    <asp:CheckBoxList ID="cbl_County" runat="server" autopostback="True" OnSelectedIndexChanged="CheckBoxList_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                </ItemTemplate>
                            </telerik:RadComboBox>
                            <asp:CustomValidator ID="cvCounty" runat="server" ClientValidationFunction="validateCounty"
                                CssClass="validation" ErrorMessage="* Required"></asp:CustomValidator>
in ascx
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <ClientEvents></ClientEvents>
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rcb_County">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rcb_County" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
 
Code Behind
protected void CheckBoxList_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListBox.Items.Clear();
            System.Threading.Thread.Sleep(1000);
            CheckBoxList cbl_County = rcb_County.Items[0].FindControl("cbl_County") as CheckBoxList;
            foreach (ListItem val in cbl_County.Items)
            {
                if (val.Selected)
                {
                    ListBox.Items.Add(val.Text);
                }
            }
        }
Nencho
Telerik team
 answered on 13 Dec 2013
15 answers
336 views
We are using the RadGrid control to retrieve User objects from a repository that uses NHibernate to retrieve the objects. I am using an object data source defined as:
<asp:ObjectDataSource ID="UsersData" runat="server" SelectMethod="GetAll" DataObjectTypeName="TestingApp.Lib.Domain.User" TypeName="TestingApp.Lib.Repositories.UserRepository">
</asp:ObjectDataSource>

The method signature for GetAll is as follows:
public IEnumerable<User> GetAll();

With NHibernate, some Users are actually AdminUsers which extends User. It seems the repository is currently returning an AdminUser object first, and the control seems to be assuming then that the rest of the objects will be AdminUser rather than User. This causes the following exception to be thrown:
"Unable to cast object of type 'TestingApp.Lib.Domain.User' to type 'TestingApp.Lib.Domain.AdminUser'."

Is there a way to force the control to assume that data bound objects are User rather than AdminUser? Thanks!
Andy
Top achievements
Rank 1
Iron
 answered on 13 Dec 2013
1 answer
161 views
Working Code: I have a Grid, and it has list of filename's with radio button. If I select a radio button, I can display image for the filename in the RadImageEditor. If I change the radio button or click another row, the image is updated properly. When image is displayed and If I click on zoom in zoom out, and then reset, the image is displayed in its original form the way it was loaded.
1) The problem comes when I first rotate an image, then click on reset changes , the image does not come to its original form the way it was initially loaded.
2) Continuing the step 1, if I now try to change radiobutton so try to load another image, an error is thrown.

Let me know any better way or possible solution to this issue. The demo does not give proper information for this issue, so putting in this forum.
 Markup Code:
<%@ Page Title="Home Page" Language="vb"   AutoEventWireup="false"   CodeBehind="Default.aspx.vb" Inherits="DocumentMgr._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!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 id="Head1"  >
    <title></title>
   
     <script type="text/javascript">
         function OnClientCommandExecuting(sender, eventArgs) {

             if (eventArgs.get_commandName() == "Reset") {                 
                 var imgEditor = $find("<%=rie.ClientID %>");
                 imgEditor.getEditableImage()._finishReset();
                 eventArgs.set_cancel(true);
             }
             return false;
         }
         
    </script>
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
   <%--<asp:FileUpload ID="fup" runat="server" />
    <asp:Button ID="submit" runat="server"  Text="Submit" OnClick="Submit_Click" />--%>
     <asp:ScriptManager ID="sm" runat="server"  ></asp:ScriptManager>
    <asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    <telerik:radgrid id="grTL" skin="Office2010Silver" allowfilteringbycolumn="false"  
        width="100%" height="150px" showstatusbar="true" runat="server" allowpaging="True"
        allowsorting="True" enableajax="True" allowcustompaging="false" pagesize="23"
        editformitem="false" autogeneratecolumns="false" enablecolumnsviewstate="false"
        autogenerateeditcolumn="false" enableariasupport="true" MasterTableView-DataKeyNames="ID"
        >
       
        <MasterTableView HeaderStyle-Font-Bold="true" ShowFooter="False" AllowNaturalSort="false"
                                    EditMode="InPlace" CommandItemDisplay="None" Summary ="">
            <Columns>
                <telerik:GridTemplateColumn UniqueName="Select" HeaderText="" HeaderStyle-Width="40"
                    HeaderStyle-VerticalAlign="Top" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <asp:RadioButton ID="rbSelect" AutoPostBack="true" EnableTheming="true" Font-Bold="true"
                            runat="server" OnCheckedChanged="rbSelect_CheckedChanged" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                
                 <telerik:GridTemplateColumn HeaderText="FileName" >
                    <ItemTemplate>
                        <asp:Label ID="lblFileName" runat="server" Width="200px" Text='<%# Eval("FileName") %>'></asp:Label>                        
                    </ItemTemplate>
                    <EditItemTemplate>
                         <asp:Label ID="lblEFileName" runat="server" Width="200px" Text='<%# Eval("FileName") %>'></asp:Label>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn HeaderText="Information" >
                    <ItemTemplate>
                        <asp:Label ID="lblInfo" runat="server" Width="200px" Text='<%# Eval("Information") %>'>
                        </asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTextBox ID="txtEditInfo" runat="server"  Width="200px" Text='<%# Bind("Information") %>' TabIndex="1" />                                                
                    </EditItemTemplate>
                   
                </telerik:GridTemplateColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings AllowColumnsReorder="true">
            <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="3" />
            <Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false"
                ClipCellContentOnResize="true" EnableRealTimeResize="false" />
        </ClientSettings>
    </telerik:radgrid>
 

<telerik:RadImageEditor ID="rie" runat="server" EnableResize="true"    
  Width="100%" Height="500px" EnableEmbeddedScripts="true"   OnClientCommandExecuting="OnClientCommandExecuting"   
ToolsFile="Basic.xml"  >
 
</telerik:RadImageEditor>
    </ContentTemplate>
    </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>

Code Behind:
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            BindData()
        End If
    End Sub

    Private Sub BindData()
        grTL.DataSource = GetListOfImages()
        grTL.DataBind()
    End Sub
    Private Function GetListOfImages() As List(Of FileData)
        Dim images = New List(Of String)()
        Dim arr As List(Of FileData) = New List(Of FileData)
        Dim files As Files = New Files
        Try
            arr = files.GetFileWoAttachment()
            ' Get a list of FileName with extension to be displayed in Grid.
            
            
        Catch ex As Exception
            'log exception

        End Try

        Return arr

    End Function
    Protected Sub rbSelect_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)


        Dim bCAllToday As Boolean = False
        'Session("RowIndex") = 0

        Dim item As GridDataItem = DirectCast(TryCast(sender, RadioButton).NamingContainer, GridDataItem)
        Dim rdBtn As RadioButton = TryCast(sender, RadioButton)

        If rdBtn.Checked Then
            Session("RowIndex") = item.ItemIndex
            item.Selected = True
            rie.ImageUrl = "ShowImg.ashx?ID=" + CType(grTL.SelectedValues("ID"), String)
            Session("RowIndex") = CType(grTL.SelectedValues("ID"), String)
            rie.DataBind()

          
        End If

    End Sub

HANDLER:

Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        Dim my_Id As Int32
        If context.Request.QueryString("ID") IsNot Nothing Then
            my_Id = Convert.ToInt32(context.Request.QueryString("ID"))
            context.Response.ContentType = "image/png"
            context.Response.Buffer = True
            Dim strm As Stream = ShowEmpImage(my_Id)
            Dim bmp As Bitmap = New Bitmap(strm)
            bmp.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Png)
          
        End If
        
    End Sub

    Public Function ShowEmpImage(ByVal my_Id As Integer) As Stream
        Dim fs As Files = New Files()
        Dim fdata As FileData = fs.GetFile(my_Id)
        'Attachment property defined in Class  As Byte()
        If (fdata.Attachment IsNot Nothing) Then
            Return New MemoryStream(DirectCast(fdata.Attachment, Byte()))
        Else
            Return Nothing
        End If

    End Function

Vessy
Telerik team
 answered on 13 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?