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

i want to install a Radslider in my project but there is an error in it that i cant fixed :(

i copied the C# and the aspx codes from the page "http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx" but it gives me error like "The name 'startSlider' does not exist in the current context" :((

here are my to check.. it has been a day nearly but i could not find the error :((( please help..

Thanks to Telerik Team in advance..

Adem.


ASPX code:

<telerik:GridBoundColumn DataField="Yatan" HeaderText="Yatan" UniqueName="Yatan"
                                FilterImageToolTip="Süz" FilterControlAltText="Filtrele" HeaderStyle-Width="250px"
                                SortExpression="Yatan" DataFormatString="{0:###,###.## TL}">
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                 
                                <FilterTemplate>                             
                                  <div style="float: left; padding: 5px 10px 0 0">
                            0 TL </div>
                        <telerik:RadSlider runat="server" ID="RadSlider1" IsSelectionRangeEnabled="true"
                            Style="float: left" MinimumValue="0" MaximumValue="3000" SmallChange="100" Width="135px" ShowDecreaseHandle="false"
                            ShowIncreaseHandle="false" Skin="Sunset" AutoPostBack="True" SelectionStart='<%# startSlider %>'
                            SelectionEnd='<%# endSlider %>' OnClientValueChanged="ClientValueChanged" OnClientSlideStart="ClientSlideStart"
                            OnClientSlideEnd="FreightRangeChanged" />
                        <div style="float: left; padding: 5px 0 0 10px">
                            3000 TL </div>
                        <div style="clear: both">
                        <asp:Literal ID="Literal1" runat="server" Text='<%# "Showing range between: $" + startSlider + " and $" + endSlider %>' />
                        </div>
                        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                            <script type="text/javascript">
                                function FreightRangeChanged(sender, args) {
                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
 
                                    var startValue = sender.get_selectionStart();
                                    var endValue = sender.get_selectionEnd();
 
                                    tableView.filter("Yatan", startValue + " " + endValue, "Between");
                                }
                                function ClientValueChanged(sender, args) {
                                    var tooltip = $find("<%= RadToolTip1.ClientID %>");
 
                                    if (!tooltip.isVisible()) {
                                        var activeHandle = sender.get_activeHandle();
                                        if (!activeHandle) return;
 
                                        tooltip.set_targetControl(activeHandle);
                                        tooltip.show();
                                    }
                                    else {
                                        tooltip.updateLocation();
                                    }
 
                                    tooltip.set_text(args.get_newValue());
                                }
 
                                function ClientSlideStart(sender, args) {
                                    var tooltip = $find("<%= RadToolTip1.ClientID %>");
                                    tooltip.hide();
                                }
                            </script>
                        </telerik:RadScriptBlock>
                                </FilterTemplate>
 
 
                            </telerik:GridBoundColumn>


CS.code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
 
namespace MyFirstBudgetProgram.MyWebPages
{
    public partial class GelirEkleDuzenle : System.Web.UI.Page
    {
        
    
        protected void GelirEkleDuzenle_ItemCommand(object source, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.FilterCommandName)
            {
                Pair filterPair = (Pair)e.CommandArgument;
 
                switch (filterPair.Second.ToString())
                {
                     
                    case "Yatan":
                        this.startSlider = ((e.Item as GridFilteringItem)[filterPair.Second.ToString()].FindControl("RadSlider1") as RadSlider).SelectionStart;
                        this.endSlider = ((e.Item as GridFilteringItem)[filterPair.Second.ToString()].FindControl("RadSlider1") as RadSlider).SelectionEnd;
                        break;
                    default:
                        break;
                }
            }
        }
        protected decimal startSlider
        {
            set
            {
                ViewState["strSl"] = value;
            }
            get
            {
                if (ViewState["strSl"] != null)
                    return (decimal)ViewState["strSl"];
                else
                    return 0;
            }
        }
        protected decimal endSlider
        {
            set
            {
                ViewState["endSl"] = value;
            }
            get
            {
                if (ViewState["endSl"] != null)
                    return (decimal)ViewState["endSl"];
                else
                    return 3000;
            }
        }
         
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
         
    }
}

    
Adem
Top achievements
Rank 1
 answered on 22 Nov 2012
3 answers
98 views
Hi..

i am really struggling to learn about telerik tools and i really want to use the radgrid with its all features. But i was stucked with "putting a combobox in grid" :((

i have found many codes from telerik's site but i could not assign it to my own project :( i did all i could do but there was always errors.. :((

could you please help me and rescue me from this situation please.. 

here is my code of Radgrid.. i am new in telerik. 

and could you please give me some simple examples, tutorials etc. to make me get rid of this stressful situation please..

thanks to you..



here is my code :


<telerik:RadGrid ID="OdemeEkleDuzenle" runat="server" DataSourceID="AdemButce" AllowFilteringByColumn="True"
                    AllowPaging="True" AllowSorting="True" CellSpacing="0" Culture="tr-TR" GridLines="None"
                    Height="100%" PageSize="18" ShowGroupPanel="True" AutoGenerateColumns="False"
                    AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True"
                    Style="text-align: left" GroupingSettings-GroupContinuesFormatString=" Bir sonraki sayfada da devamı var.."
                    GroupingSettings-GroupContinuedFormatString=".. bir önceki sayfadan devam eden bilgiler.."
                    GroupingSettings-GroupSplitDisplayFormat="Showing {0} of {1} items.">
                    <GroupingSettings GroupContinuedFormatString=" ... Bir önceki sayfadaki gruplamanın devamı. "
                        GroupContinuesFormatString=" Gruplama Bir Sonraki Sayfada da devam ediyor... "
                        GroupSplitDisplayFormat="Toplam {1} kaydın {0} tanesi gösteriliyor.. " UnGroupButtonTooltip="Gruplamayı kaldırmak için burayı tıklayınız.."
                        UnGroupTooltip="Gruplamayı kaldırmak için sütunu buradan dışarı sürükleyin.." />
                    <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" AllowKeyboardNavigation="True"
                        ColumnsReorderMethod="Reorder" EnableRowHoverStyle="True">
                        <DataBinding EnableCaching="True">
                        </DataBinding>
                        <Selecting AllowRowSelect="True" />
                        <ClientMessages DragToGroupOrReorder="Gruplamak veya sıralamak için yukarıdaki gruplama alanına sürükleyip bırakın"
                            DragToResize="Yeniden boyutlandır" DropHereToReorder="Tekrar Sıralamak için buraya sürükleyip bırakın." />
                        <Resizing AllowColumnResize="True" />
                    </ClientSettings>
                    <GroupPanel Text="Gruplamak istediğiniz sütunu buraya sürükleyin..">
                    </GroupPanel>
                    <MasterTableView AutoGenerateColumns="False" DataSourceID="AdemButce" Caption="ÖDEMELERİM"
                        AlternatingItemStyle-VerticalAlign="Middle" GridLines="None" CommandItemDisplay="Top"
                        NoMasterRecordsText="No Categories have been added.">
                        <CommandItemSettings ExportToPdfText="PDF dosyasına aktar" AddNewRecordText="Yeni Kayıt Ekle"
                            RefreshText="Listeyi Yenile" ExportToExcelText="Excel Dosyasına aktar" ExportToCsvText="Csv dosyasına aktar"
                            ExportToWordText="Word dosyasına aktar" />
                        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                                EditFormColumnIndex="0" EditText="Düzenle" Groupable="True" HeaderStyle-Width="2%"
                                UpdateText="Güncelle" HeaderText="Dznl">
                                <HeaderStyle Width="2%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridEditCommandColumn>
                            <telerik:GridBoundColumn DataField="S_nu" DataType="System.Decimal" HeaderText="S_nu"
                                SortExpression="S_nu" UniqueName="S_nu" FilterImageToolTip="Süz" FilterControlAltText="Filtrele"
                                FilterControlWidth="80%">
                                <HeaderStyle Width="2%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ADI" HeaderText="Ödeme Adı" SortExpression="ADI" UniqueName="ADI"
                                FilterImageToolTip="Süz" FilterControlAltText="Filtrele" FilterControlWidth="80%">
                                <HeaderStyle Width="10%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="KIMLIK" HeaderText="Alacaklı Kişi / Firma" SortExpression="KIMLIK"
                                UniqueName="KIMLIK" FilterImageToolTip="Süz" FilterControlAltText="Filtrele"
                                FilterControlWidth="80%">
                                <HeaderStyle Width="10%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="BAS_TAR" DataType="System.DateTime" HeaderText="Başlama Tarihi"
                                SortExpression="BAS_TAR" UniqueName="BAS_TAR" DataFormatString="{0:dd MMMM yyyy}"
                                FilterImageToolTip="Süz" FilterControlAltText="Filtrele" FilterControlWidth="70%">
                                <HeaderStyle Width="8%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="BIT_TAR" DataType="System.DateTime" HeaderText="Bitiş Tarihi"
                                SortExpression="BIT_TAR" UniqueName="BIT_TAR" DataFormatString="{0:dd MMMM yyyy}"
                                FilterImageToolTip="Süz" FilterControlAltText="Filtrele" FilterControlWidth="70%">
                                <HeaderStyle Width="8%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ODENECEK_TUTAR" DataType="System.Decimal" HeaderText="Ödenecek Tutar"
                                SortExpression="ODENECEK_TUTAR" UniqueName="ODENECEK_TUTAR" DataFormatString="{0:###,###.## TL}"
                                FilterImageToolTip="Süz" FilterControlAltText="Filtrele" FilterControlWidth="80%">
                                <HeaderStyle Width="8%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TAKSIT_SAYISI" DataType="System.Decimal" HeaderText="Taksit Sayısı"
                                SortExpression="TAKSIT_SAYISI" UniqueName="TAKSIT_SAYISI" FilterImageToolTip="Süz"
                                FilterControlAltText="Filtrele" FilterControlWidth="70%">
                                <HeaderStyle Width="6%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TAKSIT_TUTAR" DataType="System.Decimal" HeaderText="Taksit Tutarı"
                                SortExpression="TAKSIT_TUTAR" UniqueName="TAKSIT_TUTAR" DataFormatString="{0:###,###.## TL}"
                                FilterImageToolTip="Süz" FilterControlAltText="Filtrele" FilterControlWidth="80%">
                                <HeaderStyle Width="8%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="ODEME_DURUMU" HeaderText="Ödeme Durumu" SortExpression="ODEME_DURUMU"
                                UniqueName="ODEME_DURUMU" FilterImageToolTip="Süz" FilterControlAltText="Filtrele"
                                FilterControlWidth="70%">
                                <HeaderStyle Width="10%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="NOTES" HeaderText="Notlar" SortExpression="NOTES"
                                UniqueName="NOTES" FilterImageToolTip="Süz" FilterControlAltText="Filtrele" FilterControlWidth="90%">
                                <HeaderStyle Width="20%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                            </telerik:GridBoundColumn>
                            <telerik:GridButtonColumn Text="Sil" CommandName="Delete" ButtonType="ImageButton"
                                ItemStyle-Width="2%" ConfirmText="Bu bilgiyi silmek istediğinizden emin misiniz?"
                                HeaderStyle-Width="2%" HeaderText="Sil">
                                <HeaderStyle Width="2%" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
                                <ItemStyle Width="2%"></ItemStyle>
                            </telerik:GridButtonColumn>
                        </Columns>
                        <EditFormSettings EditColumn-CancelText="İptal" EditColumn-EditText="Düzenle" EditColumn-InsertText="Ekle"
                            EditColumn-UpdateText="Güncelle" ColumnNumber="4" CaptionFormatString="Bilgi Güncelleme Ekranı"
                            EditColumn-ButtonType="ImageButton">
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column" ButtonType="ImageButton"
                                EditText="Düzenle" EditFormColumnIndex="0">
                            </EditColumn>
                        </EditFormSettings>
                        <AlternatingItemStyle VerticalAlign="Middle"></AlternatingItemStyle>
                    </MasterTableView>
                    <FilterMenu EnableImageSprites="False" CollapseDelay="700" EnableAutoScroll="True"
                        EnableRoundedCorners="True" ViewStateMode="Enabled" Width="100%">
                        <ExpandAnimation Duration="400" Type="OutElastic" />
                        <CollapseAnimation Type="InExpo" />
                    </FilterMenu>
                </telerik:RadGrid>
                <asp:SqlDataSource ID="AdemButce" runat="server" ConnectionString="<%$ ConnectionStrings:WaccooTablolar %>"
                    ProviderName="<%$ ConnectionStrings:WaccooTablolar.ProviderName %>" SelectCommand="SELECT * FROM &quot;ODEME_EKLE_GORUNTULE&quot;">
                </asp:SqlDataSource>
Adem
Top achievements
Rank 1
 answered on 22 Nov 2012
1 answer
17 views
Hello,

In IE8, there is a bug when setting content(doesn't matter client side - set_html() or server side Content property).
I want to set the content to :

Please find below details of your request:<br><br><table border="0" width="100%"><tbody><tr><td width="300px" valign="top">Thank you</td></tr></tbody></table>


But after is set, the content becomes :

Please find below details of your request:<BR><BR>
<TABLE border=0 width="100%">
<TBODY>
<TR>
<TD vAlign=top width=300>Thank you</TD></TR></TBODY></TABLE>


So I'm losing the markup(quotes are removed) what is crucial, as after that I must save that content to DB, and it is completely broken.

Could you please help me with this issue.

Rumen
Telerik team
 answered on 22 Nov 2012
1 answer
70 views

Hi,

I'm working on saving setting made by a user directly after the event. Exemple: i have a column A and a column B. My user take the column B and put it before the column A, so I've change the order of my two columns, and the setting are saved in my DB. I've try with :

Public Sub tmpGrid_Load(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim tmpGrid As RadGrid = sender
 
    If tmpGrid.Page.IsPostBack Then
        Dim setting As New GridSettingsPersister(tmpGrid)
        Dim param As String = setting.SaveSettings()
    End If
End Sub

The code execute, SaveSettings execute correctly, but the change at screen is made after the event after when I reload my page, my setting are not correct. It's always save all my change but not the last. Exemple: My original order is A-B-C, I put C before A (C-A-B), and after, i put B before C (B-C-A). I quit the page, and I return on the same page after. What I see is C-A-B, not B-C-A. 

I've try with the event ColumnReorder, but the same problem occurs. I see that the event execute after my save is made. So how can I do the save after the event. I don't want that my user need to do something to save their setting.

Thank you


Visual studio 2008 .NET 3.5 SP1
Windows 7
Telerik ASP.NET AJAX 2012.1.301.2
VB.NET

Daniel
Telerik team
 answered on 22 Nov 2012
2 answers
116 views
Hi!

When I paste (Ctrl+V) a long string into RadAutocompleteBox, for example, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", the input box only shows a part of that string. And if I immediately press left cursor key on keyboard the input box expands. Why doesn't it expand right after paste?
Bozhidar
Telerik team
 answered on 22 Nov 2012
1 answer
93 views
Hi,

My customer is getting this error after performing a spellchek on a rad edior.
spell check handler server error 503
<HTML>Network error</HTML>
... A communication error occured. "Operation timed out"
...The web server might be down or busy or experiencing other problems preventing it from responding to requests. You might wish to try again at a later time.

I have googled it but no one else seem to ever had this problem and I can not reproduce it on my local machine.
It looks like a time out error, I was just wandering if anyone else came accross it.

Many thanks

Ellie
Rumen
Telerik team
 answered on 22 Nov 2012
1 answer
493 views
I am having problems with the client side events. Im trying to fire a javascript whenever a key is pressed:
<script language="javascript" type="text/javascript">
   
        function tbGroupNamekeypress(sender, eventArgs) {
            var c = eventArgs.get_keyCharacter();
            var idtbGroupname = '<%=tbGroupName.ClientID%>';
            var tbGroupnameValue = encodeURI($('#' + idtbGroupname).val() + c);
            $('#divGroupNamePreview').load("/_layouts/checkGroupName.aspx?name=" + tbGroupnameValue + "&t=" + new Date().getTime());
        }
 </script>
 
<telerik:RadTextBox runat="server" ID="tbGroupName" Width="79%" Skin="Metro" ClientEvents-OnKeyPress="tbGroupNamekeypress" MaxLength="47"></telerik:RadTextBox>

this works for all keys except the backspace key. Is there any workaround for this? 

Regards,
Frank
Vasil
Telerik team
 answered on 22 Nov 2012
1 answer
71 views
I'm try to change the start time of an appointment when it call the function "OnClientAppointmentMoveEnd", but it will not change the start time.
Here is my codes:

<%@ Page Language="VB" AutoEventWireup="true" CodeFile="RadSchedulerAdvancedForm.aspx.vb"
 Inherits="RadSchedulerAdvancedForm" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="scheduler" TagName="AdvancedForm" Src="AdvancedForm.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <style type="text/css">
  .RadScheduler .rsAdvancedEdit .RadColorPicker label
  {
   text-align: left;
   display: block;
   padding: 0;
  }
 </style>
 <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body class="BODY">
 <form id="Form1" method="post" runat="server">
 <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
  <Scripts>
   <asp:ScriptReference Path="~/ObjectDataSource/AdvancedForm.js" />
   <%--Needed for JavaScript IntelliSense in VS2010--%>
   <%--For VS2008 replace RadScriptManager with ScriptManager--%>
   <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
  </Scripts>
 </telerik:RadScriptManager>
 <script type="text/javascript"> 
  //<![CDATA[
    
     function ChangeStartTime() {
     }
     function ClientAppointmentEditing(sender, eventArgs) {
     }

     function OnClientAppointmentMoveEnd(sender, eventArgs) {
                     var newStartTimeAvailable = new Date('Wed Nov 20 11:00:00 EST 2012');
                     eventArgs.get_appointment().set_start(newStartTimeAvailable);
                     sender.updateAppointment(eventArgs.get_appointment());
                 }

  var schedulerTemplates = {};

  function schedulerFormCreated(scheduler, eventArgs) {
   // Create a client-side object only for the advanced templates
   var mode = eventArgs.get_mode();
   if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
     mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
    // Initialize the client-side object for the advanced form
    var formElement = eventArgs.get_formElement();
    var templateKey = scheduler.get_id() + "_" + mode;
    var advancedTemplate = schedulerTemplates[templateKey];
    if (!advancedTemplate) {
     // Initialize the template for this RadScheduler instance
     // and cache it in the schedulerTemplates dictionary
     var schedulerElement = scheduler.get_element();
     var isModal = scheduler.get_advancedFormSettings().modal;
     advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
     advancedTemplate.initialize();

     schedulerTemplates[templateKey] = advancedTemplate;

     // Remove the template object from the dictionary on dispose.
     scheduler.add_disposing(function () {
      schedulerTemplates[templateKey] = null;
     });
    }

    // Are we using Web Service data binding?
    if (!scheduler.get_webServiceSettings().get_isEmpty()) {
     // Populate the form with the appointment data
     var apt = eventArgs.get_appointment();
     var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
     advancedTemplate.populate(apt, isInsert);
    }
   }
  }
   
  //]]>
 </script>
 <div class="exampleContainer">
  <telerik:RadScheduler runat="server" ID="RadScheduler1" DataEndField="End" Reminders-Enabled="true"
   AppointmentStyleMode="Default" DataKeyField="ID"
   
   DataStartField="Start" CustomAttributeNames="AppointmentColor"
   OnClientFormCreated="schedulerFormCreated" DataSubjectField="Subject" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
   
            onclientappointmentmoveend="OnClientAppointmentMoveEnd" Height="640px"
            OverflowBehavior="Expand" AllowDelete="False" SelectedView="WeekView"
                                                                Localization-ContextMenuEdit="AAA"
                                                                onclientappointmentediting="ClientAppointmentEditing"
                                                               
            >
   <AppointmentTemplate>
                 <div class="rsAptSubject">
                     <%# Eval("Subject") %>
                 </div>
                 <%# Eval("Description") %>
             </AppointmentTemplate>
             <AdvancedEditTemplate>
                 <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit"
                     Subject='<%# Bind("Subject") %>'
                     Description='<%# Bind("Description") %>'
                     Start='<%# Bind("Start") %>'
                     End='<%# Bind("End") %>'
                     RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                        Reminder='<%# Bind("Reminder") %>'
                     AppointmentColor='<%# Bind("AppointmentColor") %>'
                         />
                         <%--TimeZoneID='<%# Bind("TimeZoneID") %>'--%>
                         <%--UserID='<%# Bind("User") %>'--%>
                         <%--RoomID='<%# Bind("Room") %>'--%>
             </AdvancedEditTemplate>
             <AdvancedInsertTemplate>
                 <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert"
                     Subject='<%# Bind("Subject") %>'
                     Start='<%# Bind("Start") %>'
                     End='<%# Bind("End") %>'
                     Description='<%# Bind("Description") %>'
                     RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
                        Reminder='<%# Bind("Reminder") %>'
                     AppointmentColor='<%# Bind("AppointmentColor") %>'
                         />
                         <%--TimeZoneID='<%# Bind("TimeZoneID") %>'--%>
                         <%--UserID='<%# Bind("User") %>'--%>
                         <%--RoomID='<%# Bind("Room") %>'--%>
             </AdvancedInsertTemplate>
           
                                                        <AdvancedForm Modal="True" Width="400px" EnableTimeZonesEditing="True" />

                                                        <ResourceTypes>
<%--                                                        <telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="USERID"
                                                        KeyField="ID" Name="Users" TextField="USERNAME" />--%>
                                                        </ResourceTypes>
                                                        <TimelineView UserSelectable="False" />
                                                        <WeekView DayEndTime="23:59:59" ColumnHeaderDateFormat="dddd, d"
                                                            GroupingDirection="Vertical" />
                                                        <Localization AdvancedEditAppointment="Edit" AdvancedNewAppointment="New"
                                                            AllDay="Range" />
                                                            
                                                        <MonthView FirstDayHeaderDateFormat="MMMM dd" ColumnHeaderDateFormat="MMMM dddd"
                                                            HeaderDateFormat="MMMM, yyyy" />
                                                    </telerik:RadScheduler>
  <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="AllUsers"
   TypeName="UserList"></asp:ObjectDataSource>
  <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteAppointment"
   InsertMethod="InsertAppointment" SelectMethod="AllData" TypeName="AppointmentList"
   UpdateMethod="UpdateAppointment">
   <DeleteParameters>
    <asp:Parameter Name="ID" Type="String" />
   </DeleteParameters>
   <InsertParameters>
    <asp:Parameter Name="Subject" Type="String" />
    <asp:Parameter Name="AppointmentColor" Type="String" />
    <asp:Parameter Name="Start" Type="DateTime" />
    <asp:Parameter Name="End" Type="DateTime" />
    <asp:Parameter Name="Reminder" Type="String" />
    <asp:Parameter Name="UserID" Type="Int32" />
    <asp:Parameter Name="TimeZoneID" Type="String" />
    <asp:Parameter Name="RecurrenceRule" Type="String" />
    <asp:Parameter Name="RecurrenceParentID" Type="String" />
   </InsertParameters>
   <UpdateParameters>
    <asp:Parameter Name="ID" Type="String" />
    <asp:Parameter Name="Subject" Type="String" />
    <asp:Parameter Name="AppointmentColor" Type="String" />
    <asp:Parameter Name="Start" Type="DateTime" />
    <asp:Parameter Name="End" Type="DateTime" />
    <asp:Parameter Name="RecurrenceRule" Type="String" />
    <asp:Parameter Name="RecurrenceParentID" Type="String" />
    <asp:Parameter Name="TimeZoneID" Type="String" />
    <asp:Parameter Name="Reminder" Type="String" />
    <asp:Parameter Name="UserID" Type="Int32" />
   </UpdateParameters>
  </asp:ObjectDataSource>
 </div>
 </form>
</body>
</html>


Boyan Dimitrov
Telerik team
 answered on 22 Nov 2012
1 answer
73 views
Hello Guys,

In my radGrid, I have a collection of declaratively defined Columns and some, that are added to my grid my codebehind, depending on some irrelevant business stuff.
The problem occurring now is, that I can not open any dialog, with the probably well known message, that a httphandler registration is missing. Unfortunately it is not missing the web.config of my web Application and the also well known helping hints have been rechecked already. Am I now missing some ASP.NET hidden stuff, that prevents the column-editors from using the registered handler?
Currently I can not use any dialog (table wizard, picture manager, URL handler, ...)

Any help or hints would be great!
Thanks in advance!
Peter

Peter
Top achievements
Rank 1
 answered on 22 Nov 2012
1 answer
174 views
Hi,

I pass the value of the value of the item selected from a radcombox to another. The first is radcombox Region and I have to pass the valure the selected region or typed, the second radcombo to load the list of provinces that refer to the region. Here is the code I use hand side aspx and vb net:

<telerik:RadComboBox ID="Regione" Runat="server" CollapseDelay="100"
    EnableLoadOnDemand="True" HighlightTemplatedItems="True" IsCaseSensitive="True"
    LoadingMessage="Caricamento..." DropDownWidth="160px" Filter="StartsWith" Width="160px"
    MaxHeight="175px" ShowMoreResultsBox="True" Height="175px" AutoPostBack="True">
</telerik:RadComboBox>
 
 
<telerik:RadComboBox ID="Provincia" Runat="server" CollapseDelay="100"
    DropDownWidth="170px" EnableLoadOnDemand="True" Filter="StartsWith"
    HighlightTemplatedItems="True" IsCaseSensitive="True"
    LoadingMessage="Caricamento..." MaxHeight="175px" ShowMoreResultsBox="True"
    Width="170px" Height="175px" EmptyMessage="Scegli la regione">
</telerik:RadComboBox>



    
Private Const ItemsRegion As Integer = 11
    Private Const ItemsProvincs As Integer = 10
    Private idregione As Integer = 0
Protected Sub Region_ItemsRequested(sender As Object, e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles Region.ItemsRequested
        Dim data As DataTable = GetDataRegion(e.Text)
        Dim itemOffset As Integer = e.NumberOfItems
        Dim endOffset As Integer = Math.Min(itemOffset + ItemsRegion, data.Rows.Count)
 
        e.EndOfItems = endOffset = data.Rows.Count
        For i As Integer = itemOffset To endOffset - 1
            Region.Items.Add(New RadComboBoxItem(data.Rows(i)("descrizione").ToString(), data.Rows(i)("id").ToString()))
        Next
        e.Message = GetStatusMessageRegion(endOffset, data.Rows.Count)
    End Sub
    Private Shared Function GetDataRegion(text As String) As DataTable
 
        Dim sqlSelectCommand As String = "SELECT [id], [descrizione] from [tab_regioni] WHERE [descrizione] LIKE @desc + '%' Order By [descrizione]"
 
        Dim adapter As New SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings("TrycontactString").ConnectionString)
        adapter.SelectCommand.Parameters.AddWithValue("@desc", text)
 
        Dim data As New DataTable()
 
        adapter.Fill(data)
 
        Return data
 
    End Function
 
    Private Shared Function GetStatusMessageRegion(offset As Integer, total As Integer) As String
 
        If total <= 0 Then
 
            Return "Regione non trovata"
 
        End If
 
        Return [String].Format("Lista: <b>1</b>-<b>{0}</b> di <b>{1}</b>", offset, total)
 
    End Function
 
    Protected Sub Provincs_ItemsRequested(sender As Object, e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles Provincs.ItemsRequested
        Dim data As DataTable = GetDataProvincs(e.Text, idregione)
        Dim itemOffset As Integer = e.NumberOfItems
        Dim endOffset As Integer = Math.Min(itemOffset + ItemsProvincs, data.Rows.Count)
 
        e.EndOfItems = endOffset = data.Rows.Count
        For i As Integer = itemOffset To endOffset - 1
            Provincs.Items.Add(New RadComboBoxItem(data.Rows(i)("descrizione").ToString(), data.Rows(i)("id").ToString()))
        Next
        e.Message = GetStatusMessageProvincs(endOffset, data.Rows.Count)
    End Sub
    Private Shared Function GetDataProvincs(text As String, id As Int32) As DataTable
 
        Dim sqlSelectCommand As String = "SELECT [id], [idregione], [descrizione] from [tab_province] WHERE [idregione]=@idregione and [descrizione] LIKE @desc + '%' Order By [descrizione]"
 
        Dim adapter As New SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings("TrycontactString").ConnectionString)
        adapter.SelectCommand.Parameters.AddWithValue("@desc", text)
        adapter.SelectCommand.Parameters.AddWithValue("@idregione", id)
        Dim data As New DataTable()
 
        adapter.Fill(data)
 
        Return data
 
    End Function
 
    Private Shared Function GetStatusMessageProvincs(offset As Integer, total As Integer) As String
 
        If total <= 0 Then
 
            Return "Provincia non trovata"
 
        End If
 
        Return [String].Format("Lista: <b>1</b>-<b>{0}</b> di <b>{1}</b>", offset, total)
 
    End Function

bye
Nencho
Telerik team
 answered on 22 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?