Hello Telerik Team
Currently I'm using RadControl version : 2011.1.315.35 (for ASP.NET AJAX). After doing research a lot on this forum and the Internet, I still can not solve my issue so I post here.
My ASPX file :
My code behind looks like
The very first issue I face is : when I select "aaa" the comboBox will automatically select "bbb". But this issue i already resolved by using
Now when I select "aaa" it will display "aaa" but I don't know why the SelectedIndexChanged event won't fire.
Please notice that
DataTextField="Desc"
DataValueField="PayID"
has unique value and it differs from other field.
I already follow many work around here but i still can make it.
Please help me out.
Many thanks in advance
Regards
Pasha
Currently I'm using RadControl version : 2011.1.315.35 (for ASP.NET AJAX). After doing research a lot on this forum and the Internet, I still can not solve my issue so I post here.
My ASPX file :
<%@ Page Title=
""
Language=
"C#"
MasterPageFile=
"~/MasterPage/DownloadCenter.Master"
AutoEventWireup=
"true"
CodeBehind=
"Test.aspx.cs"
Inherits=
"DownloadCenter.GUI.Test"
%>
<%@ Register Assembly=
"Telerik.Web.UI"
Namespace=
"Telerik.Web.UI"
TagPrefix=
"telerik"
%>
<asp:Content ID=
"Content1"
ContentPlaceHolderID=
"contentPage"
runat=
"server"
>
<telerik:RadScriptManager ID=
"RadScriptManager1"
runat=
"server"
>
</telerik:RadScriptManager>
<telerik:RadComboBox ID=
"rd"
runat=
"server"
EnableLoadOnDemand=
"True"
DataTextField=
"Desc"
DataValueField=
"PayID"
OnItemsRequested=
"RadComboBox1_ItemsRequested"
AutoPostBack=
"True"
onselectedindexchanged=
"rd_SelectedIndexChanged"
>
</telerik:RadComboBox>
</asp:Content>
My code behind looks like
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
DownloadCenter.Entity;
using
Telerik.Web.UI;
namespace
DownloadCenter.GUI
{
public
partial
class
Test : System.Web.UI.Page
{
BO bo =
new
BO();
DB db =
new
DB();
User user;
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!Page.IsPostBack)
{
BindRD();
}
}
private
void
BindRD()
{
rd.DataSource = db.GetPayMethod_CB();
rd.DataBind();
}
protected
void
RadComboBox1_ItemsRequested(
object
sender, RadComboBoxItemsRequestedEventArgs e)
{
rd.DataSource = db.GetPayMethod_CB();
rd.DataBind();
}
protected
void
rd_SelectedIndexChanged(
object
sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
string
tt = rd.SelectedValue.ToString();
Session[
"SupplierID"
] = e.Value;
}
}
The very first issue I face is : when I select "aaa" the comboBox will automatically select "bbb". But this issue i already resolved by using
<script language=
"javascript"
>
function
onBlur(comboBox) {
comboBox.OriginalText = comboBox.GetText();
}
</script>
Now when I select "aaa" it will display "aaa" but I don't know why the SelectedIndexChanged event won't fire.
Please notice that
DataTextField="Desc"
DataValueField="PayID"
has unique value and it differs from other field.
I already follow many work around here but i still can make it.
Please help me out.
Many thanks in advance
Regards
Pasha