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

How do I get search engine results programatically?  Some search engines use AJAX to display content and so the URL does not change. This makes it difficult to get result content from a search engine programatically.

Most search engines do not use AJAX.  But two popular ones that I am interested in is YANDEX and DUCKDUCKGO.  Both of these search engines use AJAX to advance beyond the first page of results.  How do I find a way to programatically access these pages?

Vasil
Telerik team
 answered on 28 Nov 2012
6 answers
153 views

Hi,
since the sql select using the radcombox charged over 1000 records, you can upload a video, when I open the radcombobox, only 10 records at a time? And then you decide to continue to view other records.
Maybe I need to use the property ShowMoreresultsBox = True?
My side code vb net is:

Protected Sub RadComboBox1_ItemsRequested(sender As Object, e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles RadComboBox1.ItemsRequested
 
Dim sqlSelectCommand As String = "SELECT [id], [descrizione] from [tab_categorie] WHERE [descrizione] LIKE @desc + '%' Order By [descrizione]"
  
Dim adapter As New SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings("TrycontactString").ConnectionString)
 
 adapter.SelectCommand.Parameters.AddWithValue("@desc", e.Text)
 
 Dim dataTable As New DataTable()
 
 adapter.Fill(dataTable)
 For Each dataRow As DataRow In dataTable.Rows
 
 Dim item As New RadComboBoxItem()
 
 item.Text = DirectCast(dataRow("descrizione"), String)
 
item.Value=dataRow("id").ToString()radComboBox1.Items.Add(item)
 
 item.DataBind()
 
 Next
End Sub

 

 

 

While the ASP side code is:

<telerik:RadComboBox ID="RadComboBox1" Runat="server" DropDownWidth="325px"
    EmptyMessage="Choose a Catogory" EnableLoadOnDemand="true" Filter="Contains"
    Height="150" HighlightTemplatedItems="true"
    OnItemsRequested="RadComboBox1_ItemsRequested"
    Width="325px" ErrorMessage="Dato errato" IsCaseSensitive="True">
</telerik:RadComboBox>

 

 

 

 

 

 



Nencho
Telerik team
 answered on 28 Nov 2012
1 answer
88 views
I have a page with RadFileExplorer and EnableAsyncUpload="true" option. We are using selenium tool for automation testing. But we are not able to perform "click" option with EnableAsyncUpload option.

If i remove EnableAsyncUpload option then i am able to do it.

Our findings are as below
---------------------------------------------------------------------------------------------

1) There are 2 separate objects, a "text" and a "button"  manually clicking on which the Select File window opens. However, through Select IDE and Selenium RC, on performing click on these objects, the Select File window does not open, due to which AutoIT is unable to select the file to upload. This looks to be more of a selenium issue that though the Click action is executing successfully, the click event is not getting fired and the Select File Window is not invoked.

I am able to perform a "type" in the text box.However, the file is not uploaded by doing a type as your application does not support that.

2) Using the IE developer tool, it is highlighting the file object as below

               <OBJECT style="OUTLINE-STYLE: none; OUTLINE-COLOR: invert; OUTLINE-WIDTH: 0pt; WIDTH: 100%" id=ctl00_BodyContent_FileExplorer_asyncUpload1flash010 class=ruObject tabIndex=-1 data="/WebResource.axd?d=fM8n8mufwaYAdyK9bnynX5Wn47jvXke8iOMZ_ZStmCnM1bULR6bY0YLeP07v4HddNqGy_TB-zp3JF322tlXRhdAuS5pvAT1tz_SSdoa36qh9eBXYTd1gcKF-tJC8bfmPYbJBTE_Kt8mQoALLyvR9XPA32SbcoMKjJe_pbWbJu0QS1ni81X8-Vi_6J6-CUY-70&amp;t=634770601240000000" type=application/x-shockwave-flash height=22></OBJECT>

Usually, to upload a file, the html input object used is of the "type=file" which I dont see in the above object.
Request you to have a word with your dev team and let us know if this object is a flash component   (Notice the "type" attribute).

--------------------------------------------------------------------------------------------

can anybody please provide any input?
Joana
Telerik team
 answered on 28 Nov 2012
9 answers
169 views
Heey guys

I have  a question is it possible to bind tow sql sources in one RadScheudler ?  An example with sql would really help  

My code 
<%@ Page Title="" Language="C#" MasterPageFile="~/ABBMaster.Master" AutoEventWireup="true" CodeBehind="UserScheduler.aspx.cs" Inherits="HolidayTracker.User.UserScheduler" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="MainRegionContentPlaceHolder" runat="server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function Export(sender, e) {
                $find("<%= RadAjaxManager1.ClientID %>").__doPostBack(sender.name, "");
            }
 
        </script>
    </telerik:RadCodeBlock>
    <style type="text/css">
        .RadScheduler .rsExportButton {
            position: absolute;
            bottom: 0;
            right: 0;
            border: 0;
            height: 24px;
            width: 24px;
            background: url('exportButtonli.gif') no-repeat center center;
        }
 
        .RadScheduler .rsAllDayRow .rsExportButton {
            right: 20px;
            height: 16px;
            width: 16px;
            bottom: 20px;
            background: url('exportButton.gif');
        }
 
        #Label1Panel {
            display: inline !important;
        }
 
        .lblError {
            background: #CC0000;
            border: 1px solid darkred;
            color: white;
            font: bold 16px "Segoe UI", Arial, sans-serif;
            vertical-align: middle;
            display: none;
            height: 30px;
            line-height: 28px;
            position: absolute;
            padding-left: 5px;
            width: 743px;
            z-index: 1001;
            cursor: pointer;
            opacity: 0.9;
            -moz-opacity: 0.9;
            filter: alpha(opacity=90);
        }
 
        .rsCustomAppointmentContainer div {
            width: 100% !important;
        }
 
        .rsCustomAppointmentContainer h2 {
            overflow: hidden !important;
            white-space: nowrap !important;
            text-overflow: ellipsis !important;
        }
    </style>
 
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                    <telerik:AjaxUpdatedControl ControlID="Label1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:Label ID="Label1" runat="server" CssClass="lblError"></asp:Label>
    <div style="margin: 5px 0">
        <asp:ImageButton runat="server" ID="Button2" ImageUrl="exportButton.gif" AlternateText="Export All to Lotus Notes"
            OnClientClick="Export(this, event); return false;" OnClick="Button2_Click"></asp:ImageButton>
    </div>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" InitialDelayTime="200">
    </telerik:RadAjaxLoadingPanel>
    <div class="exampleContainer">
        <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px"
            DayStartTime="07:00:00" DayEndTime="18:00:00" DataSourceID="SqlDataSource1"
            DataKeyField="VacationDayId" DataSubjectField="Title" DataStartField="FromDate" DataEndField="ToDate"
            OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
            OnAppointmentInsert="RadScheduler1_AppointmentInsert"
            OnRecurrenceExceptionCreated="RadScheduler1_RecurrenceExceptionCreated">
            <AdvancedForm Modal="true"></AdvancedForm>
            <TimelineView UserSelectable="false"></TimelineView>
            <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
            <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
        </telerik:RadScheduler>
    </div>
 
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=HolidayTrackerEntities" DefaultContainerName="HolidayTrackerEntities" EnableDelete="True" EnableFlattening="False" EnableInsert="True" EntitySetName="HtVacationDays"></asp:EntityDataSource>
 
 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [HtVacationDay]" DeleteCommand="DELETE FROM [HtVacationDay] WHERE [VacationDayId] = @original_VacationDayId" InsertCommand="INSERT INTO [HtVacationDay] ([Title], [FromDate], [UserId], [Hours], [ToDate], [RecurrenceRule], [RecurrenceRuleID]) VALUES (@Title, @FromDate, @UserId, @Hours, @ToDate, @RecurrenceRule, @RecurrenceRuleID)" UpdateCommand="UPDATE [HtVacationDay] SET [Title] = @Title, [FromDate] = @FromDate, [UserId] = @UserId, [Hours] = @Hours, [ToDate] = @ToDate, [RecurrenceRule] = @RecurrenceRule, [RecurrenceRuleID] = @RecurrenceRuleID WHERE [VacationDayId] = @original_VacationDayId">
        <DeleteParameters>
            <asp:Parameter Name="original_VacationDayId" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Title" Type="String" />
            <asp:Parameter Name="FromDate" Type="DateTime" />
            <asp:Parameter Name="UserId" Type="Int32" />
            <asp:Parameter Name="Hours" Type="Double" />
            <asp:Parameter Name="ToDate" Type="DateTime" />
            <asp:Parameter Name="RecurrenceRule" Type="String" />
            <asp:Parameter Name="RecurrenceRuleID" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Title" Type="String" />
            <asp:Parameter Name="FromDate" Type="DateTime" />
            <asp:Parameter Name="UserId" Type="Int32" />
            <asp:Parameter Name="Hours" Type="Double" />
            <asp:Parameter Name="ToDate" Type="DateTime" />
            <asp:Parameter Name="RecurrenceRule" Type="String" />
            <asp:Parameter Name="RecurrenceRuleID" Type="String" />
            <asp:Parameter Name="original_VacationDayId" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
   
</asp:Content>

Thanks for help and fast answer
Plamen
Telerik team
 answered on 28 Nov 2012
3 answers
117 views
Hello,

I'm using the scheduler with a few custom attributes to handle some additional fields. Here's an example below.

When I perform the insert (the edit works the same way), I am handling the "AppointmentInsert" event and accessing the values with e.Appointment.Attributes("CustomAttribute").

For the AdminNotes and PublicNotes, this gets a value, for the AllocationGroupID and SlotCode, it just comes back as an empty string. Everything is otherwise identical and I can't figure it out here...

Anybody have any ideas?

Thanks,

Mike
Private Sub roomSlots_AppointmentInsert(sender As Object, e As Telerik.Web.UI.AppointmentInsertEventArgs) Handles roomSlots.AppointmentInsert
    Dim newSlot As New ProgramSlotInfo
    Dim ctlSlots As New ProgramSlotController
    With newSlot
        .ConferenceID = ConferenceID
        .StartTime = e.Appointment.Start
        .EndTime = e.Appointment.End
        .LocationRoomID = LocationRoomID
        .SlotCode = e.Appointment.Attributes("SlotCode")
        .AdminNotes = e.Appointment.Attributes("AdminNotes")
        .PublicNotes = e.Appointment.Attributes("PublicNotes")
        .AllocationGroupID = e.Appointment.Attributes("AllocationGroupID")
    End With
    ctlSlots.AddProgramSlot(newSlot)
End Sub


<telerik:RadScheduler runat="server" ID="roomSlots" AllowEdit="True" AllowDelete="True"
    AllowInsert="True" EnableDatePicker="False" SelectedView="WeekView" ShowAllDayRow="False"
    Width="100%" DataKeyField="ProgramSlotID"
    DataSubjectField="SlotCode" DataStartField="StartTime" DataEndField="EndTime" StartInsertingInAdvancedForm="true"
    EnableCustomAttributeEditing="true" CustomAttributeNames="PublicNotes,SlotCode,AdminNotes,AllocationGroupID" MinutesPerRow="60">
    <AdvancedInsertTemplate>
        <h2 class="dnnFormSectionHead"><asp:Label runat="server" ID="lblAddSlotHeader" resourcekey="AddSlotHeader" Text="Add New Slot"></asp:Label></h2>
        <div class="dnnForm">
            <div class="dnnFormItem">
                <dnn:label runat="server" id="lblStartTime" text="Start" resourcekey="StartLabel"></dnn:label>
                <telerik:RadDateTimePicker runat="server" ID="startTime" SelectedDate='<%#bind("Start") %>' TimeView-Interval="00:15:00" TimeView-Columns="4" TimeView-StartTime="6:00:00"></telerik:RadDateTimePicker>
            </div>
            <div class="dnnFormItem">
                <dnn:label runat="server" id="lblEndTime" text="End" resourcekey="EndLabel"></dnn:label>
                <telerik:RadDateTimePicker runat="server" ID="endTime" SelectedDate='<%#bind("End") %>' TimeView-Interval="00:15:00" TimeView-Columns="4" TimeView-StartTime="6:00:00"></telerik:RadDateTimePicker>
            </div>
            <div class="dnnFormItem">
                <dnn:label runat="server" id="lblSlotCode" text="Slot Code" resourcekey="SlotCodeLabel"></dnn:label>
                <asp:TextBox runat="server" ID="txtSlotCode" Text='<%# Bind("SlotCode") %>'></asp:TextBox>
            </div>
            <div class="dnnFormItem">
                <dnn:label runat="server" id="lblAllocationGroup" text="Allocation Group" resourcekey="AllocationGroupLabel"></dnn:label>
                <telerik:RadComboBox runat="server" ID="cboAllocationGroup" DataTextField="GroupName" DataValueField="AllocationGroupID" DataSourceID="dsAllocationGroups" selectedValue='<%#bind("AllocationGroupID") %>'></telerik:RadComboBox>
            </div>
            <div class="dnnFormItem">
                <dnn:label runat="server" id="lblPublicNotes" text="Public Notes" resourcekey="PublicNotesLabel"></dnn:label>
                <asp:TextBox runat="server" ID="txtPublicNotes" TextMode="MultiLine" Text='<%#Bind("PublicNotes") %>'></asp:TextBox>
            </div>
            <div class="dnnFormItem">
                <dnn:label runat="server" id="lblAdminNotes" text="Administrative Notes" resourcekey="AdminNotesLabel"></dnn:label>
                <asp:TextBox runat="server" ID="TextBox1" TextMode="MultiLine" Text='<%#Bind("AdminNotes") %>'></asp:TextBox>
            </div>
 
            <asp:LinkButton runat="server" ID="lnkCreateSlot" CommandName="Insert" Text="Create Slot" CssClass="dnnPrimaryAction"></asp:LinkButton>
            <asp:LinkButton runat="server" ID="lnkCancelInsert" CommandName="Cancel" Text="Cancel" CssClass="dnnSecondaryAction"></asp:LinkButton>
        </div>
    </AdvancedInsertTemplate>
Plamen
Telerik team
 answered on 28 Nov 2012
2 answers
82 views
Hello

Sorry if this is obviously available info elsewhere, but I checked the help docs and change logs and couln't see it.

Anyway, I'm (still!) stuck using an older version of the ASP.NET AJAX controls (2010 Q3 SP2), and was wondering what the officially supported browsers are/were.  I'm guessing that it's simply the latest versions if IE amd Firefox as of the time, plus IE6, but just wanted to confirm?

If so, and for future reference, is that a general case -- that on release the supported versions of each browser are up to the latest version on release?

Cheers.


Ian C
Ian
Top achievements
Rank 1
 answered on 28 Nov 2012
3 answers
163 views
Hi
I am using VS 2008 with your latest release and .net 3.5 and C#.  I have a radgrid whith data columns defined using templates as follows:

<

 

telerik:GridTemplateColumn   

 

        <ItemTemplate>

 

 

            <asp:Label ID="ShortActivityDescription"

 

 

                runat="server"

 

 

               Text='<%# Eval("ShortActivityDescription")%>'>

 

 

            </asp:Label>

 

 

        </ItemTemplate>

 

 

</telerik:GridTemplateColumn>

I originally load the grid (server side) during page load using the OnNeedDatasouce method defined in the RadGrid definition.  Thereafter, I am using javascript and webservice(s) to do the insert, update, and delete logic and database IO.  The webservice returns a list of data records to the calling javascript function.  the successful completion method then does the following code (exactly like your demo example):

 

 

function Get_West_Activity_Grid_Complete(result)

 

{

 

if (result != null)

 

    {

 

 

    var tableView = $find("<%= Grid_West.ClientID %>").get_masterTableView();

 

    tableView.set_dataSource(result);

    tableView.dataBind();

 

 


    var
grid = $find("<%= Grid_West.ClientID %>");

 

    grid.repaint();

 

    }

}

 

The data gets added, changed, or deleted to/from the database but the grid does not refresh reflecting the changed data.  The data properties in the web service result list contain the correct data and number of list objects are correct.  The List properties identifiers(names) match the label id in the item template.  The grid has the EnableAJAX property set to true.

I have researched the Forum material, user documentation and clientside api material and cannot see what I am doing wrong.  I have read thru the following sources:

Grid / WebService Binding
Grid / .NET 3.5 Client-side Data Binding - automatic binding to WCF and ADO.NET services
Grid / Declarative Binding
Grid / Programmatic Binding
Grid / Client-side Binding and Caching

Please help

Daniel
Telerik team
 answered on 28 Nov 2012
5 answers
167 views
hi ,i want to make one of the  columns unselectable  so the user can't select row by clicking on that column  or unselect  or darg mouse to select multi rows in same time (this column have no effect to select or unselect row or rows)
Ashraf
Top achievements
Rank 2
 answered on 28 Nov 2012
4 answers
108 views
I am getting an error that is just causing me all sorts of consternation finding a solution to.  My code was working until I made some changes and posted it back onto the production server.  The biggest problem here is that I don't get the error to occur on my dev machine so I can't use my debugger for any help.

I have an ASPX website with a Telerik RadGrid (version 2011.2.915.40) with another couple of RadGrids inside of the main 
NestedViewTemplate.  I have checked all throughout my code looking for a place where this conversion from
nvarchar to int may be taking place yet i can't find it.  I don't understand why this error is occurring and 
would be most grateful to anyone that has run into something like this before and can give me a heads up
on what might be happening.  Please see error message below.

Thanks,

James


Javascript error on Browser:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)
Timestamp: Wed, 21 Nov 2012 21:11:39 UTC
Message: Sys.WebForms.PageRequestManagerServerErrorException: Conversion failed when converting the nvarchar value 'CO00024843' to data type int.
Line: 3
Char: 74741
Code: 0
URI: https://localhost/IPM/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.60919.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aee051b62-9cd6-49a5-87bb-93c07bc43d63%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3a9799c67b-558a-475d-bf30-a0ccf0dbb8b7%3a16e4e7cd%3af7645509%3a22a6274a%3aed16cbdc%3a24ee1bba%3a19620875%3a874f8ea2%3af46195d3%3a490a9d4e%3abd8f85e4%3a58366029%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289

CodeBehind error:  System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException (0x80131904): Conversion failed when converting the nvarchar value 'CO00024843' to data type int.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.HasMoreRows()
   at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
   at System.Data.SqlClient.SqlDataReader.Read()
   at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
   at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
   at System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callb
Eyup
Telerik team
 answered on 28 Nov 2012
14 answers
804 views
Hi,

I've enabled the Header context menu for column and would like to hide/disable some of the columns that appear in the list. What is the best way to do this, are there any samples?

Thanks
Badrinarayanan
Top achievements
Rank 1
 answered on 28 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?