Note that there are some explanatory texts on larger screens.

plurals
  1. POChange Grid datasource dynamically
    primarykey
    data
    text
    <p>I need to change the telerik mvc grid datasource on a dropdown selection change. below is my current view and i want to change the grid with the dropdown selection.</p> <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/ViewMasterPage.Master" Inherits="System.Web.Mvc.ViewPage&lt;IEnumerable&lt;GateApplication.Models.Gate&gt;&gt;" %&gt; &lt;%@ Import Namespace="Telerik.Web.Mvc.UI" %&gt; &lt;asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"&gt; Index &lt;/asp:Content&gt; &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt; &lt;div align="left" style="width: 100%"&gt; &lt;table&gt;&lt;tr&gt; &lt;td&gt;Search Form: &lt;/td&gt; &lt;td&gt;&lt;%= Html.Telerik().DropDownListFor(model =&gt; ViewData["drpSearch"]) .HtmlAttributes(new { @Style="width:250px" }) .BindTo(new SelectList((List&lt;SelectListItem&gt;)ViewData["drpSearch"], "Text", "Value"))%&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table&gt; &lt;/div&gt; &lt;br /&gt; &lt;%= Html.Telerik().Grid(Model) .Name("Grid") .Columns(columns =&gt; { columns.Bound(o =&gt; o.ID).Visible(false); columns.Bound(o =&gt; o.Urgency); columns.Bound(o =&gt; o.FullName); columns.Bound(o =&gt; o.Email); columns.Bound(o =&gt; o.GateSupportedBy); columns.Bound(o =&gt; o.FullPhone1).Title("Phone Number"); columns.Bound(o =&gt; o.StNstNo).Title("St. and St. No."); }) .DataBinding(dataBinding =&gt; { dataBinding.Ajax().Select("AjaxGrid", "Gate").Enabled(true); }) .Scrollable(scrolling =&gt; scrolling.Enabled(true)) .Sortable(sorting =&gt; sorting.Enabled(true)) .Pageable(paging =&gt; paging.Enabled(true).PageSize(10)) .Filterable(filtering =&gt; filtering.Enabled(true)) .Groupable(grouping =&gt; grouping.Enabled(true)) .Footer(true) %&gt; &lt;/asp:Content&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload