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

We've upgraded from Telerik ASP.Net 2010 to 2012. And since then, we have a button that has a strange display (See attachment)

<div class="submit">
                    <telerik:RadButton ID="btnSubmit2" OnClientLoad="OnSubmitButtonLoad"  runat="server" Height="35px" Text="Submit" CssClass="button" />     
              </div>

Any idea of how to solve this ?

Thanks
Danail Vasilev
Telerik team
 answered on 13 Mar 2013
5 answers
193 views
Hello,

I have a webpage where I use 13 RadDateTime Pickers. This impacts the performance and increases the size of my page; so I tried to implement the "Shared Calendar/TimeView" concept as in here: http://www.telerik.com/help/aspnet-ajax/calendar-shared-calendars.html

My page consists of an upper div that has 4 of these DateTime Pickers and then a RadPanelBar that has 3 RadPanelBar items each of which has an item template that contains some DateTime Pickers along other controls.

As you advised in the link I posted above, I defined the shared Calendar and shared TimeView first thing in the page, they preceed the other DateTime Pickers that use them. However, the problem I encountered is that the shared controls that I defined in the upper level of the page are not defined to the ones inside any of the RadPanelBar items. That is, I had to use 4 shared Calendars and TimeViews: one for the upper div, and one for each of the 3 RadPanelBar items as each one is only seeing what's in its scope.

This doesn't serve my case, the performace is still bad and the page size is big. So is there any solution to this case? How can I use only one shared Calendar and TimeView for the whole page and still get all the DateTime Pickers in the RadPanelBar and page in general see them?

Many Thanks!
Kevin
Top achievements
Rank 2
 answered on 13 Mar 2013
3 answers
102 views
hi my dear friends :
i added an itemtemplate to my radlistbox and also added 1 label and 2 linkbutton in it ...
my radlistbox is like below :
<telerik:RadListBox ID="RadlbOfImageGroup" runat="server" DataKeyField="ID" DataSortField="Title"
    DataSourceID="sdsImagesGroup" DataTextField="Title" DataValueField="ID" Skin="BlackByMe"
    EnableEmbeddedSkins="False" Width="260px" Height="365px" EmptyMessage="no rec!"
    AutoPostBack="True" OnSelectedIndexChanged="RadlbOfImageGroup_SelectedIndexChanged"
    CausesValidation="False">
    <ItemTemplate>
        <table style="width: 100%;">
            <tr style="width: 100%;">
                <td style="width: 64%;">
                    <asp:Label ID="lblTitleOfIG" runat="server" CssClass="lbl_ListBox_IG_Title" Text='<%# Eval("Title") %>'></asp:Label>
                </td>
                <td style="width: 18%; text-align: center;">
                    <asp:LinkButton ID="lbEditIG" runat="server" CausesValidation="False" CommandName="Edit"
                        CssClass="lb_ListBox_IG" OnClick="lbEditIG_Click">Edit</asp:LinkButton>
                </td>
                <td style="width: 18%; text-align: center;">
                    <asp:LinkButton ID="lbDeleteIG" runat="server" CausesValidation="False" CommandName="Delete"
                        CssClass="lb_ListBox_IG" OnClick="lbDeleteIG_Click">Delete</asp:LinkButton>
                </td>
            </tr>
        </table>
    </ItemTemplate>
</telerik:RadListBox>

My Problem Is how can i check the CommandName of LinkButtons in code behind when i click on them?
(we do n't have access to these LinkButtons In CodeBehind)

thanks for your attention
best regards
Nencho
Telerik team
 answered on 13 Mar 2013
2 answers
130 views
Hi,

Can I have the version number at the trail of Path in RadScriptManager or StyleSheetManager?

The example as below
<asp:ScriptReference Name="”MyNamespace.MyFile.js”" Assembly="”MyAsembly”" 
Path="/MyVirtualLocation/MyFile.js?v=1.1.1.1">

Can I do as above code? 

Any help is appriciate.
Dan
Dan Cao
Top achievements
Rank 1
 answered on 13 Mar 2013
2 answers
113 views
Hi, in month view I'd like to adjust the row height depending on the maximum number of appointments in a cell.  I have the code calculating the height and it works fine when I switch from one view to another, but when I switch from one month to another the row height value does not get updated.  Is there a way for me to trigger an update programmatically?

Thanks,
Rimma
Plamen
Telerik team
 answered on 13 Mar 2013
6 answers
247 views
I'm creating a dependency tree programmatically in code-behind. Overall, it works. Unfortunately, they all show up as group nodes. Could you please provide an examples of how to programmatically add a single item as opposed to a group node? Thanks.

Matthew Ricks
Plamen
Telerik team
 answered on 13 Mar 2013
4 answers
129 views
I have added extra buttons to the editor toolbar server side.
e.g.
 EditorTool PasteFromWord = new EditorTool();
                    PasteFromWord.Name = "PasteFromWord";                   
                    mainGroup.Tools.Add(PasteFromWord);

The tool buttons appear on the editor as expected.
However when i press the full screen button the full screen editor does not have the buttons i created, but only a limited set.

i.e. bold,italic, underline,numbered,copy,cut,paste,undo,full screen,spell check
Rumen
Telerik team
 answered on 13 Mar 2013
1 answer
139 views
I have drag and drop control to my Page.  But it shows following error at runatime..

The base class includes the field 'RadDatePicker1', but its type (Telerik.Web.UI.RadDatePicker) is not compatible with the type of control (Telerik.Web.UI.RadDatePicker).


What is this?
what is my mistake?
Kostadin
Telerik team
 answered on 13 Mar 2013
1 answer
163 views
When using the Scheduler in Chrome the alignment is good. See image: goodChrome.jpg
When viewing the same schedule in IE 9.0.8112.16421 - the alignment of the appointments is off more the farther you scroll to the right. See image: misalignedIE.jpg

In the sample there are 48 timeslots of 30 minutes each to present a 24 hour day starting at 5:00 am. 

In a second sample I am now also attaching showing the 24 hours in a much more compressed format and again IE is misaligned. (see images goodChrome2 and misalignedIE2)

I am using version 2012.3.1016.40.

The scheduler definition is:
<telerik:RadScheduler ID="ScheduleResources" runat="server"
    SelectedView="DayView"
    Width="1075px"
    ColumnWidth="300px"
    RowHeight="30px"
    OverflowBehavior="Expand"
    ShowAllDayRow="false"
    NumberOfHoveredRows="1"
    DayStartTime="00:00:00"     
    DayEndTime="23:59:59"
    WorkDayStartTime="09:00:00"
    WorkDayEndTime="17:00:00"
    DisplayRecurrenceActionDialogOnMove="true"
    EnableExactTimeRendering="true"
    ShowFooter="false"
    ShowFullTime="false"
    DataKeyField="ID"
    DataRecurrenceField="recurrenceRule"
    DataRecurrenceParentKeyField="recurrenceParentID"
    DataSourceID="data_appointments"
    DataStartField="startTime"
    DataEndField="endTime"
    DataSubjectField="resourceTitle"
    CustomAttributeNames="resourceCaptionShort, usr_firstname, usr_lastname, resourceID, isSponsor, recurrenceRule"
    OnAppointmentDataBound="Scheduler_AppointmentDataBound"
    OnAppointmentDelete="Scheduler_AppointmentDelete"
    OnAppointmentUpdate="Scheduler_AppointmentUpdate"
    OnAppointmentInsert="Scheduler_AppointmentInsert"
    OnAppointmentCreated="Scheduler_AppointmentCreated"
    OnNavigationComplete="Scheduler_NavigationComplete"
    OnPreRender="Schedule_PreRender"
    OnTimeSlotCreated="Schedule_TimeSlotCreated"
    DataDescriptionField="resourceCaptionShort"
    EnableDescriptionField="True"
    AllowInsert="false" EnableResourceEditing="false"
    EnableAdvancedForm="false" StartEditingInAdvancedForm="false"
    FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
    GroupingDirection="Horizontal" GroupBy="Flow"
    ReadOnly="true"
     WeekView-HeaderDateFormat="g" TimelineView-HeaderDateFormat="g" >
    <TimelineView StartTime="05:00:00"
        ColumnHeaderDateFormat="h:mm tt"
        NumberOfSlots="48"
        SlotDuration="00:30:00"
        TimeLabelSpan="1"
        UserSelectable="true"
        GroupingDirection="Vertical" GroupBy="Flow" />
    <TimeSlotContextMenuSettings EnableDefault="false" />
    <DayView  GroupingDirection="Horizontal" DayStartTime="0:00:00" DayEndTime="23:59:59" GroupBy="Flow" UserSelectable="true"  />
    <WeekView GroupingDirection="Horizontal" DayStartTime="0:00:00" DayEndTime="23:59:59" GroupBy="Flow" />
    <Localization
        AdvancedSubjectRequired="Please provide resource schedule subject"
        AdvancedNewAppointment="New Resource Schedule"
        AdvancedEditAppointment="Edit Resource Schedule"
        ConfirmRecurrenceEditTitle="Editing a recurring resource schedule"
        ConfirmRecurrenceResizeTitle="Resizing a recurring resource schedule"
        ConfirmRecurrenceDeleteTitle="Deleting a recurring resource schedule"
        ConfirmDeleteText="Are you sure you want to delete this resource schedule?"
        ConfirmRecurrenceMoveTitle="Moving a recurring resource schedule"
        ContextMenuAddAppointment="New Resource Schedule"
        ContextMenuAddRecurringAppointment="New Recurring Resource Schedule">
    </Localization>
 
    <AppointmentContextMenuSettings EnableDefault="false" />
    <AdvancedForm EnableResourceEditing="False" Modal="False" Enabled="False" />
    <ResourceTypes>
        <telerik:ResourceType KeyField="ID" Name="Flow" TextField="resourceType" ForeignKeyField="resourceTypeID" DataSourceID="data_resources" />
    </ResourceTypes>
    <AppointmentContextMenus>
        <telerik:RadSchedulerContextMenu ID="RadSchedulerContextMenu1" runat="server" Enabled="false" Visible="false">
            <Items>
                <telerik:RadMenuItem runat="server" Text="Edit Schedule" Value="schedule">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadSchedulerContextMenu>
    </AppointmentContextMenus>
</telerik:RadScheduler>

Boyan Dimitrov
Telerik team
 answered on 13 Mar 2013
1 answer
229 views
hi,
I'm using a radlistview with raddatapager to view the selected records in a database after a search. Now so that when you click on raddatapager to see the records in the listview, it should retry the connection to the database and re-run the query select sql, I thought of using the data caching using the method OutputCache. Obviously use the OutputCache only if they do not change the search parameters. But now I have a problem that I set the radlistview to 10 records per page, load 25 records, I have 3 pages to be displayed, using the OutputCache when licco DataPager on arrival to the second page and then stops do not go forward. I thought of setting the html code on the page this parameter: <% @ OutputCache duration = "300" VaryByParam = "_str1, _str2, RadDataPager1"%>, but nothing does not work. send time is the html code of the page, and the code vb net.

html code:
<%@ Page Language="vb" AutoEventWireup="false" CodeFile="search.aspx.vb" Inherits="search" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ OutputCache duration="600" VaryByParam="_str1,_str2,RadListView1" %>
<%@ Import Namespace="TRYcontact" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
<meta name="description" content="Trycontact; il social network che ti collega alla community con il tuo biglietto da visita virtuale." />
<link href="App_Themes/TryCss/chrome.css" rel="stylesheet" type="text/css" />
<title>TRYcontact: risultati della ricerca</title>
<script type="text/javascript">
// prendo valore div contenitore radlistview
function Height_Div() {
var _heightdiv1 = document.getElementById("div_radlistview").offsetHeight;
var _positiondiv2 = document.getElementById("under");
//_positiondiv2.style.top = (_heightdiv1) + "px";
}
function DoPostBack() {
__doPostBack();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ImageButtonRicerca">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="Panel1"
LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="RadListView1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadWindowCard"
LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadNotification ID="RadNotification1" runat="server" Height="100px"
Skin="Simple" TitleIcon="~/Image/iconlogo.png" Width="400px"
AutoCloseDelay="3500" Position="Center" Title="Notifica trycontact">
</telerik:RadNotification>
<asp:HiddenField ID="_search" runat="server" /><asp:HiddenField ID="_search1" runat="server" />
<telerik:RadFormDecorator ID="RadFormDecorator" Runat="server"
DecoratedControls="Default, Textbox, Textarea, Label, H4H5H6, Select, Zone, GridFormDetailsViews, ValidationSummary, LoginControls"
Skin="Sunset" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
BorderColor="#D5842B" BorderStyle="Double" BorderWidth="1px" Skin="Simple">
</telerik:RadAjaxLoadingPanel>
<div align="center" class="backgroundup">
<div align="center" class="banner">
<div style="padding-left:200px;">
<div class="profilesearch">
<asp:Panel ID="Panel1" runat="server" DefaultButton="ImageButtonRicerca" Height="55px" Width="685">
<div id="txt1" style="width:350px; height:22px; border:0px; margin:0px; padding-top:15px; padding-right:1px; float:left">
<telerik:RadTextBox ID="Txt_ricerca1" Runat="server"
EmptyMessage="Nominativo o azienda o categoria" Width="350px" Height="22px" Skin="" Font-Italic="True"
Font-Names="Verdana">
<EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
<HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
</telerik:RadTextBox>
</div>
<div id="txt2" style="width:250px; height:22px; border:0px; margin:0px; padding-top:15px; padding-right:1px; float:left">
<telerik:RadTextBox ID="txt_ricerca2" runat="server"
EmptyMessage="Città di residenza" Width="250px" Height="22px" Skin=""
Font-Italic="True" Font-Names="Verdana">
<EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
<HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
</telerik:RadTextBox>
</div>
<div id="btn" style="width:80px; height:40px; border:0px; margin:0px; padding-top:7px; float:right">
<asp:ImageButton ID="ImageButtonRicerca" runat="server"
ImageUrl="~/Image/search.png" Width="48px" />
</div>
</asp:Panel>
</div>
</div>
<div id="menu" class="divresultmenu">
<div class="divbuttonmenu">
<telerik:RadButton ID="btnhome" runat="server" Text="Home page" Width="80px" Skin="Office2010Silver">
</telerik:RadButton>
<telerik:RadButton ID="btnreg" runat="server" Text="Registrati in trycontact" Width="180px" Skin="Office2010Silver">
</telerik:RadButton>
</div>
</div> <!-- end div menu -->
<div class="resultseparator">
<asp:Label ID="Label1" runat="server" class="lbresult" Text="Biglietti da visita trovati:"
style="font-size: x-small; font-family: Verdana" ForeColor="#999999"></asp:Label>
</div> <!-- end div separator -->
<asp:Panel ID="PanelRadlist" runat="server" Width="700px">
<div id="div_radlistview" class="divradlistview">
<telerik:RadListView ID="RadListView1" runat="server" DataKeyNames="idutente"
ItemPlaceholderID="Contenitore" AllowPaging="True"
Width="650px" >
<LayoutTemplate>
<fieldset style="width: 700px; border:0px" id="FieldSet1">
<legend></legend>
<asp:Panel ID="Contenitore" runat="server">
</asp:Panel>
<telerik:RadDataPager ID="RadDataPager1" runat="server"
PagedControlID="RadListView1" Width="700px" Culture="it-IT" BackColor ="#ecede5">
<Fields>
<telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
</Fields>
</telerik:RadDataPager>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<div class="item">
<div class="image">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="120px" Width="110px"/>
</div>
<div class="content">
<div class="user">
<div style="width:16px; height:16px; float:left; padding-right:3px">
<img src="/image/icone/user1.png" alt="NP" />
</div>
<b><%# CType(Container.DataItem, PropertyUtente).utente%></b>
</div>
<div class="description_category">
<div style="width:16px; height:16px; float:left; padding-right:3px">
<img src="/image/icone/categoria.png" alt="NP" />
</div> Categoria: <%# CType(Container.DataItem, PropertyUtente).Desccategoria%>
</div>
<div class="description_city">
<div style="width:16px; height:16px; float:left; padding-right:3px">
<img src="/image/icone/home.png" alt="NP" />
</div> Città: <%# CType(Container.DataItem, PropertyUtente).Desccomune%></div>
<div class="description_email">
<div style="width:16px; height:16px; float:left; padding-right:3px">
<img src="/image/icone/email.png" alt="NP" />
</div> Email: <%# CType(Container.DataItem, PropertyUtente).Email%>
</div>
<div class="description_phone">
<div style="width:16px; height:16px; float:left; padding-right:3px">
<img src="/image/icone/telefono.png" alt="NP" />
</div>Telefono: <%# CType(Container.DataItem, PropertyUtente).Telefono%></div>
<div class="item_button">
<telerik:RadButton ID="RadButton1" runat="server" Text="Biglietto completo" Width="140px" Skin="Office2010Silver"
OnClick="RadButton1_Click">
</telerik:RadButton>
</div>
</div>
</div>
</ItemTemplate>
</telerik:RadListView>
</div> <!-- end div radlist -->
</asp:Panel>
</div> <!-- end div banner -->
</div> <!-- end div background -->
</div>
</form>
</body>
</html>

vbnet code:

Imports System
Imports System.Web
Imports System.Data
Imports System.Data.SqlClient
Imports Telerik.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.IO
Imports TRYcontact
Public Class search
      Inherits RadAjaxPage
    Private ObjUtente As New PropertyUtente
    Private Loadsearch As New GestoreUtente
    Private Sub Carica_risultati(ByVal _str1 As String, ByVal _str2 As String)
        Dim list As List(Of PropertyUtente) = Loadsearch.Search(_str1, _str2)
        Cache("result") = list
        RadListView1.DataSource = list
        RadListView1.DataBind()
    End Sub
 
    Protected Sub RadButton1_Click(sender As Object, e As System.EventArgs)
        Dim Button As RadButton = CType(sender, RadButton)
        Dim item As RadListViewDataItem = CType(Button.Parent, RadListViewDataItem)
        Session.Item("idutente") = item.GetDataKeyValue("idutente")
        'Dim script As String = "function f(){$find(""" + RadWindowCard.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
        Session.Item("CurrentPageIndex") = RadListView1.CurrentPageIndex
        Response.Redirect("publicard.aspx")
    End Sub
 
    Private Sub ImageButtonRicerca_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImageButtonRicerca.Click
        ScriptManager.RegisterStartupScript(Page, Me.GetType, "postback", "DoPostBack();", True)
        _search.Value = Txt_ricerca1.Text
        _search1.Value = txt_ricerca2.Text
        Carica_risultati(_search.Value, _search1.Value)
    End Sub
 
   
 
    Protected Sub search_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            If Session("CurrentPageIndex") IsNot Nothing Then
                RadListView1.DataSource = Cache("result")
                RadListView1.CurrentPageIndex = Integer.Parse(Session("CurrentPageIndex").ToString())
                RadListView1.Rebind()
                Session("CurrentPageIndex") = Nothing
                Exit Sub
            End If
            _search.Value = Request.QueryString("_str1")
            _search1.Value = Request.QueryString("_str2")
            Carica_risultati(_search.Value, _search1.Value)
        End If
    End Sub
 
    Protected Sub btnhome_Click(sender As Object, e As System.EventArgs) Handles btnhome.Click
        Response.Redirect("index.aspx")
    End Sub
 
    Protected Sub RadListView1_PageIndexChanged(sender As Object, e As Telerik.Web.UI.RadListViewPageChangedEventArgs) Handles RadListView1.PageIndexChanged
        If Cache("result") IsNot Nothing Then
            RadListView1.DataSource = Cache("result")
            Exit Sub
        End If
        Carica_risultati(_search.Value, _search1.Value)
    End Sub
End Class


help me

bye
Kostadin
Telerik team
 answered on 13 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?