The following code changes the configuration of a Grid control, but this reconfiguration only happens after a page refresh occurs.
How can I automate the user clicking the submit button? All the jQuery samples I see involve AJAX, but since I’m in the unique situation of needing to refresh the page, no one seems to have a sample available
<% using (Html.Configurator("The grid should...")
.PostTo("Details", "TLSWorkflow")
.Begin())
{ %>
<ul>
<li><%= Html.CheckBox("grouping", false, "allow <strong>grouping</strong> of data")%></li>
<li><%= Html.CheckBox("filtering", false, "allow <strong>filtering</strong> of data")%></li>
<li><%= Html.CheckBox("paging", false, "have <strong>pages</strong> with 10 items")%></li>
<li><%= Html.CheckBox("ajax", true, "make <strong>AJAX</strong> requests")%></li>
<li><%= Html.CheckBox("scrolling", true, "show a <strong>scrollbar</strong> when there are many items")%></li>
<li><%= Html.CheckBox("sorting", true, "allow <trong>sorting</strong> of data")%></li>
<li><%= Html.CheckBox("showFooter", false, "show footer")%></li>
</ul>
<button class="t-button" type="submit">Apply</button>
<% } %>
Just give your form an ID and call
submiton it:In plain JavaScript:
or using jQuery: