Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
277 views
I found out about this the hard way, so thought I would share my experience.  Using the RadTreeView version 2009 Q1, I was adding a node to a tree and setting its value on the client-side before committing my changes to the server, like so:

  tree.trackChanges();  
  ...  
  var childNode = new Telerik.Web.UI.RadTreeNode();  
  childNode.set_value(++lastNodeValue);           // lastNodeValue is an *integer* 
  parentNode.get_nodes().add(childNode);  
  ...  
  tree.commitChanges();  
 
 

on the client, and

  foreach (ClientOperation<RadTreeNode> operation in RadTreeView1.ClientChanges)  
  {  
    RadTreeNode node = operation.Item;  
    string nodeID = node.Value;       // DANGER! 
    ...  
  }  

on the server.  The last line, string nodeID = node.Value, was causing the following error to occur:

System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.String'.

After some investigation, I realised that I needed to cast the node ID to a string in the client-side code in order to avoid an error on the server!  This proved to be successful:

  tree.trackChanges();   
  ...   
  var childNode = new Telerik.Web.UI.RadTreeNode();  
  // cast lastNodeValue to a *string* to avoid a server-side error 
  childNode.set_value((++lastNodeValue).toString()); 
  parentNode.get_nodes().add(childNode);   
  ...   
  tree.commitChanges();   
  

Maybe in the next release the client-side set_value() function could automatically cast its argument to a string?  Having said that, I don't remember seeing this error in 2008 Q3, so maybe there's a bug somewhere.

Cheers

Ed Graham
Ed
Top achievements
Rank 1
 asked on 05 Jun 2009
1 answer
84 views
Hi!
I have a datetime datetimecolumn where I have enabled filtering (AllowFiltering = true). I don't want users to see the filters (ShowFilterIcon = false) so I have disabled this feature. I have also bounded to the ItemCommand event.

The datepicker is opening perfect when i want to filter for a specific date. The event is also raised on the server side.
The problem is if I clear the textfield with the keyboard a postback is made but no call to the event ItemCommand is raised. Is there something I have missed?

Best Regards Erik
Rosen
Telerik team
 answered on 05 Jun 2009
4 answers
493 views
Format of the initialization string does not conform to specification starting at index 0.

My Web.config looks like this



<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
    <configSections>
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                </sectionGroup>
            </sectionGroup>
        </sectionGroup>
    </configSections>
    <appSettings/>
    <connectionStrings/>
    <system.web>
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.
        -->
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
        <authentication mode="Windows"/>
        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
        <pages>
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </controls>
        </pages>
    <httpHandlers>
       <remove path="*.asmx" verb="*" />
       <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          validate="false" />
       <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          validate="false" />
       <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          validate="false" />
       <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.3.1105.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
          validate="false" />
    </httpHandlers>
        <httpModules>
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </httpModules>
    </system.web>
    <system.codedom>
        <compilers>
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5"/>
                <providerOption name="OptionInfer" value="true"/>
                <providerOption name="WarnAsError" value="false"/>
            </compiler>
        </compilers>
    </system.codedom>
    <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules>
            <remove name="ScriptModule"/>
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </modules>
        <handlers>
            <remove name="WebServiceHandlerFactory-Integrated"/>
            <remove name="ScriptHandlerFactory"/>
            <remove name="ScriptHandlerFactoryAppServices"/>
            <remove name="ScriptResource"/>
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        </handlers>
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>

Plz help
Thanks
Regards
N.Balaji
Atanas Korchev
Telerik team
 answered on 05 Jun 2009
3 answers
193 views
I am opening radwindow from a page.
i have placed a button called cancel on radwindow.
but when i click on it i get this message ..

"To display the webpage again, Internet explorer needs to resnd the Information you've previously submitted. If you were making a purchase ......"

i have called this script to close window.

function SubmitPage()

 

{

GetRadWindow().BrowserWindow.location.reload();

GetRadWindow().BrowserWindow.SubmitPage();

}
as i want to retain the values that i have filled in parent page after closing rad window.
Please Help..

Shinu
Top achievements
Rank 2
 answered on 05 Jun 2009
1 answer
131 views
Hi Everyone,

I am wondering if it's possible to have childgrids at he same level but with different columns kind of:


 ID        |    NAME  
                 
    1          Name1  
 
           -        Column1    | Column2  
                     data           data  
 
    2          Name2  
 
           -        Column3    | Column4  
                      data          data  
 
    3                Name3  
 
           -        Column1    |    Column3    |    Column4  
                      data            data           data 

Column1, Column2, Column3 and Column4 are the same in each childgrid

   In fact each childgrid would be independant from the others in terms number of columns. Some column would show and other wouldn't depending of the data in the database (if N/A the column doen't show for that childgrid)

I am changing the datatable  for each childgrid (because they are different) DetailTableDataBind but the columns generated doesn't maps the datatable.

Right now every childgrid is following the pattern of the first chidlgrid leaving blank field even if the column is not in the datatable.

 ID        |    NAME     
                    
    1          Name1     
    
           -        Column1    | Column2     
                     data           data     
    
    2          Name2     
    
           -        Column1    | Column2    |   Column3    |    Column4     
                                                  data          data     
    
    3                Name3     
    
           -        Column1    | Column2    |   Column3    |    Column4     
                      data                        data           data    
 



I hope i am clear enough

Thank you

Regis
Veli
Telerik team
 answered on 05 Jun 2009
1 answer
256 views

Inside the OnExcelExportCellFormatting instead of having to assign the "UniqueName":

if (e.FormattedColumn.UniqueName == "Freight")
{
  e.Cell.Style["mso-number-format"] = @"0";
}

Could we not Style all the datatype fields of date be automatically formated to the date format that you want?

Daniel
Telerik team
 answered on 05 Jun 2009
1 answer
67 views
I am using the 2009 Q1 build of the editor control within a DotNetNuke 4.9.3 website.

I added the AJAX Spellchecker button to the editor's toolbar but when I run the site and click on that button, the Finish spellcheking and "Cancel" buttons remain grayed out and I get a javascript error that says:

Cannot
deserialize. The data does not correspond to valid JSON

I've seen other posts on this, and have tried some workarounds, but none correct this issue.

How do I get the spellcheck functionality to work?

Thx,

Jason
Rumen
Telerik team
 answered on 05 Jun 2009
1 answer
104 views
We are having serious problems exporting data to CSV and Excel using the built in functions.  We may be wishing to export upto 100000 rows of data with file sizes between 10 and 100 MBytes.   We keep getting System.OutOfMemory Exceptions.   We are aware that data exports of this size may take some time to download, but our clients need them.  

Have you any plans to improve your data export functionality in the near future or should we investigate alternate routes?  It is clear from reviewing comments such as these:

http://www.telerik.com/community/forums/aspnet-ajax/grid/problem-to-export-to-excel.aspx

http://www.telerik.com/community/forums/aspnet-ajax/grid/system-outofmemoryexception.aspx

that there is an acknoweged problem; could you also give some guidance as to what a reasonable file size for generating from your export functions would be?

Simon
Bruno
Top achievements
Rank 2
 answered on 05 Jun 2009
2 answers
178 views
Hey

I'm adding a textbox and a button codebehind using a <asp:Table>. I'm using RadAjaxPanel, but when i push the button i don't get a ajax postback. If i put the button in the aspx file, everything works fine. How can i resolv this?
rtk
Top achievements
Rank 1
 answered on 05 Jun 2009
1 answer
140 views
hello ... when i use the editor in default tools mode, it give me the word / character count ... cool. however when i look at the two full sets of menus from telerik, I don't see that in the xml file anywhere... so how to do it? I found the article on custom word/char counts.. 
http://www.telerik.com/support/kb/aspnet-ajax/editor/implementing-custom-word-character-counter.aspx but when you have more than one editor on the page, it starts to get messy to deal with.
How would I implement a counter that will deal with multiple editors on one page? It would be nice if we could embed it into the editor box like when we use default.

thanks
mac
Rumen
Telerik team
 answered on 05 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?