Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
171 views
Hi,

I am loading the dropdown on client side page load by calling the Controller action that returs JSON object. The callback function looks as below:

function

 

(result) {

 

 

debugger;

 

comboBox = $find(

"<%= comboBox.ClientID%>");

 

 

for (var i = 0; i < $(result).length; i++) {

 

 

var item = result[i];

 

 

var comboItem = new Telerik.Web.UI.RadComboBoxItem();

 

comboItem.set_text(item.FullDescription);

comboItem.set_value(item.PatientIdentifier);

comboBox .get_items().add(comboItem);

 

if (item.PatientIdentifier == patId) {

 

comboItem.select();

}

}

});


It populates the combobox except the selection. When calling select() it throws an exception in the following line:

__doPostBack(

'ctl00$PageHeadTitle$comboBox','{"Command":"Select","Index":0}')

I tried to cancel the default behavior as below:

 

// This cancels the default RadComboBox behavior

 

 

 

 

function itemsRequesting(sender, args) {

 

args.set_cancel(

true);

 

}

It does not select the given item. Please guide me about how to select an item after binding it on client side.

Thanks

Sub
Top achievements
Rank 1
 answered on 28 Apr 2009
7 answers
532 views
I want to change the initial size of the popup window used on double click of a file and also make the window resizable. Currently the window is very small which is ok for images I guess, but I want to open pdf files etc and they are far too small for that purpose.

Thanks in advance, Steve
Lini
Telerik team
 answered on 28 Apr 2009
1 answer
211 views

Hi there,

Q1. Does the MOSS Rad Editor installation support side by side installation? Both version 2008 Q3 and 2009 Q1 in the same MOSS farm.

Q2. We have only installed ASP.NET AJAX 3.5 to get MOSS Rad Editor work. In your installation guide ASP.NET AJAX 1.0 is required. Do we need to install both versions of ASP.NET AJAX 1.0 and 3.5?

Thanks in advance
Stanimir
Telerik team
 answered on 28 Apr 2009
6 answers
963 views
Hi, how can i show confirm window  onbeforeunload? its because if user made any changes and didn't save and try to close the window, I need to show a confirm message window to notify the user. i have gone through some post regarding this, but couldnt find any particular solution. how can i do this? any sample code?

Thanks in advance

Mamun
Princy
Top achievements
Rank 2
 answered on 28 Apr 2009
7 answers
479 views

I'm trying to get the RadComboBox to work. We're using the RadControls 'Prometheus' for ASPNET Q3 2007 version: 2007.03.1314.20 from the Telerik.Web.UI.dll.; I believe this version is for AJAX.

When the page appears, the combo box appears with the text containing the first row(as expected), but it seems to be disabled. Nothing happens when clicking the drop-down arrow, nor entering text into the combobox itself.

I have tested this exact code with an older version (RadControls fro ASP.NET Q3 2007: version 2.8.3.0 RadCombobox.Net2.dll; I believe this version is NOT for AJAX.) and it works perfectly. (The only difference is the removal of a RadScriptManager which was required for the Prometheus version.)

The goal is to implement the Load On Demand functionality - similar to the example here:
http://demos.telerik.com/aspnet-ajax/ComboBox/Examples/PopulatingWithData/AutoCompleteSql/DefaultCS.aspx
but the ItemsRequested event doesn't seem to fire when using the example given here:
http://www.telerik.com/help/aspnet-ajax/combo_loadondemandoverview.html
I have attached my code. Any help would be great.
Thanks.

 

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
      
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
          
        <telerik:RadComboBox ID="comboContact" runat="server" > 
        </telerik:RadComboBox> 
          
    </div> 
    </form> 
</body> 
</html> 
 

 

 

 

using System;  
using System.Data;  
using System.Configuration;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
using System.Data.SqlClient;  
 
public partial class _Default : System.Web.UI.Page   
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        comboContact.DataSource = GetAllContacts();  
        comboContact.DataValueField = "ContactID";  
        comboContact.DataTextField = "FirstName";  
        comboContact.DataBind();  
    }  
 
    private DataSet GetAllContacts()  
    {  
        DataSet retVal = null;  
 
        try 
        {  
            using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["mainConnectionString"].ConnectionString))  
            {  
                SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM Contact ORDER BY FirstName", conn);  
                DataSet ds = new DataSet();  
                da.Fill(ds);  
 
                retVal = ds;  
            }  
        }  
        catch (SqlException ex)  
        {  
 
        }  
 
        return retVal;  
    }  
 
}  
 

SAI MRUDULA
Top achievements
Rank 1
 answered on 28 Apr 2009
1 answer
136 views
I am attempting to programmatically setup and databind the Rad Grid in a Console application in order to automatically export the grid contents on a scheduled time frame to a user.

I am able to get the DataBind() call to work by creating a Page object and adding the RadControl object to the page, and successfully fill the grid with data, however the GridExporting event will not fire when calling ExportToCSV()

I do have the event setup correctly.

Is this approach possible? 

Thanks,

Eric
Tsvetoslav
Telerik team
 answered on 28 Apr 2009
1 answer
135 views
Hi,

it looks as if this sample is broken: http://demos.telerik.com/aspnet-ajax/combobox/examples/loadondemand/adonetdataservice/defaultcs.aspx

"Open the combobox to see all item" - if I open it's empty.
So filtering (of course) has also no effect.

Tested with IE8

Regards

Manfred
Paul
Telerik team
 answered on 28 Apr 2009
1 answer
417 views
Hi,

I implemented with RadTextBox, when it runs, I pressed "enter", it causes a post back event and it runs through all defined events of other components.  I tried to set the attribute autopostback to be true unfortunately it does not help as the standard textbox of visual studio does.

Cheers,

Duy
ManniAT
Top achievements
Rank 2
 answered on 28 Apr 2009
2 answers
122 views
Hello,
- I want to know how to get some informations about the file that i`m uploading such as
( File Name, File Size, Download Link...etc)

- How can I save/Upload it with a different name ?

Thanks
Mando
Top achievements
Rank 1
 answered on 28 Apr 2009
1 answer
140 views
I am using the RADMenu control (the non-AJAX one so it's kind of old now) to open a RADWindow (the AJAX one). It all works great if the RadWindowManager is on a content page, but as soon as I put it on my masterpage directly I get the Javascript error about oManager being undefined.

Is this situation not supported? How would it even be different between a content page and a masterpage?
Georgi Tunev
Telerik team
 answered on 28 Apr 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?