Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
76 views
Hi,

Sub:  RadEditor: Problem with InsertLinks 

When I  select image or Links in editor and click on Insert Links extra space is adding below the selected image/Links.

Can Anyone help?

Thanks in Advance
Marin Bratanov
Telerik team
 answered on 21 Dec 2012
7 answers
361 views
Hi,

my approach is to backup files when a user loads up a file which already exists in the filesystem.
I took a look at the online documentation as well as in the DBContentProvider - but without meaningful documentation it would really mean a lot of time to figure out what parameters to pass where.

And if I see constructors with 7 parameters like for DirectoryItem it is pretty hard to develop something without documentation.
And by the way - the example (DBContentProvider) deals with slashes - as well for url's (normal) as for filepaths (where I would use backslashes for the file system).
A lot of parameter are simply give as string.Empty...

So the idea of writing an own provider is good - and since the FileExplorer does not offer server methods like the RadUpload to handle uploading (storing) files it seems to be the only possible method.
BUT - due to the poor documentation it is impossible for me to build such a thing within a timeframe that seems to be acceptable.

Is there any sample for a filesystem provider?

The approach is nothing less or more than:
If a file gets deleted - create a backup copy.
If a file will be overwritten - create a backup copy.

In http://www.telerik.com/community/forums/aspnet-ajax/file-explorer/select-a-file-in-code.aspx#792727 someone asked a member to provide code in the Code Library - but the Library does not even have a section for FileExplorer.

Regards

Manfred
Fiko
Telerik team
 answered on 21 Dec 2012
1 answer
694 views
I am getting this error

Sum is not supported for type "System.Object"

For testing purposes i am using one table only.

The table Design is

ProductID autonumber
ID  int
ProductName Varchar(100)
Price Varchar(150)

Then i also added DataType=DataType=System.Decimal then i get an error

A value of type 'String' cannot be converted to type 'Decimal?'


This is my ASPX code
 
<asp:Content ID="Content2" ContentPlaceHolderID="contentplaceholder1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All"
        EnableRoundedCorners="false" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="RadGrid1"
        Width="100%" AllowSorting="True"
        ShowFooter="True" PageSize="15" AllowPaging="True" AllowMultiRowSelection="True" ShowChooser="true"
        runat="server" GridLines="None" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="ObjectDataSource1">
        <MasterTableView Width="100%" Summary="RadGrid table" RetrieveAllDataFields="false"
            DataSourceID="ObjectDataSource1">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="Productid" HeaderText="Productid" DataType="System.Int32"
                    SortExpression="Productid">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="id" HeaderText="id" DataType="System.Int32" FilterControlAltText="Filter id column"
                    SortExpression="id" UniqueName="id">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" FilterControlAltText="Filter ProductName column"
                    SortExpression="ProductName" UniqueName="ProductName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Price" HeaderText="Price" SortExpression="Price" Aggregate="Sum" FooterText="Total price: ">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
    </telerik:RadGrid>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetListProduct"
        TypeName="Business.ProductManager"></asp:ObjectDataSource>
</asp:Content>




 
/////////////////////////////////////////////////////////////////////////
 public static ProductList GetListProduct()
        {
            ProductList tempList = null;
 
 
            string sql = "SELECT * from Product";
            //using (SqlConnection myConnection = new SqlConnection(AppConfig.ConnectionString))
            using (SqlConnection myConnection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["NLayer"].ConnectionString))
            {
                using (SqlCommand myCommand = new SqlCommand(sql, myConnection))
                {
                    myConnection.Open();
 
                    using (SqlDataReader myReader = myCommand.ExecuteReader())
                    {
                        if (myReader.HasRows)
                        {
                            tempList = new ProductList();
                            while (myReader.Read())
                            {
                                tempList.Add(FillDataRecordProduct(myReader));
                            }
                        }
                        myReader.Close();
                    }
                }
                return tempList;
 
            }
        }
 
 
 private static Product FillDataRecordProduct(IDataRecord myDataRecord)
        {
            Product myUserTracking = new Product();
 
            myUserTracking.Productid = myDataRecord.GetInt32(myDataRecord.GetOrdinal("Productid"));
            myUserTracking.id = myDataRecord.GetInt32(myDataRecord.GetOrdinal("id"));
            myUserTracking.ProductName = myDataRecord.GetString(myDataRecord.GetOrdinal("ProductName"));
 
            myUserTracking.Price = myDataRecord.GetString(myDataRecord.GetOrdinal("Price"));
 
 
            return myUserTracking;
        }

         



Eyup
Telerik team
 answered on 21 Dec 2012
4 answers
96 views
I am trying to save setting to SQL. It works fine until I recompile and then it falls apart.


Does anyone have an example of the GridSettingsPersister that uses the BinaryFormatter instead of the LosFormatter?

I am still unable to get the BinaryFormatter to work. Has anyone been able to get the GridSettingsPersister to work with the BinaryFormatter?

public override string ToString()
{
    //LosFormatter formatter = new LosFormatter();
    BinaryFormatter formatter = new BinaryFormatter();
 
 
    //using (StringWriter writer = new StringWriter())
    using (MemoryStream writer = new MemoryStream())
    {
        formatter.Serialize(writer, this);
        string arr = writer.ToString();
        return arr.ToString();
    }
}
 
 
 
 
/// <summary>
/// Gets the GridSettingsCollectionInstance from its serialized string data
/// </summary>
/// <param name="data">The object as serialized string data</param>
public static GridSettingsCollection LoadFromSerializedData(string data)
{
   //LosFormatter formatter = new LosFormatter();
   BinaryFormatter formatter = new BinaryFormatter();
 
    
   byte[] arr = System.Text.Encoding.ASCII.GetBytes(data);
   MemoryStream stream = new MemoryStream(arr);
 
   //return (GridSettingsCollection)formatter.Deserialize(data);
   return (GridSettingsCollection)formatter.Deserialize(stream);
 
    
}

Brad
Top achievements
Rank 2
 answered on 21 Dec 2012
14 answers
442 views
Hi all,
I have a page that has a radupload control on it. In the code behind we check to make sure the uploadedfiles collection has something in it before we attempt to process the uploaded file.

This works on every system in our dev environment except for one. We have tried copying the directory tree between systems, completely wiping the directory and starting from scratch, and checking every setting we can think of.

It does not use an AJAX post-back, the app is set to run Full Trust, and we are not changing the masterpageID in the init. 

Any ideas? banging my head against a wall on this one.

Patrick
Plamen
Telerik team
 answered on 21 Dec 2012
5 answers
254 views
Problem Firefox and google chrome. IE is working.
we are using radeditor version (2009.2.701.35) in vs.net 2008(asp.net) application.
we have scenario like to show a editor in ajax modal popup when on click button event.
modal popup shows editor with all tools defined(font dropdown,size dropdown like..)
then enter some content text into editor and try to change size or font name by selecting dropdowns nothing is open.
and when i hit save button inside modalpopup enterd content does not retained to in to the save click event.

I have also checked this with version 2010.1.519.35 latest version. but no luck.

this is very important and urgent . please provide any workaround to this.

thanks in advance.
Slav
Telerik team
 answered on 21 Dec 2012
3 answers
321 views

Hi,

I am using Sharepoint 2010. I have added the rad grid and i also added the radajax manager.

I would like to know the difference between "RadAjaxManager and RadScriptManager" and whcih should be used in sharepoint 2010?

Below is the radajax code i have used:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="radgrid1">
                        <UpdatedControls>
 <telerik:AjaxUpdatedControl ControlID="radgrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
<telerik:AjaxUpdatedControl ControlID="hdnRowsCount" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
                Width="75px" Transparency="25">
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
                    style="border: 0;" /></telerik:RadAjaxLoadingPanel>

Also, in the cs, i have manually added the ajax as below for sharepoint 2010:
RadAjaxManager ajaxmgr;
  
        protected override void CreateChildControls()
        {
            Control control = Page.LoadControl(_ascxPath);
            Controls.Add(control);
  
            RadAjaxLoadingPanel loadingPanel = control.FindControl("RadAjaxLoadingPanel1") as RadAjaxLoadingPanel;
            RadGrid grid = control.FindControl("radgrid1") as RadGrid;
            //Find more controls to add to the ajax settings
            if (ajaxmgr != null)
            {
                ajaxmgr.AjaxSettings.AddAjaxSetting(grid, grid, loadingPanel);
            }
  
        }
  
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            ajaxmgr = RadAjaxManager.GetCurrent(Page);
            if (ajaxmgr == null)
            {
                ajaxmgr = new RadAjaxManager();
                Page.Items.Add(typeof(RadAjaxManager), ajaxmgr);
            }
  
            if (Page.Form != null)
            {
                Page.Form.Controls.AddAt(0, ajaxmgr);
            }
            EnsureChildControls();
        }

Thanks
Maria Ilieva
Telerik team
 answered on 21 Dec 2012
1 answer
73 views
Hi,

I got a rad grid and a column which tried using the filter textbox. When I typed in the name and selected the "Contains" filter, an exception is thrown and it breaks at the following telerik code. Please help. I am not sure why it is bombing.

Telerik.Web.UI.GridFilterFunction.parse=

 

function(b,a){return(typeof b=="number")?b:Sys$Enum$parse.call(this,b,!!a);

 

};



Unhandled exception at line 3193, column 55 in http://localhost:19090/ScriptResource.axd?d=k62TwA9lIVL1DYh1_yahdvGdpToXcfYK8FuLsmPfwI_xLuse-EL6cMNkqgLdBIsX0-NS-Yr6mZXhBS4-c1db0SyByg9DvHR-9hEtEbmq1yoeOwgWF_v9aCiAL0gbx6bhyPmuGQAmBlm_IbfyURt9HQ2&t=6f22ca9b

0x800a1391 - Microsoft JScript runtime error: 'Sys$Enum$parse' is undefined

Kostadin
Telerik team
 answered on 21 Dec 2012
5 answers
132 views
Hi there, we have a weird behavior of the RadSplitter when the page is displayed in an iPad.
Basically, the page width keeps growing a couple of pixels per second (or so), thus overflowing on the right side.
Is this a known behavior (I hope so, we have this in two different applications)? Is there a workaround?
Thanks
Vessy
Telerik team
 answered on 21 Dec 2012
1 answer
98 views
We recently updated our Telerik controls, and in that, we lost the ability to select multiple items in the FileExplorer. We've tried these 4 settings, to no avail:

FileExplorer.Grid.AllowMultiRowSelection = true;
FileExplorer.Grid.AllowMultiRowEdit = true;
FileExplorer.FileList.AllowMultipleItemSelect = true;
FileExplorer.ListView.AllowMultiItemSelection = true;

Is there any other settings we need to set to re-enable multiselect in the FileExplorer?
Vessy
Telerik team
 answered on 21 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?