c# - How to execute an ActionResult using devexpress ribbon button? -


In my opinion, I have a devxpress ribbon with a ribbon like this:

  @ Html.DevExpress () Ribbon (settings = & gt; {settings.ShowFileTab = false; settings .name = "ribbon" var tab = settings.Add tabs ("options"); var workgroups = tab.groups. ("Range"); tasksGroup Items.Add (MVCxRibbonItemType.DateEditItem, s => {s.Name = "inicialDate"; s.Text = "Data Initial";}); tasksGroup.Items.Add (MVCxRibbonItemType.DateEditItem, s = & gt; {S.Name = "finalDate"; s.Text = "data last";}); tasksGroup.Items.Add (MVCxRibbonItemType.ButtonItem, b = & gt; {b.Text = "Send", B. Item Style. Backcollar = system; drawing; collar oranger;});}). GetHtml ()  

I can not understand how to execute a post in some posts to pass both dates in the form of parameters. Some controls in MVC developers are actually incompatible documents. Can anyone help me with it? According to this, DevExpress support is recommended to use client side events on the server side. See the example example below of data

  @ html.DevExpress (). Ribbon (s = & gt; {s.Name = "ribbon"; ...... s.ClientSideEvents.CommandExecuted = "function (s, e) {OnCommandExecuted (E, E);}", .... . TasksGroup.Items.Add (MVCxRibbonItemType.ButtonItem, b = & gt; {b.Text = "send"; b.Name = "SendData"; ......});}). GetHtml () & lt; Script & gt; Function OnCommandExecuted (E.E.) {if (e.item.name == "SendData") {$ .post ("/ Controller / Action inicialDate =?" + S.GetItemValueByName ("inicialDate") + "& FinalDate "+ S.GetItemValueByName (" end date "), function (data) {}, function (mistake) {}); }} & Lt; / Script & gt;  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -