Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
139 views
I am following this example to apply the filtering capability in my RadGrid: http://www.telerik.com/forums/replacing-filtertemplate-on-autogenerated-column#epZqFpXIkk6TVsIFktTiug
Currently my combo.DataSource calls the stored procedure but this is very slow. Is there a way I can populate the RadComboBox from the RadGrid instead of calling the same stored proc again?
This is my RadComboBoxControl_DataBinding

 
public void RadComboBoxControl_DataBinding(object sender, EventArgs e)
  {
      RadComboBox combo = (RadComboBox)sender;
      GridFilteringItem container = (GridFilteringItem)combo.NamingContainer;
 
      combo.DataTextField = colname;
      combo.DataValueField = colname;
      combo.EnableAutomaticLoadOnDemand = true;
      combo.AllowCustomText = true;
      combo.AppendDataBoundItems = true;   
      combo.DataSource = new StoredProc().ExecuteTypedDataTable().SelectDistinct(colname);
      combo.DataBind();
      combo.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem { Text = "All", Value = "All" }); 
      combo.SelectedValue = selectedValue;
  }

Eyup
Telerik team
 answered on 07 Mar 2014
9 answers
135 views

Hi,


there is and error in scriptresource.axd, at both controls.

Used WebGrid, was WebGrid 8 and latest of telerik controls.







Default.aspx



<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
     
     
    <form id="form1" runat="server">
    <div>
        <%--NE RADI PROBLEME--%>
        <asp:ScriptManager ID="ScriptManager1" runat="server" ></asp:ScriptManager>
 
        <telerik:RadDropDownList ID="RadDropDownList1" runat="server">
            <Items>
                <telerik:DropDownListItem Value="0" Text="AAA" />
                <telerik:DropDownListItem Value="1" Text="BBB" />
            </Items>
        </telerik:RadDropDownList>
        <br />
        <%--RADI PROBLEME--%>
        <%--<telerik:RadComboBox ID="RadComboBox1" runat="server" >
            <Items>
                <telerik:RadComboBoxItem Text="AAA" Value="0" />
                <telerik:RadComboBoxItem Text="BBB" Value="1" />
            </Items>
        </telerik:RadComboBox>--%>
        <br />
        <%--RADI PROBLEME--%>
        <%--<telerik:RadDateInput ID="RadDateInput1" runat="server" ></telerik:RadDateInput>--%>
        <br />
        <telerik:RadTextBox ID="RadTextBox1" runat="server"></telerik:RadTextBox>
             
        <br />
        <telerik:RadMenu ID="RadMenu1" runat="server">
            <Items>
                <telerik:RadMenuItem Text="AAA" NavigateUrl="#">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="BBB" NavigateUrl="#">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
 
        <br />
        <br />
        <br />
        <ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="250px" UseDefaultStyle="true" Width="500px"></ISWebGrid:WebGrid>
 
 
    </div>
    </form>
</body>
</html>




Web.config



<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  -->
<configuration>
  <connectionStrings>
    <add name="WebSchedulerDataConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\WebSchedulerData.mdb;Persist Security Info=True" providerName="System.Data.OleDb"/>
  </connectionStrings>
  <appSettings>
    <!-- Intersoft Control Resources-->
    <add key="ISNet.WebUI.ISRes_Registered" value="true"/>
    <add key="ISNet.WebUI.WebCombo.v6_0_7200.RenderingMode" value="HTML5"/>
    <add key="ISNet.WebUI.WebDesktop.V4_0_7200.RenderingMode" value="HTML5"/>
    <add key="ISNet.WebUI.WebEssentials.v3_0_1000.RenderingMode" value="HTML5"/>
    <add key="ISNet.WebUI.WebGrid.v8_0_7200.RenderingMode" value="HTML5"/>
    <add key="ISNet.WebUI.WebInput.V4_0_7200.RenderingMode" value="HTML5"/>
    <add key="ISNet.WebUI.WebTextEditor.v2_0_1500.RenderingMode" value="HTML5"/>
    <add key="ISNet.WebUI.WebScheduler.v4_0_1000.RenderingMode" value="HTML5"/>
    <add key="ISNet.WebUI.WebTreeView.v1_0_1500.RenderingMode" value="HTML5"/>
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="ISNet.ActiveReports.Exporting, Version=5.0.7200.1, Culture=neutral, PublicKeyToken=B1F2A8511635667A"/>
        <add assembly="ISNet, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=B1F2A8511635667A"/>
        <add assembly="ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=B1F2A8511635667A"/>
        <add assembly="ISNet.WebUI.ISDataSource, Version=1.0.1500.1, Culture=neutral, PublicKeyToken=C4184EF0D326354B"/>
        <add assembly="ISNet.WebUI.Silverlight, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=B1F2A8511635667A"/>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </assemblies>
    </compilation>
    <httpHandlers>
      <!-- Intersoft Control Resources-->
      <add path="ISRes.axd" verb="GET" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" validate="true"/>
      <!-- Intersoft WebGrid Chart-->
      <add path="ISChart.axd" verb="GET" type="ISNet.WebUI.WebGrid.Chart.ChartRequestHandler, ISNet.WebUI.WebGrid" validate="true"/>
      <!-- Intersoft WebFileUploader-->
      <add path="WebFileUploaderHttpHandler.axd" verb="GET" type="ISNet.WebUI.WebTextEditor.WebFileUploaderHttpHandler, ISNet.WebUI.WebTextEditor"/>
      <!-- Intersoft WebScheduler-->
      <add path="ISScheduler.axd" verb="GET" type="ISNet.WebUI.WebScheduler.WebSchedulerRequestHandler, ISNet.WebUI.WebScheduler" validate="true"/>
      <!-- Intersoft WebAqua-->
      <add path="ISCoverFlow.axd" verb="GET" type="ISNet.WebUI.Silverlight.WebAqua.WebCoverFlowRequestHandler, ISNet.WebUI.Silverlight.WebAqua" validate="true"/>
    </httpHandlers>
    <httpModules>
      <!-- Intersoft WebFileUploader-->
      <add name="WebFileUploaderHttpModule" type="ISNet.WebUI.WebTextEditor.WebFileUploaderHttpModule, ISNet.WebUI.WebTextEditor"/>
    </httpModules>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
  </system.web>
  <system.webServer>
    <handlers>
      <add name="ISCoverFlow.axd_GET" path="ISCoverFlow.axd" verb="GET" type="ISNet.WebUI.Silverlight.WebAqua.WebCoverFlowRequestHandler, ISNet.WebUI.Silverlight.WebAqua" preCondition="integratedMode"/>
      <add name="ISChart.axd_GET, POST" path="ISChart.axd" verb="GET, POST" type="ISNet.WebUI.WebGrid.Chart.ChartRequestHandler, ISNet.WebUI.WebGrid" preCondition="integratedMode"/>
      <add name="ISRes.axd_GET" path="ISRes.axd" verb="GET" type="ISNet.WebUI.WebResourceHandler, ISNet.WebUI, Version=3.0.5000.1, Culture=neutral, PublicKeyToken=b1f2a8511635667a" preCondition="integratedMode"/>
      <add name="WebFileUploaderHttpHandler.axd_GET" path="WebFileUploaderHttpHandler.axd" verb="GET" type="ISNet.WebUI.WebTextEditor.WebFileUploaderHttpHandler, ISNet.WebUI.WebTextEditor" preCondition="integratedMode"/>
      <add name="ISScheduler.axd_GET" path="ISScheduler.axd" verb="GET" type="ISNet.WebUI.WebScheduler.WebSchedulerRequestHandler, ISNet.WebUI.WebScheduler" preCondition="integratedMode"/>
    </handlers>
    <modules>
      <add name="WebFileUploaderHttpModule_GET" preCondition="managedHandler" type="ISNet.WebUI.WebTextEditor.WebFileUploaderHttpModule, ISNet.WebUI.WebTextEditor"/>
    </modules>
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>
</configuration>








Hristo Valyavicharski
Telerik team
 answered on 07 Mar 2014
1 answer
211 views
If like me you've been struggling with using both LoadOnDemand and Checkboxes at the same time, here is my solution.

1.How do you remember what's been ticked as there is no viewstate recorded?

I used a hidden field in my page:

<div style="display:none">
    <input type="text" id="ComboCheck_HiddenField" name="ComboCheck_HiddenField"/>
</div>

Then called a function ComboCheck whenever fields were checked:

<telerik:RadComboBox ID="cbChooseFunds" runat="server" AllowCustomText="true" Width="400px"
    Height="200px" Filter="Contains" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
    HighlightTemplatedItems="true" CheckBoxes="true" ItemRequestTimeout="1000" MinFilterLength="0"
    EnableVirtualScrolling="true"  
    EnableEmbeddedSkins="false" Skin="AppSkin" EmptyMessage="Start typing to search for a fund" ZIndex="10000000" OnClientItemChecked="ComboCheck" OnClientItemsRequesting="Combo_OnClientItemsRequesting"  >
 
</telerik:RadComboBox>


function ComboCheck(sender, eventArgs) {
    var combo = eventArgs._item._parent;
    var newValues = "";
    var items = combo.get_items();
    var hiddenValues = document.getElementById('ComboCheck_HiddenField');
    for (var i = 0; i < items.get_count() ; i++) {
        var item = items.getItem(i);
        var checkbox = item.get_element().getElementsByTagName("input")[0];
        if (checkbox.checked) {
            newValues += item.get_value() + ",";
        }
    }
 
    hiddenValues.value = newValues;
}


2. How do you stop losing the text when you type and the combo fetches more data?

<telerik:RadComboBox ID="cbChooseFunds" runat="server" AllowCustomText="true" Width="400px"
    Height="200px" Filter="Contains" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
    HighlightTemplatedItems="true" CheckBoxes="true" ItemRequestTimeout="1000" MinFilterLength="0"
    EnableVirtualScrolling="true"  
    EnableEmbeddedSkins="false" Skin="AppSkin" EmptyMessage="Start typing to search for a fund" ZIndex="10000000" OnClientItemChecked="ComboCheck" OnClientItemsRequesting="Combo_OnClientItemsRequesting"  >
 
</telerik:RadComboBox>


The OnClientItemsRequesting event fires when the control needs more data. So we need to check the text at that point and then keep checking for a blank value and replace it when detected:

var ComboText = '';
var ComboInput;
function Combo_OnClientItemsRequesting(sender, eventArgs) {
    var combo = sender;
    ComboText = combo.get_text();
    ComboInput = combo.get_element().getElementsByTagName('input')[0];
    ComboInput.focus = function () { this.value = ComboText };
 
    if (ComboText != '') {
        window.setTimeout(TrapBlankCombo, 100);
    };
}
 
function TrapBlankCombo() {
    if (ComboInput) {
        if (ComboInput.value == '') {
            ComboInput.value = ComboText;
        }
        else {
            window.setTimeout(TrapBlankCombo, 100);
        };
    };
}



 
 
Nencho
Telerik team
 answered on 07 Mar 2014
4 answers
342 views
Hi,
I am using Radconfirm(Telerik Q3 2010) window.But when I am clicking on button and calling radconfirm thread is running as usual without clicking on OK button.
But what I want is thread should be blocked unless and untill I will not click ok button.
What I mean is server side event of that button should not fire unless and untill I will click on OK button.
But currently when I am clicking on button and calling RadConfirm from client side its firing server side event also before clicking on OK buttton.
Please help.
Thanks.
Sachin
Top achievements
Rank 1
 answered on 07 Mar 2014
1 answer
88 views
hi,

asp validation controls not firing after ajaxrequest been called.

i'm calling a function with below code to refresh a grid.

window[<My Grid Client ID>].AjaxRequest(<My Grid Unique ID>, 'Rebind');

after grid refreshed, validation not firing on clicking of submit button for the first time. for the next click it is working fine.

Hope this is due to ajax problem.

does any one came across this scenario...?
Konstantin Dikov
Telerik team
 answered on 07 Mar 2014
1 answer
142 views
Hi,

I want to use drag and drop feature between 2 Listbox. I am loading the data from server for 1st listbox. I can succesfully load the data and can see it in 1st listbox however i cant drag and drop to the second listbox the selected items. Thank you in advance for ur help.

this is how i load the data in code behind:
​ public void Populate()
{


var client = new Organon.IM.Presentation.IMPresentationService.PresentationServiceClient();
OperationResultDto<UserDto[]> Users = client.GetAllUsers();

var source = new BindingSource();
source.DataSource = Users.Data;
rlAssignments.DataSource = source;
rlAssignments.DataBind();

}


this is the code i am using the listboxes:

       <telerik:RadListBox ID="rlAssignments" runat="server" TransferMode="Copy" Width="250px" BackColor="#2D1A44" SelectionMode="Multiple" AllowTransfer="True" TransferToID="rlModellers" AutoPostBackOnTransfer="true"
AllowReorder="True" AutoPostBackOnReorder="true" EnableDragAndDrop="true" Skin="" CssClass="app-check">
<ItemTemplate>
<p><%# Eval("Username") %></p>
</ItemTemplate>

</telerik:RadListBox>


<telerik:RadListBox ID="rlModellers" runat="server" AllowTransfer="true" AutoPostBackOnTransfer="true"
SelectionMode="Multiple" AllowReorder="true" AutoPostBackOnReorder="true" EnableDragAndDrop="true"
Skin="" Width="510px">
<ItemTemplate>
<table style="width: 250px">
<tr style="width: 250px">
<td style="width: 470px"><span class="name fl"></span>
<span class="buttons fr">
<a href="" class="mini-action icon-delete-mini"></a>
</span>
</td>

</tr>
</table>
</ItemTemplate>

</telerik:RadListBox>
Bozhidar
Telerik team
 answered on 07 Mar 2014
3 answers
81 views
Hello,

I installed Telerik latest version, and I noticed that my editor height became smaller and not expanded over the td as it was on Telerik's previous versions.

Description: my editor is inside a td, and I set the editor to be width:100% and height: 100%- the width expands as it should (td wifth is equal to editor width) but the height doesn't behave the same (the editor height is smaller than the td height).

* on the previous versions it worked correctly.

Thanks,

Shinu
Top achievements
Rank 2
 answered on 07 Mar 2014
4 answers
404 views
Hi there,

I know this question has been asked thousands of time and I search for it in the forum but yet I could find anything to help me out.
As for many people, I'm trying to achieve such feature described here : Demo adding a custom field to an upload process.

Here is my (very simple) code :
01.<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="feature-data-upload.ascx.cs"
02.    Inherits="NRP.Study.usercontrols.feature_data_upload" %>
03.<telerik:RadScriptBlock ID="rsbDataUpload" runat="server">
04. 
05.    <script type="text/javascript">
06.        var $ = $telerik.$;
07. 
08.        function onClientFileUploaded(radAsyncUpload, args) {
09.            alert(1);
10.            var $row = $(args.get_row());
11.            var inputName = radAsyncUpload.getAdditionalFieldID("TextBox");
12.            var inputType = "text";
13.            var inputID = inputName;
14.            var input = createInput(inputType, inputID, inputName);
15.            var label = createLabel(inputID);
16.            $row.append("<br/>");
17.            $row.append(label);
18.            $row.append(input);
19.        }
20. 
21.        function createInput(inputType, inputID, inputName) {
22.            var input = '<input type="' + inputType + '" id="' + inputID + '" name="' + inputName + '" />';
23.            return input;
24.        }
25. 
26.        function createLabel(forArrt) {
27.            var label = '<label for=' + forArrt + '>File info: </label>';
28.            return label;
29.        }
30.        function startManualUpload() {
31.            var upload = $find('<%=rauDataUpload.ClientID%>');
32.            upload.startUpload();
33.        }
34.        function pauseManualUpload() {
35.            var upload = $find('<%=rauDataUpload.ClientID%>');
36.            upload.pauseUpload();
37.        }
38.        function resumeManualUpload() {
39.            var upload = $find('<%=rauDataUpload.ClientID%>');
40.            upload.resumeUpload();
41.        }
42.    </script>
43. 
44.</telerik:RadScriptBlock>
45.<telerik:RadProgressManager ID="rpmDataUpload" runat="server" />
46.<ul>
47.    <li>
48.        <input type="button" id="BtnStartUpload" onclick="startManualUpload()"
49.            value="Start" />
50.    </li>
51.    <li>
52.        <input type="button" id="BtnPauseUpload" onclick="pauseManualUpload()"
53.            value="Pause" />
54.    </li>
55.    <li>
56.        <input type="button" id="BtnResumeUpload" onclick="resumeManualUpload()"
57.            value="Resume" />
58.    </li>
59.    <li>
60.        <asp:Button ID="BtnSubmitFiles" runat="server" OnClick="BtnSubmitFiles_Clicked" Text="Submit" />
61.    </li>
62.</ul>
63.<telerik:RadAsyncUpload ID="rauDataUpload" runat="server" MultipleFileSelection="Automatic"
64.    ManualUpload="true" HttpHandlerUrl="~/Study/handlers/DataUploadManager.ashx"
65.    TemporaryFolder="~/App_Data/DataUploads" OnClientFilesUploaded="onClientFileUploaded">
66.</telerik:RadAsyncUpload>
67.<telerik:RadProgressArea ID="rpaDtatUpload" runat="server">
68.</telerik:RadProgressArea>

This is a usercontrol that I'm dynamically loading into my aspx page via a call to "LoadControl(xxxxx)".
The upload process looks good, everything works properly till it reaches that $(args.get_row()) on line #10.

Anyone has any idea why such "bug" ? Could this be due because I'm loading an external control from the page ?

Thanks,

Chris

Christophe
Top achievements
Rank 1
 answered on 07 Mar 2014
1 answer
71 views
Hi All,
We have BoundColumn with DateTime as DataField , we are using RadDatePicker for filtering purposes as shown in this demo for "Shipped Date" Column 
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultcs.aspx  .
Once we apply filter , the filter happens , but we are not able to clear the filter .
We have tried using AutoPostBackonfilter ="true" and by using RadAjaxCreated Method to clear the filter but it doesnot clear the filter.
Please update on how to resolve this problem .

-Dinesh
Princy
Top achievements
Rank 2
 answered on 07 Mar 2014
1 answer
403 views
I am following the demo to export a radscheduler to a calendar, but I am running into a problem using master pages and content pages. I have the RadAjaxManager in the masters page and RadAjaxManagerProxy in the content page.  I am getting an error trying to do the following (code is in the content page):

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function Export(sender, e) {
                $find("<%= RadAjaxManager1.ClientID %>").__doPostBack(sender.name, "");
            }
        </script>
    </telerik:RadCodeBlock>

I have this in the scheduler:
<asp:Button runat="server" ID="Button1" CssClass="rsExportButton" ToolTip="Export to iCalendar"
                                CommandName="Export" OnClientClick="Export(this, event); return false;" Style="cursor: pointer; cursor: hand;"></asp:Button>

I know I am not doing this right but I don't know what to reference properly in the javascript.

Thanks!
 
Darren
Top achievements
Rank 1
 answered on 06 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?