Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
247 views

I'm getting a "Specified cast is not valid" error related to a checkbox on my Advanced Edit form in Scheduler.

The database field is a bit type.

Here is the code...

ASPX:

            <table cellpadding="0" cellspacing="0" border="0">  

                <tr> 

                    <td><b>Title</b></td>  

                    <td>&nbsp;</td> 

                </tr> 

                <tr> 

                    <td><asp:TextBox runat="server" ID="EventTitleTemp" Text='<%# Eval("EventTitle") %>' Width="240px"></asp:TextBox></td>  

                    <td><div style="margin-bottom:3px;"><asp:CheckBox runat="server" ID="EventActiveTemp" Checked='<%# Convert.ToBoolean(Eval("EventActive")) %>' style="padding: 0em; margin: 0em; vertical-align: middle;"></asp:CheckBox> Active</div></td>  

                </tr> 

            </table> 

Code Behind:

        [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]  

        public bool EventActive  

        {  

            get  

            {  

                return EventActiveTemp.Checked;  

            }  

 

            set  

            {  

                EventActiveTemp.Checked = value;  

            }  

        } 

Am I missing something? Doing this totally wrong? Any help would be appreciated.

Peter
Telerik team
 answered on 15 Jan 2009
9 answers
249 views
Hello,

I love these controls, they look great.

I am wondering one thing while I am using these controls. I currently am not so concerned with the start date as I am about the day that the appointment is set to start on. As such, I want them to be stacked from the top of the various views (I am currently only using monthly and timeline view).

I only have 4 appointments to show in the monthly view, then the user is to select more in order to go to the timeline view to see additional tasks for that day and the next few. However, if the appointments for that day in the monthly view fall out of the standard times, all you see is the 'more' link. Then, selecting timeline you see the appointments shifted down in the middle of the view.

Is there any way to have all the appointments simply stack in scheduler?

Thanks,

- Craig
Peter
Telerik team
 answered on 15 Jan 2009
0 answers
111 views
Hi,

When I try and set the SelectedValue by using Bind in the .aspx page, if the value isn't found in the list it (quite rightly) throws an exception. See example below:

<telerik:RadComboBox ID="rcbSalesPersons" DataSourceID="odsSalesPerson" runat="server"  
  Filter="Contains" DataTextField="Description" DataValueField="ValueID" 
  SelectedValue='<%# Bind("SalesPersonID") %>'  EmptyMessage="Select a Sales Person...">                                                                                                                                                                                                         
</telerik:RadComboBox>                                
 

Is there any way to suppress this exception if I don't care that the value isn't in the list? I know I can do it in the code behind, I just want to know what my options are.


Rick
Top achievements
Rank 1
 asked on 15 Jan 2009
3 answers
153 views
I want to  expand the node by Code,
In Microsoft's WebControl, I expand the node is example.

node.expand();

 in the telterik, i am not finded the method,

I set the ExpandMode of property is TreeNodeExpandMode.ServerSide and expand the node after loading.example

 rootNode.ExpandMode = TreeNodeExpandMode.ServerSide; ;

trvwNewTree.Nodes.Add(rootNode);

            //rootNode.ExpandChildNodes();

  rootNode.Expanded = true;

I also used the note code, but i fonded is not useful.

other:
I found the + is to - while using exmaple front code.

After loading the rootNode,the child is empty. I want to use the "  rootNode.Expanded = true;" to fire the NodeExpand event, In this event is the code to load the child node.

thank you

fan
Top achievements
Rank 1
 answered on 15 Jan 2009
1 answer
245 views
Hi,

I have created a rad treeview (2008.2.723.35) which is fully populated at server side with 1500 nodes approx.
The checkboxes are enabled for the nodes.
Now when i try to load this control on the page it takes hell of time.
I can't make the treeview load on demand as there is one one level in the treeview.
I have also seen that there is a javacript emebbeded in the html of page attached with the Page initialization at client side.
This javascript contains the JSON object of individual nodes.
What i think is that server side actually send the JSON object from server side and create a javascript with these JSON object and links it with client side Page Initialization.When the client side event takes place then this javascript is fired which picks up the JSON object and creates the Rad node at client side and renders them on the page.
If not then can anyone help me how this works and what can be possible solution to resolve this issue.

One more thing i can see the page loading faster in Firefox so i am assuming  that there is some issue in jvascript of Rad treeview.But our client has only IE 7.
Please help me regarding this issue and provide me with some insight of how the nodes are rendered for rad treeview on html side.

Regards,
Aayam Singh
Aayam
Top achievements
Rank 1
 answered on 15 Jan 2009
2 answers
400 views
I have a RadPanelBar that is having issues rendering it's skin completely. I am using a RadScriptManager in this page (it is a master page) yet all css classes for the PanelBar are referencing the regular WebResource.axd page and not the Telerik.Web.UI.Webresource.axd. Im running 2008 Q2. I have checked and rechecked my web.config (AJAX runs correctly) it is just the issues with the PanelBar not getting the appropriate skin CSS classes. Here is my web.config for review but does anyone have any other ideas?

<?xml version="1.0"?>  
<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" /> 
        </sectionGroup> 
      </sectionGroup> 
    </sectionGroup> 
  </configSections> 
 
  <appSettings> 
  </appSettings> 
  <connectionStrings> 
  </connectionStrings> 
  <system.web> 
    <httpHandlers> 
      <remove verb="*" path="*.asmx"/>  
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>  
      <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" /> 
    </httpHandlers> 
    <httpRuntime executionTimeout="1000" maxRequestLength="102400" requestLengthDiskThreshold="8192"/>  
    <!-- 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.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
      </assemblies> 
    </compilation> 
    <authentication mode="Forms">  
      <forms loginUrl="~/Login.aspx" protection="All" defaultUrl="~/Default.aspx" timeout="1440"/>  
    </authentication> 
    <authorization> 
      <deny users="?"/>  
    </authorization> 
    <membership defaultProvider="SecurityMembershipProvider">  
      <providers> 
      </providers> 
    </membership> 
 
       <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> 
      
    <httpModules> 
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
          </httpModules> 
  </system.web> 
    
  <location path="register.aspx">  
    <system.web> 
      <authorization> 
        <allow users ="*" /> 
      </authorization> 
    </system.web> 
  </location> 
  <location path="terms.aspx">  
    <system.web> 
      <authorization> 
        <allow users ="*" /> 
      </authorization> 
    </system.web> 
  </location> 
  <location path="Telerik.Web.UI.WebResource.axd">  
    <system.web> 
      <authorization> 
        <allow users="*"/>  
      </authorization> 
    </system.web> 
  </location> 
 
  <system.codedom> 
    <compilers> 
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">  
        <providerOption name="CompilerVersion" value="v3.5"/>  
        <providerOption name="WarnAsError" value="false"/>  
      </compiler> 
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">  
        <providerOption name="CompilerVersion" value="v3.5"/>  
        <providerOption name="OptionInfer" value="true"/>  
        <providerOption name="WarnAsError" value="false"/>  
      </compiler> 
    </compilers> 
  </system.codedom> 
 
  <system.web.extensions> 
    <scripting> 
      <webServices> 
        <!-- Uncomment this line to customize maxJsonLength and add a   
         custom converter --> 
        <!--  
      <jsonSerialization maxJsonLength="500">  
        <converters> 
          <add name="ConvertMe"   
             type="Acme.SubAcme.ConvertMeTypeConverter"/>  
        </converters> 
      </jsonSerialization> 
      --> 
        <!-- Uncomment this line to enable the authentication service.   
           Include requireSSL="true" if appropriate. --> 
        <!--
      <authenticationService enabled="true" requireSSL = "true|false"/>
      --> 
 
        <!-- Uncomment these lines to enable the profile service. To   
           allow profile properties to be retrieved  
           and modified in ASP.NET AJAX applications, you need to add   
           each property name to the readAccessProperties and  
           writeAccessProperties attributes. --> 
        <!--  
      <profileService enabled="true" 
        readAccessProperties="propertyname1,propertyname2" 
        writeAccessProperties="propertyname1,propertyname2" /> 
      --> 
      </webServices> 
      <!--   
    <scriptResourceHandler enableCompression="true"   
        enableCaching="true" /> 
    --> 
    </scripting> 
  </system.web.extensions> 
 
  <system.webServer> 
    <validation validateIntegratedModeConfiguration="false"/>  
    <modules> 
      <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"/>  
      <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" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>  
      <add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" /> 
    </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> 
 

Here is my aspx...

<%@ Master Language="C#" AutoEventWireup="true" Inherits="TriMain" 
    CodeBehind="TriMain.master.cs" %> 
 
<%@ 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" runat="server">  
    <title></title>  
    <link rel="SHORTCUT ICON" href="/favicon.ico" /> 
    <link href="App_Themes/portal.css" rel="stylesheet" type="text/css" /> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" /> 
 
<telerik:RadSplitter ID="RadSplitterMain" runat="server" Width="100%" Height="100%">  
            <telerik:RadPane ID="LeftPane" runat="server" Width="179" Scrolling="None" MinWidth="179" 
                EnableViewState="true">  
                <telerik:RadPanelBar ID="LeftPanelBar" runat="server" Width="100%" Skin="Sunset">  
                    <ExpandAnimation Type="InOutSine" /> 
                </telerik:RadPanelBar> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="RadSplitbarMain" runat="server" CollapseMode="Forward" SkinID="Office2007">  
            </telerik:RadSplitBar> 
            <telerik:RadPane ID="ContentPane" runat="server" Width="100%" MinWidth="1000" BackColor="#ffffff">  
                <div id="TH_Content">  
                    <asp:ContentPlaceHolder ID="PlaceHolderMainContent" runat="Server">  
                        <!-- Content Goes Here --> 
                          
                    </asp:ContentPlaceHolder> 
                </div> 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
 
    </form> 
</body> 
</html> 


thank you in advance for any ideas.

j
Atanas Korchev
Telerik team
 answered on 15 Jan 2009
2 answers
76 views
    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
    { 
        if (e.CommandName == "Delete"
        { 
            string ActionType = "DELETE"
            string Username = Session["Username"].ToString(); 
            string ServiceTypeName = "Website"
            string ServiceName; 
            string Fields; 
            string DateInserted = DateTime.Now.TimeOfDay.ToString(); 
 
            //Setup parameters from RadGrid columns 
            GridDataItem dataformItem = (GridDataItem)e.Item; 
            DataBoundLiteralControl txtbxClientId = (DataBoundLiteralControl)dataformItem["Client"].Controls[0]; 
            string ClientId = txtbxClientId.Text; 
            DataBoundLiteralControl txtbxServerId = (DataBoundLiteralControl)dataformItem["Server"].Controls[0]; 
            string ServerId = txtbxServerId.Text; 
            TableCell txtbxWebsiteUrl = (TableCell)dataformItem["WebsiteUrl"]; 
            string WebsiteUrl = txtbxWebsiteUrl.Text; 
            TableCell txtbxLogFilePath = (TableCell)dataformItem["LogFilePath"]; 
            string LogFilePath = txtbxLogFilePath.Text; 
            TableCell txtbxBandWidthCost = (TableCell)dataformItem["BandWidthCost"]; 
            string BandWidthCost = txtbxBandWidthCost.Text; 
            DataBoundLiteralControl txtbxChargeTypeId = (DataBoundLiteralControl)dataformItem["Charge"].Controls[0]; 
            string ChargeTypeId = txtbxChargeTypeId.Text; 
            TableCell txtbxAmount = (TableCell)dataformItem["Amount"]; 
            string Amount = txtbxAmount.Text; 
            TableCell txtbxBandWidthLimit = (TableCell)dataformItem["BandWidthlimit"]; 
            string BandWidthLimit = txtbxBandWidthLimit.Text; 
            CheckBox chkbxSqlDataBase = (CheckBox)dataformItem["SqlDatabase"].Controls[0]; 
            if (chkbxSqlDataBase.Checked == true
            { 
                chkbxSqlDataBase.Text = "1"
            } 
            else 
            { 
                chkbxSqlDataBase.Text = "0"
            } 
            string SqlDataBase = chkbxSqlDataBase.Text; 
            TableCell txtbxSqlMbLimit = (TableCell)dataformItem["SqlMbLimit"]; 
            string SqlMbLimit = txtbxSqlMbLimit.Text; 
            TableCell txtbxMbCharge = (TableCell)dataformItem["MbCharge"]; 
            string MbCharge = txtbxMbCharge.Text; 
 
            //Setup concatanated Fields parameter. 
            Fields = string.Format("{0};{1};{2};{3};{4};{5};{6};{7};{8};{9};{10}", ClientId, ServerId, WebsiteUrl, LogFilePath, BandWidthCost, ChargeTypeId, Amount, BandWidthLimit, SqlDataBase, SqlMbLimit, MbCharge); 
            ServiceName = WebsiteUrl; 
 
            //Execute Audit SP and pass through parameters 
            //LINQ 
            cknetispservicesDataContext db = new cknetispservicesDataContext(); 
            var testDs = db.spAudit(ActionType, Username, ServiceTypeName, ServiceName, Fields, Convert.ToDateTime(DateInserted)); 
        } 
    } 
 
Any idea why my sp  writes everything to my table in the database except for the "Fields" param?
The SP is fine i'm positive.
I had a breakpoint and i can see that all the information is there and the string is concatenated correctly.
I even ran a SQL profiler and can see the fields string in the stored procedure but still nothing is written to the fields column, other coumns are being written to perfectly.
Darren
Top achievements
Rank 2
 answered on 15 Jan 2009
3 answers
128 views
Hello,

I have the lite editor working in my WSS 3 site, but I noticed a small issue.

I uploaded a 1024x1024 JPG that's about 134 KB. When I use the editor to create a thumbnail (200x200), the created thumbnail's file size is larger than the original file! The thumbnail has a file size of 213 KB.

My guess is that the original JPEG was created using a low quality setting and that RAD Editor created the thumbnail using a higher quality setting.

Is there a way to change a global setting for image resizing, or to expose a control that allows users to specify the level of quality when creating the thumbnail?

On a related note, it would be awesome to be able to change both image type (JPEG, PNG, etc.) and quality setting (if applicable). Is this a feature of the full version? I didn't see it in the demos.

Thanks,
Caleb
Stanimir
Telerik team
 answered on 15 Jan 2009
1 answer
118 views
I need to set my grid to a particular width and height, and whether they are grouping by columns or not limit the grid to that width and height.  In the demos I see, the height increases when grouping.

Is this possible?

Thx
Dimo
Telerik team
 answered on 15 Jan 2009
4 answers
200 views
Hi, I'm using RadControls_for_ASP.NET_AJAX_2008_3_1125.
The radspell control works fine with the english dictionary but when i change the dictionary language to another language, it keeps doing the spell check with the english dictionary, I don't know why. Please someone help me.

The source code is as follows:

<form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <telerik:RadSpell ID="RadSpell1" runat="server" ControlToCheck = "TextBox1" DictionaryLanguage="de-DE" Skin="Black" SupportedLanguages="de-DE,Dutch" DictionaryPath="~/App_Data/RadSpell/" />
        </div>
    </form>

i have already checked that the dictionary is in ~/App_Data/RadSpell/ folder.

Thank you.



Rumen
Telerik team
 answered on 15 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?