Jul 30, 2013, 2:01 PM
-
-
Jul 30, 2013, 7:15 PMI figured out that TriggerField listener is not working at all. When I click refresh on paging toolbar, its calling the function, but TriggerField ain't doing anyting
-
Jul 30, 2013, 8:40 PMOkay, sorry for the confusion.
I need to say that if I am clicking on the refresh Icon, its calling the function.
But when I am using the triggerfield, its not calling it at all. As per your instructions, I wrote the listener as App.Store1.load, but its not it.
new FieldTrigger(new FieldTrigger.Config {Icon=TriggerIcon.Search }) ).Listeners( ls => ls.TriggerClick.Handler = "App.Store1.load({params: {_StudID: this.getValue()}});" )
-
Jul 30, 2013, 8:59 PMBut when I am using the triggerfield, its not calling it at all.
Please post Store configuration -
Jul 30, 2013, 9:06 PMYes you got it right :)
GridPanel Code which include Store1
Controller CodeX.GridPanel().ID("gridUsers").Region(Region.Center).FrameHeader(false).Frame(true).ForceFit(true) .Store( X.Store().ID("Store1").RemotePaging(true).DataSource(Model).Model(X.Model().Fields( X.ModelField().Name("ID"), X.ModelField().Name("Name"), X.ModelField().Name("Email"), X.ModelField().Name("Password"), X.ModelField().Name("PhoneNo"), X.ModelField().Name("Expert").Type(ModelFieldType.Boolean), X.ModelField().Name("Discount"), X.ModelField().Name("Sitename") )).ServerProxy(X.AjaxProxy().Url(Url.Action("GetDatabySiteID"))) ) .ColumnModel ( X.Column().Text("Student ID").DataIndex("ID").MaxWidth(80), X.Column().Text("Student Name").DataIndex("Name"), X.Column().Text("Email").DataIndex("Email"), X.Column().Text("Password").DataIndex("Password").MaxWidth(100), X.Column().Text("Phone No").DataIndex("PhoneNo"), X.NumberColumn().Text("Credit").DataIndex("Discount").MaxWidth(60), X.CheckColumn().Text("Expert").DataIndex("Expert").MaxWidth(60), X.Column().Text("Registered with").DataIndex("Sitename").MaxWidth(130) ) .BottomBar( X.PagingToolbar().DisplayInfo(true).StoreID("Store1").Plugins(X.ProgressBarPager()) ) .Plugins( X.LiveSearchGridPanel() ) .TopBar( X.Toolbar().Items( X.Label().Text("User ID: "), X.TriggerField().ID("trguserID").Icon(Icon.Find).Width(100).Triggers( new FieldTrigger(new FieldTrigger.Config {Icon=TriggerIcon.Search }) ).Listeners( ls => ls.TriggerClick.Handler = "App.Store1.load({params: {StudID: this.getValue()}});" ), X.LiveSearchToolbar().HideRegExp(true).HideCaseSensitive(true).SaveDelay(1000).AutoFocus(true).AutoFocusDelay(1000) ) ) ) )
public ActionResult Index() { return View(Admin.MVC.Areas.Modules.Models.UsersModel.GetDataBySiteID()); } public StoreResult GetDatabySiteID(string SiteID="0", string StudID="0") { //This function is not working from TriggerField return this.Store(Admin.MVC.Areas.Modules.Models.UsersModel.GetDataByUserID(StudID)); }
-
Jul 30, 2013, 9:13 PMIf you use ServerProxy instead Proxy then you need to use reload method instead load
-
Jul 31, 2013, 2:42 AM
Similar Threads
-
Column Chart - Failed New Data Reload
By DenisEdde in forum 2.x HelpReplies: 4Last Post: Jun 27, 2013, 7:37 PM -
How to reload store data using mvc controller?
By FlavioSilveira in forum 2.x HelpReplies: 1Last Post: Feb 22, 2013, 4:22 AM -
How to reload CalendarPanel Data of Code-Behind?
By easypower in forum 1.x HelpReplies: 0Last Post: Jun 11, 2012, 3:37 AM -
How I can reload the data in a Propertygrid in combination with a gridpaanel selection
By doomsday in forum 1.x HelpReplies: 0Last Post: Sep 29, 2010, 8:11 PM -
Force combo to reload data?
By plykkegaard in forum 1.x HelpReplies: 2Last Post: Jan 05, 2010, 11:00 AM