Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
Getting the following error:

System.InvalidCastException: Conversion from string "{"UniqueName":"dckOrderHistory"," to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format. at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) --- End of inner exception stack trace --- at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value) at Dealers_Toolbox_portal.RetrievePortalState() in D:\Net Folders\Development Web Sites\Smoker\Dealers\Toolbox\portal.ascx.vb:line 51

Here is the value stored in the database:
{"UniqueName":"dckOrderHistory","DockZoneID":"ctl00_ContentPlaceHolder1_RadDock_RadDockZone1","Width":"300px","Height":"","ExpandedHeight":"0","Top":"0px","Left":"0px","Resizable":"False","Closed":"False","Collapsed":"False","Pinned":"False","Title":"Order History","Text":"","Tag":"~/Dealers/Toolbox/PortalControls/OrderHistory.ascx","Index":"1"}|{"UniqueName":"dckBrowseBoats","DockZoneID":"ctl00_ContentPlaceHolder1_RadDock_RadDockZone1","Width":"300px","Height":"","ExpandedHeight":"0","Top":"0px","Left":"0px","Resizable":"False","Closed":"False","Collapsed":"False","Pinned":"False","Title":"Browse Boats","Text":"","Tag":"~/Dealers/Toolbox/PortalControls/BrowseBoats.ascx","Index":"0"} 

Here is the code: (Line 51 is the Deserialize line)  What am I doing wrong?  Thanks!







Dim lDockState As New List(Of DockState) 
Dim sDockState() As String = oRdr.Item("PortalState").ToString.Split("|"c) 
 
For Each i As String In sDockState 
     Dim state As DockState = DockState.Deserialize(sDockState(i)) 
     lDockState.Add(state) 
Next 
 
RetrievePortalState = lDockState 
Pero
Telerik team
 answered on 30 Jul 2009
3 answers
130 views
Hello,
In the page_load event I set the RADEditors on that page to enabled = false if some conditions are fulfilled. The reason is that sometimes the user is only allowed to read the content of the editors. The content comes from the database.
The problem is that the lay out of the editors is gone, only the content is shown and because there are no scroll bars, the height of the editor is too big. How can I get scrollbars around the editors or keep the normal lay out in this situation? I use RADControls for ASPNET AJAX Q2

Thanks in advance,
Barbara
Rumen
Telerik team
 answered on 30 Jul 2009
1 answer
107 views
Hello,

I am using the RadEditor is a Publishing Pages scenario and it workd beutifully. However, when I use a Dataview webpart to trieve field content entered with the "AllowSpecialTags" attribute enabled The page renders the following markup;

<pre style="display:none" id=RadEditorEncodedTag>PGVtYmVkIHNyYz0iaHR0cDovL3d3dy55b3V0dWJlLmNvbS92L1M4YkxqSU1YM2JFJmFtcDtobD1lbiZhbXA7ZnM9MSZhbXA7IiB3aWR0aD0iMzIwIiBoZWlnaHQ9IjI2MCIgdHlwZT0iYXBwbGljYXRpb24veC1zaG9ja3dhdmUtZmxhc2giIGFsbG93c2NyaXB0YWNjZXNzPSJhbHdheXMiIGFsbG93ZnVsbHNjcmVlbj0idHJ1ZSIgLz4 

I realize this markeup must be encoded somehow so that SharPoint will not strip out special tags, attributes, and scripts. So is there a way, using a dataview webpart, to display the content entered using the RadEditor control?

Thank you in advance, any help is appreciated.
Stanimir
Telerik team
 answered on 30 Jul 2009
1 answer
63 views
Recently I noticed that under IE7 if I ctrl+click dates within a radcalendar supporting multiple selection a new tab window will open as if a link was clicked.  I do not get this when using FF 3.5, but unfortunately most of my users are in IE 7.

As an example, go to the Telerik Calendar "First Look" page.  If you Ctrl+click on the calendar, a new tab should NOT appear.  Now, unclick any of the check boxes shown.  Ctrl+click a new date and a new tab DOES appear.

Now, I have only noticed this under IE7, but it may occur in other versions of IE7.  I am looking for a way to stop this behavior as many users commonly use the Ctrl+click to select multiple dates (even though it is not required with this control).

Any suggestions?
Pavel
Telerik team
 answered on 30 Jul 2009
1 answer
130 views
Hi,

I'm using the editor in lists and have some columns defined as Rich Text and some as Enhanced Rich Text.  I want to be able to restrict the Enhanced Rich Text (which will be used just for simple HTML) much more than the Rich Text columns in terms of toolbar options.  However, if I remove the BasicToolBar buttons they disappear from the Rich Text as well as the EnhancedRichText toobars.  Essentially, I would like only the EnhancedToolbar to appear for thet EnhancedRichText and only the BasicToolbar for the standard Rich Text.

Is there a way of doing this?

Thanks.
Stanimir
Telerik team
 answered on 30 Jul 2009
2 answers
151 views
Has anyone encountered an alert 'Cannot write to the target folder'? We are and are puzzled. If anyone can shed some light on this, that would be great as I have a client yelling at me. Thanks.
Lini
Telerik team
 answered on 30 Jul 2009
3 answers
150 views
Hi,

I have a radgrid for which allowcolumnfiltering will be managed by a radio button Yes. if the user clicks on Yes then filtering on column should be enabled. I am facing an issue when custom filtering on column is on by clicking on radio button Yes.

When I give value to a column and click on filter button, the filter options(EqualTo,NotEqualTo....) is display as text on the response. I made EnableAjaxSkinRendering property to true but still the issue persists.

Everything works perfectly when i remove radiobutton updates from RadAjaxManager.

Please find code below.

thanks,
Mahesh


Default.aspx

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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 runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

                <asp:ScriptManager ID="scrp" runat="server"></asp:ScriptManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
        <img id="imgid" src="images/loading.gif" alt="Loading" />
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
        <AjaxSettings>
           
             <telerik:AjaxSetting AjaxControlID="radioYes">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
              <telerik:AjaxSetting AjaxControlID="radioNo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
          
                <span>Column filter</span>
                <asp:RadioButton ID="radioYes" runat="server" GroupName="ColumnFilter" Text="Yes"
                    AutoPostBack="true" OnCheckedChanged="radioYes_CheckedChanged" />
                 <asp:RadioButton ID="radioNo" runat="server" GroupName="ColumnFilter" Text="No" AutoPostBack="true"
                     OnCheckedChanged="radioNo_CheckedChanged" />
    
            <telerik:RadGrid ID="radGrid" runat="server" AutoGenerateColumns="true" AllowPaging="true"
                 PageSize="5" EnableAjaxSkinRendering="true"
                Skin="Office2007">
                <PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" />
            </telerik:RadGrid>
    </div>
    </form>
</body>
</html>



Default.aspx.cs

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.Web.UI;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadRadGrid();
        }

    }

    protected void radioNo_CheckedChanged(object sender, EventArgs e)
    {
        this.radGrid.AllowFilteringByColumn = true;

    }

    protected void radioYes_CheckedChanged(object sender, EventArgs e)
    {
        this.radGrid.AllowFilteringByColumn = false;

    }

    private void LoadRadGrid()
    {
        

        this.radGrid.DataSource = GetDataTable();
        this.radGrid.DataBind();
    }

    private DataTable GetDataTable()
    {
        DataTable dt = new DataTable();
        dt.Columns.Add(new DataColumn("ID"));
        dt.Columns.Add(new DataColumn("Name"));
        dt.Columns.Add(new DataColumn("Marks"));

        DataRow dr = dt.NewRow();
        dr["ID"] = 1;
        dr["Name"] = "Mahesh";
        dr["Marks"] = 100;
        dt.Rows.Add(dr);

        dr = dt.NewRow();
        dr["ID"] = 2;
        dr["Name"] = "Rajesh";
        dr["Marks"] = 55;
        dt.Rows.Add(dr);

        dr = dt.NewRow();
        dr["ID"] = 3;
        dr["Name"] = "Kishore";
        dr["Marks"] = 89;
        dt.Rows.Add(dr);

        dr = dt.NewRow();
        dr["ID"] = 4;
        dr["Name"] = "Sasi";
        dr["Marks"] = 44;
        dt.Rows.Add(dr);

        dr = dt.NewRow();
        dr["ID"] = 5;
        dr["Name"] = "Kamesh";
        dr["Marks"] = 78;
        dt.Rows.Add(dr);

        return dt;
    }

}







Iana Tsolova
Telerik team
 answered on 30 Jul 2009
1 answer
87 views
Hello, Telerik!
I have Telerik.Web.UI grid in my project and i want to export data from this grid. But isn't worked!
Then i change grid to Telerik.WebControls and export is worked!!! But Telerik.WebControls don't have Aggregate property which is very necessary for me!
Help me how i can use Telerik.WebControls grid with export to Excel and Aggregate property
THanks
Pavlina
Telerik team
 answered on 30 Jul 2009
4 answers
104 views
Dear,

I have a problem with Internet Explorer 7 using in the same page the following controls :

RadWindowManager
RadAjaxManager
RadGrid

For Example, if I do a sort in the grid, it appears on the top of the page an empty space.
It is all right  with Safari and Firefox.
If I remove a control RadWindowManager or RadAjaxManager, it is all right.


Controls version: 2009_1_311

My sample:

 

<telerik:RadScriptManager ID="RadScriptManager" Runat="server">

 

 

</telerik:RadScriptManager>

 

 

 

<telerik:RadWindowManager ID="RadWindowManager" runat="server" EnableEmbeddedSkins="true" Skin="Default"

 

 

VisibleStatusbar="False" Behavior="Reload,Move,Resize" Height="500px" Width="700px" Title=""

 

 

Animation="Resize" Modal="false">

 

 

</telerik:RadWindowManager>

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager" runat="server"

 

 

DefaultLoadingPanelID="RadAjaxLoadingPanel">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="form1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadWindowManager"

 

 

LoadingPanelID="RadAjaxLoadingPanel" />

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid_Users" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

 

 

<telerik:RadGrid ID="RadGrid_Users" runat="server" AllowPaging="True"

 

 

AllowSorting="True" AutoGenerateColumns="False" GridLines="None" Skin="Default"

 

 

EnableEmbeddedSkins="true" PageSize="4" >

 

 

<HeaderContextMenu>

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</HeaderContextMenu>

 

 

<MasterTableView DataKeyNames="Id" Name="MasterTable" CellSpacing="-1">

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<DetailTables>

 

 

<telerik:GridTableView runat="server" AllowPaging="False" AllowSorting="False"

 

 

DataMember="Detail" ShowHeader="False" Name="Detail" Height="100%"

 

 

Width="100%" PageSize="10">

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn UniqueName="DetailHolder">

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

<EditFormSettings>

 

 

<EditColumn CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif"

 

 

InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif">

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

<ExpandCollapseColumn Visible="True">

 

 

</ExpandCollapseColumn>

 

 

<EditFormSettings>

 

 

<EditColumn CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif"

 

 

InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif">

 

 

</EditColumn>

 

 

</EditFormSettings>

 

 

<PagerStyle Mode="NextPrev" />

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

<FilterMenu>

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 



Thanks
Iana Tsolova
Telerik team
 answered on 30 Jul 2009
2 answers
351 views
Hello ;

I want to do a page like this. But when I update a row get this 'Incorrect syntax near '?'.' error. It's highly because of my SqlDataSource
but I can't find the reason of the error. Here is my codes...

 <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
            AllowSorting="True" DataSourceID="SqlDataSource1" PageSize="20" ShowGroupPanel="True"
            Skin="Web20" AllowMultiRowSelection="False" GridLines="None" AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="modul_kodu, ekran_kodu"
                DataSourceID="SqlDataSource1" Caption="Ekran Tanımları">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Eminmisiniz ?"
                        ConfirmTitle="Kayıt Silme" Text="Delete" UniqueName="Deletecolumn" />
                        
                    <telerik:GridBoundColumn DataField="modul_kodu" HeaderText="modul_kodu" ReadOnly="True"
                        SortExpression="modul_kodu" UniqueName="modul_kodu">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ekran_kodu" HeaderText="ekran_kodu" ReadOnly="True"
                        SortExpression="ekran_kodu" UniqueName="ekran_kodu">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="window_adi" HeaderText="window_adi" SortExpression="window_adi"
                        UniqueName="window_adi">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ekran_adi" HeaderText="ekran_adi" SortExpression="ekran_adi"
                        UniqueName="ekran_adi">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ekran_adi_e" HeaderText="ekran_adi_e" SortExpression="ekran_adi_e"
                        UniqueName="ekran_adi_e">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ekran_adi_f" HeaderText="ekran_adi_f" SortExpression="ekran_adi_f"
                        UniqueName="ekran_adi_f">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ekran_adi_d" HeaderText="ekran_adi_d" SortExpression="ekran_adi_d"
                        UniqueName="ekran_adi_d">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Ekran_tipi" HeaderText="Ekran_tipi" SortExpression="Ekran_tipi"
                        UniqueName="Ekran_tipi">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ust_ekran_kodu" HeaderText="ust_ekran_kodu" SortExpression="ust_ekran_kodu"
                        UniqueName="ust_ekran_kodu">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn UniqueName="EditCommandColumn1" >
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="True" >
            </ClientSettings>
            <StatusBarSettings LoadingText="Yükleniyor..." ReadyText="Hazır" />
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DEMOConnectionString %>"
            SelectCommand="SELECT modul_kodu, ekran_kodu, window_adi, ekran_adi, ekran_adi_e, ekran_adi_f, ekran_adi_d, ekran_tipi, ust_ekran_kodu FROM [sisekr]"
            InsertCommand="INSERT INTO [sisekr] (modul_kodu, ekran_kodu, window_adi, ekran_adi, ekran_adi_e, ekran_adi_f, ekran_adi_d, ekran_tipi, ust_ekran_kodu) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)"
            UpdateCommand="UPDATE [sisekr] SET [window_adi] = ? , [ekran_adi] = ?, [ekran_adi_e] = ? , [ekran_adi_f] = ? , [ekran_adi_d] = ? , [ekran_tipi] = ? , [ust_ekran_kodu] = ? WHERE [modul_kodu] = ? [and ekran_kodu] = ? "
            DeleteCommand="DELETE [sisekr] WHERE [modul_kodu] = ? and [ekran_kodu] = ?"
            ProviderName="System.Data.SqlClient" DataSourceMode="DataSet"  DeleteCommandType="Text" UpdateCommandType="Text" InsertCommandType="Text">
            <InsertParameters>
                <asp:Parameter Name="modul_kodu" Type="String" />
                <asp:Parameter Name="ekran_kodu" Type="String" />
                <asp:Parameter Name="window_adi" Type="String" />
                <asp:Parameter Name="ekran_adi" Type="String" />
                <asp:Parameter Name="ekran_adi_e" Type="String" />
                <asp:Parameter Name="ekran_adi_f" Type="String" />
                <asp:Parameter Name="ekran_adi_d" Type="String" />
                <asp:Parameter Name="ekran_tipi" Type="String" />
                <asp:Parameter Name="ust_ekran_kodu" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="window_adi" Type="String" />
                <asp:Parameter Name="ekran_adi" Type="String" />
                <asp:Parameter Name="ekran_adi_e" Type="String" />
                <asp:Parameter Name="ekran_adi_f" Type="String" />
                <asp:Parameter Name="ekran_adi_d" Type="String" />
                <asp:Parameter Name="ekran_tipi" Type="String" />
                <asp:Parameter Name="ust_ekran_kodu" Type="String" />
                <asp:Parameter Name="modul_kodu" Type="String" />
                <asp:Parameter Name="ekran_kodu" Type="String" />
            </UpdateParameters>
            <DeleteParameters>
                <asp:Parameter Name="modul_kodu" Type="String" />
                <asp:Parameter Name="ekran_kodu" Type="String" />
            </DeleteParameters>
        </asp:SqlDataSource>

Besides, the example uses sds:SessionDataSource. is it the reason of the error ?

Thanks

burak
Top achievements
Rank 1
 answered on 30 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?