Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
140 views
I have a grid that has dynamic columns created. However whenever any server side event is fired such as paging the columns are doubled up but seemingly without datafield information. The routine that creates the dynamic columns is not being called twice after the Postbacks. An example of what it looks like is here. http://www.jobtree.com.au/images/grid.gif


Craig
Top achievements
Rank 1
 answered on 20 Nov 2008
0 answers
323 views
Hi,
I'm testing your ajax controls on ASP .NET 2.0 target framework.
I get the following error:

The type 'System.Web.UI.IScriptControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Despite the following changes:

1. I installed Microsoft .NET 2.0 AJAX extensions 1.0 and also Microsoft ASP .NET 2.0 AJAX Templates for VS 2008 from which I chose "New AJAX Web Application" and changed the target framework to 2.0.

2. I modified my web.config file to run AJAX from a tutorial I found on the web (http://asp.net/ajax/documentation/live/configuringASPNETAJAX.Aspx):
<?xml version="1.0"?> 
<configuration> 
  <configSections> 
    <sectionGroup name="system.web.extensions" 
        type="System.Web.Configuration.SystemWebExtensionsSectionGroup,  
        System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,  
        PublicKeyToken=31bf3856ad364e35"> 
      <sectionGroup name="scripting" 
        type="System.Web.Configuration.ScriptingSectionGroup,  
        System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,  
        PublicKeyToken=31bf3856ad364e35"> 
        <section name="scriptResourceHandler" 
          type="System.Web.Configuration.ScriptingScriptResourceHandlerSection,  
            System.Web.Extensions, Version=1.0.61025.0,  
            Culture=neutralPublicKeyToken=31bf3856ad364e35
          requirePermission="false" 
          allowDefinition="MachineToApplication"/> 
        <sectionGroup name="webServices" 
            type="System.Web.Configuration.ScriptingWebServicesSectionGroup,  
            System.Web.Extensions, Version=1.0.61025.0,  
            Culture=neutralPublicKeyToken=31bf3856ad364e35"> 
          <section name="jsonSerialization" 
              type="System.Web.Configuration.ScriptingJsonSerializationSection,  
              System.Web.Extensions, Version=1.0.61025.0,  
              Culture=neutralPublicKeyToken=31bf3856ad364e35
              requirePermission="false" allowDefinition="Everywhere" /> 
          <section name="profileService" 
              type="System.Web.Configuration.ScriptingProfileServiceSection,  
              System.Web.Extensions, Version=1.0.61025.0,  
              Culture=neutralPublicKeyToken=31bf3856ad364e35
              requirePermission="false" 
              allowDefinition="MachineToApplication" /> 
          <section name="authenticationService" 
              type="System.Web.Configuration.ScriptingAuthenticationServiceSection,  
              System.Web.Extensions, Version=1.0.61025.0,  
              Culture=neutralPublicKeyToken=31bf3856ad364e35
              requirePermission="false" 
              allowDefinition="MachineToApplication" /> 
        </sectionGroup> 
      </sectionGroup> 
    </sectionGroup> 
  </configSections> 
 
  <appSettings/> 
  <connectionStrings/> 
  <system.web> 
    <pages> 
      <controls> 
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
      </controls> 
    </pages> 
 
    <!--  
            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> 
      <assemblies> 
        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
      </assemblies> 
      <httpHandlers> 
        <remove verb="*" path="*.asmx"/> 
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/> 
      </httpHandlers> 
      <httpModules> 
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
      </httpModules> 
 
    </compilation> 
 
    <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> 
 
    <!-- 
            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> 
        --> 
  </system.web> 
  <system.codedom> 
  </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> 
      <add name="ScriptModule" 
        preCondition="integratedMode" 
        type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
    </modules> 
    <handlers> 
      <remove name="WebServiceHandlerFactory-ISAPI-2.0"/> 
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" 
        preCondition="integratedMode" 
        type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 
      <add name="ScriptHandlerFactoryAppServices" verb="*" 
        path="*_AppService.axd" preCondition="integratedMode" 
        type="System.Web.Script.Services.ScriptHandlerFactory,  
      System.Web.Extensions, Version=1.0.61025.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=1.0.61025.0, Culture=neutral,  
      PublicKeyToken=31bf3856ad364e35/> 
    </handlers> 
  </system.webServer> 
</configuration> 
 


What should I do to make the controls compile?

Thanks,
Ensemble
Hk
Top achievements
Rank 2
 asked on 20 Nov 2008
1 answer
154 views
can anyone show me how to get a slider control to show numerical increments ?
Ive used the code from the examples here http://demos.telerik.com/ASPNET/Prometheus/Slider/Examples/Skinning/DefaultCS.aspx

but it doesnt work, I get the slider control but because there are no numrical increments with it the user will have no idea what values the slider is selecting.  Heres the code Ive used
<telerik:RadSlider ID="RadSlider1" runat="server" ItemType="tick" TrackPosition="TopRight"   
                        SlideStep="5" MaximumValue="20" MinimumValue="5" Skin="Vista" Width="100px" onvaluechanged="RadSlider1_ValueChanged" />  






 If I use this

<telerik:RadSlider runat="server" ID="RadSlider3" Orientation="Horizontal" Height="50" 
                        ItemType="Item" TrackPosition="BottomRight">  
                        <Items> 
                            <telerik:RadSliderItem Text="Item" Value="1" ToolTip="Very bad" runat="server"></telerik:RadSliderItem> 
                            <telerik:RadSliderItem Text="Item" Value="2" runat="server"></telerik:RadSliderItem> 
                            <telerik:RadSliderItem Text="Item" Value="3" runat="server"></telerik:RadSliderItem> 
                            <telerik:RadSliderItem Text="Item" Value="4" runat="server"></telerik:RadSliderItem> 
                            <telerik:RadSliderItem Text="Item" Value="5" runat="server"></telerik:RadSliderItem> 
                        </Items> 
                    </telerik:RadSlider> 
 
 I get an error
Type 'Telerik.Web.UI.RadSlider' does not have a public property named Item

This is strange since its lifted directlry from the example from the link above
Svetlina Anati
Telerik team
 answered on 20 Nov 2008
1 answer
83 views

Hi All

I have a select query like:

SELECT

case when EMPHOSPCD=00 then 'NMC'when EMPHOSPCD=01 then 'RCH' when EMPHOSPCD=02 then 'RNH'end as Hospital,

 

EMPNO

,CERTIFICATE,PURPOSE,EXTENSION,DESTINATIONADDRS,ACCOMPANY,TELEPHONE,TRAVEL_DATE,RETURN_DATE

 

 

from APPS.DM_STAFFREQUEST where

 

CRT_HOSPCD

='00' and CRT_EMPNO=600989 order by CRT_DATE desc

 

I want to bind it to radgrid with gridbouncolumns.


CERTIFICATE field have string values seperated by comma,and if one of these values is (travel permit),

 fields(DESTINATIONADDRS,ACCOMPANY,TELEPHONE,TRAVEL_DATE,RETURN_DATE ) have value , otherewise they will be empty

 

my question is, is there any way to write aquery to select these field just if CERTIFICATE field contain (travel permit) value

 

or away to bind columns to radgrid depend on the value of other column
please help me ASAP

ghadeer

 

Yavor
Telerik team
 answered on 20 Nov 2008
4 answers
206 views
Hi,

I have a formview that is loading an ascx template dynamically:

 <data:MultiFormView ID="FormView1" DataKeyNames="TransactionId" runat="server" DataSourceID="LoyaltyTransactionDataSource">
       
            <EditItemTemplatePaths>
                <data:TemplatePath Path="~/UserControls/LoyaltyTransactionFields.ascx" />
            </EditItemTemplatePaths>
       
            <InsertItemTemplatePaths>
                <data:TemplatePath Path="~/UserControls/LoyaltyTransactionFields.ascx" />
            </InsertItemTemplatePaths>
 

        </data:MultiFormView>

I'm trying to add an ajax manager to the page to pair up some of the controls in the ascx page. I think I need to do this programatically due to the controls being in the ascx page.

My ascx looks like this:

<%@ Control Language="C#" ClassName="LoyaltyTransactionFields" AutoEventWireup="true" CodeFile="LoyaltyTransactionFields.ascx.cs" Inherits="UserControls_LoyaltyTransactionFields" %>
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>


<asp:FormView ID="FormView1" runat="server">
    <ItemTemplate>
        <table border="0" cellpadding="3" cellspacing="1">
            <tr>
                <td class="literal">Transaction Date:</td>
                <td>

                           
                    <rad:RadDatePicker SelectedDate='<%# Bind("TransactionDate") %>' ID="dataTransactionDate" runat="server" Culture="English (United Kingdom)" Skin="Default2006">
                        <Calendar Skin="Default2006" ShowRowHeaders="False">
                        </Calendar>
                        <DateInput Skin="Default2006" Font-Size="Larger">
                        </DateInput>
                    </rad:RadDatePicker>
                    <asp:RequiredFieldValidator ID="ReqVal_dataTransactionDate" runat="server" Display="Dynamic" ControlToValidate="dataTransactionDate" ErrorMessage="Required"></asp:RequiredFieldValidator>

                </td>
            </tr>               
            <tr>
                <td class="literal">Transaction Value:</td>
                <td>
                    <asp:TextBox runat="server" ID="dataTransactionValue" Text='<%# Bind("TransactionValue") %>'></asp:TextBox><asp:RequiredFieldValidator ID="ReqVal_dataTransactionValue" runat="server" Display="Dynamic" ControlToValidate="dataTransactionValue" ErrorMessage="Required"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="RegExVal_dataTransactionValue"  runat="server" ControlToValidate="dataTransactionValue" Display="Dynamic" ValidationExpression="^[-]?(\d{1,9})(?:[.,]\d{1,4})?$" ErrorMessage="Invalid Value" />
                    </td>
            </tr>               
               
            <tr>
                <td class="literal">Description:</td>
                <td>
                    <asp:TextBox Width="300px" runat="server" ID="dataDescription" Text='<%# Bind("Description") %>' MaxLength="100"></asp:TextBox>
                </td>
            </tr>               
            <tr>
                <td class="literal">Archived:</td>
                <td>
                    <asp:RadioButtonList runat="server" ID="dataArchived" SelectedValue='<%# Bind("Archived") %>' RepeatDirection="Horizontal"><asp:ListItem Value="True" Text="Yes"></asp:ListItem><asp:ListItem Value="False" Text="No" Selected="True"></asp:ListItem></asp:RadioButtonList>
                </td>
            </tr>               
            <tr>
                <td class="literal">Card Id:</td>
                <td>
                    <data:EntityDropDownList AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" runat="server" ID="dataCardId" DataSourceID="CardIdLoyaltyCardDataSource" DataTextField="CardId" DataValueField="CardId" SelectedValue='<%# Bind("CardId") %>' AppendNullItem="true" Required="true" NullItemText="< Please Choose ...>" ErrorText="Required" />
                    <data:LoyaltyCardDataSource ID="CardIdLoyaltyCardDataSource" runat="server" SelectMethod="GetAll"  />
                </td>
            </tr>               
            <tr>
                <td class="literal">Customer Id:</td>
                <td>
                    <data:EntityDropDownList ReadOnly="true" runat="server" ID="dataCustomerId" DataSourceID="CustomerIdLoyaltyCustomerProfileDataSource" DataTextField="CustomerName" DataValueField="CustomerId" SelectedValue='<%# Bind("CustomerId") %>' AppendNullItem="true" Required="true" NullItemText="< Please Choose ...>" ErrorText="Required" />
                    <data:LoyaltyCustomerProfileDataSource ID="CustomerIdLoyaltyCustomerProfileDataSource" runat="server" SelectMethod="GetAll"  />
                </td>
            </tr>               
            <tr>
                <td class="literal">User Profile Id:</td>
                <td>
                    <data:EntityDropDownList ReadOnly="true" runat="server" ID="dataUserProfileId" DataSourceID="UserProfileIdLoyaltyUserProfileDataSource" DataTextField="Surname" DataValueField="UserProfileId" SelectedValue='<%# Bind("UserProfileId") %>' AppendNullItem="true" Required="true" NullItemText="< Please Choose ...>" ErrorText="Required" />
                    <data:LoyaltyUserProfileDataSource ID="UserProfileIdLoyaltyUserProfileDataSource" runat="server" SelectMethod="GetAll"  />
                </td>
            </tr>               
           
        </table>

    </ItemTemplate>
</asp:FormView>

I've added an ajax manager the containing page and then in the page_load:

        EntityDropDownList DataCardId = (EntityDropDownList)FormView1.FindControl("dataCardId");
        EntityDropDownList DataUserProfileId = (EntityDropDownList)FormView1.FindControl("dataUserProfileId");
        RadAjaxManager1.AjaxSettings.AddAjaxSetting(DataCardId, DataUserProfileId, null);


This compiles but when I run the app and choose from one of the dropdownlists I get the error:

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Any suggestions greatly appreciated.

Nikolay Rusev
Telerik team
 answered on 20 Nov 2008
5 answers
116 views
Hi,
We have a dynamic Multi level Hierarchy RadGrid.

I should have a serach functionality defined only at the MasterTableView and when i search for a product it should be able to drill down to that particular level the product is actually existing and should display all levels above it expanded.

Could you please let us know how to accomplish this.


Thanks
Bala
Yavor
Telerik team
 answered on 20 Nov 2008
1 answer
175 views
Using 2008 Q3 release:
During initialization, I set group button properties based upon user identification/other criteria and set button visible and checked properties. Data for these settings is read at server from a SQL table.

Setting the RadToolBarButton.Checked property to True is not firing the _ButtonClick event.
Should setting .Checked to True fire this event?

If not what methodology do you recommend to fire this event?
I tried simply invoking the default event handler, but was not able to find the correct object to pass for the EventArgs param for the .Checked button.

What am I missing?
Atanas Korchev
Telerik team
 answered on 20 Nov 2008
4 answers
256 views
Is there a way to change the cursor style on a treeview. For example, in the OnMouseOver and OnMouseOut events, I would like to do something like...
document.style.cursor = "hand".  Essentially I would like the cursor to change when moused over the treeview.  Any ideas?
parimal
Top achievements
Rank 1
 answered on 20 Nov 2008
1 answer
183 views
Is it possible using stylesheets or any other way to set all my controls across a project to the same skin? Like set the radgrid and radtextbox and radnumeric textboxes to skin="Office2007" without having to put the property for each control?

Thanks
Vlad
Telerik team
 answered on 20 Nov 2008
4 answers
115 views
Sir,

I used masterapage and within it i placed a radajaxmanager.When i click on the menu item in the master page,the contentpage is coming after a page reload ie,after a flashing.How can i avoid this problem by implementing ajaxification to master page

I tried by placing radajaxmanager in masterpage and radajaxmanagerproxy in contentpage.But unfortunately no effect.
I also tried by placing an updatepanel in the masterpage as we do for normal asp.net masterpage and contentpage.But it didnt work for telerik controls

Plz help me...
Thanks alot....
Vlad
Telerik team
 answered on 20 Nov 2008
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?