EasyUI Forum
May 14, 2024, 07:52:00 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: combobox postback problem  (Read 9098 times)
nijokjose
Newbie
*
Posts: 3


View Profile
« on: August 21, 2013, 11:09:50 AM »

Hi All,
I'm a designer, new to easyui and so excited to use it. I tried a dropdownlist in asp.net for combobox. But the 'SelectedIndexChanged' event doesn't work. I hope this isn't a big issue and someone will be there to guide me.

Thanks in advance.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 21, 2013, 05:26:23 PM »

The combobox plugin is not a server side component. It has not SelectedIndexChanged event but onChange and onSelect events.
Code:
$('#cc').combobox({
  onChange:function(newValue, oldValue){
    //alert(newValue);
  },
  onSelect:function(row){
    alert(row)
  }
});
Logged
nijokjose
Newbie
*
Posts: 3


View Profile
« Reply #2 on: August 21, 2013, 10:34:15 PM »

Thanks for the reply.

But, is it possible to call the server side function onChange or onSelect?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: August 22, 2013, 01:48:08 AM »

It is easy to call server side function using $.ajax. Here is the simple example:
Code:
$.ajax({
type:'post',
url:'data.ashx',
contentType:'application/json;charset=utf-8',
dataType:'json',
success:function(result){
//...
}
});
Logged
nijokjose
Newbie
*
Posts: 3


View Profile
« Reply #4 on: August 23, 2013, 10:58:55 PM »

Thanks a lot. It works fine.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!