Click here to Skip to main content
15,888,521 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAngular project Pin
Nitin S4-Jul-18 20:34
professionalNitin S4-Jul-18 20:34 
AnswerRe: Angular project Pin
Vincent Maverick Durano5-Jul-18 15:05
professionalVincent Maverick Durano5-Jul-18 15:05 
Question.Net Core 2.1 - Setting Session Value in controller, then reading it in Controller Attribute. Pin
jkirkerx4-Jul-18 8:45
professionaljkirkerx4-Jul-18 8:45 
AnswerRe: .Net Core 2.1 - Setting Session Value in controller, then reading it in Controller Attribute. [solved maybe] Pin
jkirkerx4-Jul-18 10:22
professionaljkirkerx4-Jul-18 10:22 
QuestionLoop through dataset to create hyperlinks in aspx Pin
caffrey_13-Jul-18 23:44
caffrey_13-Jul-18 23:44 
AnswerRe: Loop through dataset to create hyperlinks in aspx Pin
Richard Deeming4-Jul-18 7:37
mveRichard Deeming4-Jul-18 7:37 
PraiseRe: Loop through dataset to create hyperlinks in aspx Pin
caffrey_14-Jul-18 10:27
caffrey_14-Jul-18 10:27 
QuestionBinding selected value of Dropdownlist to Grid Pin
indian1433-Jul-18 12:58
indian1433-Jul-18 12:58 
Hi,

I am using Kendo Dropdown list and Kendo Grid, when I select an item, in the dropdown, the Kendo grid should display the records for value of the selected item of the Kendo dropdown, when I change it, the records in the Grid also change. I am trying in the below way, not able to achieve, any help would be very helpful - thanks in advance.
@{
    ViewBag.Title = "ListLookups";
    //Layout = "~/Views/Shared/_LayoutFinal.cshtml";
}

<style>
    .k-edit-form-container {
        width: 500px;
    }
</style>
@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    <div class="tab-content" id="dvtabs" style="padding-top:10px;">
        <label class="col-md-4  control-label">Lookup</label>
        @(Html.Kendo().DropDownList().Name("Lookup").OptionLabel("Select")
                      .DataTextField("Text")
                                                     .DataValueField("Value").HtmlAttributes(new { style = "width:280px;", @id = "drpLookup" })
                              .DataSource(dataSource => dataSource.Read(read => read.Action("GetListOfLookupTables", "Admin")))
                              .Events(e =>
                                {
                                    e.Change("GetLookupTableValue");
                                })

<pre>
                          )
</div>
<div style="margin-top: 5px; padding-left:3%; padding-right:2%">
    <div>
        <div>
            <h4>List of Contacts</h4>
        </div>
        <div class="row  table-responsive " style="padding-left: 3%">
            <input type="hidden" id="LookupId" />
            <div id="datalist">
                @(Html.Kendo().Grid<DHCS.BH.Provider.Models.LookupTable>()
                    .Name("LookupGrid")
            .EnableCustomBinding(true)
            .AutoBind(false)
            .Columns(columns =>
            {
                columns.Bound(p => p.Id).Hidden();
                columns.Bound(p => p.Type);
                columns.Bound(p => p.Description);
                columns.Command(command => { command.Custom("View").Click("ViewLookupTableValues").HtmlAttributes(new { @class = "k-primary" }); }).Width(100);
            })
                .Pageable()
                .Sortable()
                .Scrollable()
                         .Resizable(resize => resize.Columns(true))
                        .Filterable(x => x.Extra(false).Operators(O => O.ForString(str => str.Clear().StartsWith("Starts With"))))
                .HtmlAttributes(new { style = "height:550px;" })

            .DataSource(ds => ds
                .Ajax()
                .PageSize(20)
                    .Model(model => { model.Id(p => p.Id); })
                    .Read(read => read.Action("GetLookupValues", "Admin").Data("GetLookupTableValue"))
                )
                )
            </div>
        </div>

    </div>
</div>

}


<pre>
$(document).ready(function ()
{&lt;br />
var grid = $("#LookupGrid").data("kendoGrid");
grid.dataSource.read();&lt;br />
})

function ViewLookupTableValues(e)
{
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
var PkContactId = dataItem.Id;
window.location.href = '@Url.Action("GetProgramTypeById", "ProgramType")?id=' + Id + "&amp;Type=View";
}

function GetLookupTableValue(e)
{ return {
LookupTableId: $("#Lookup").kendoDropDownList().val()
}
}
</pre>




Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."
AnswerRe: Binding selected value of Dropdownlist to Grid Pin
Vincent Maverick Durano3-Jul-18 16:20
professionalVincent Maverick Durano3-Jul-18 16:20 
Question.Net Core 2.1 IHostingEnvironment, how to access it Pin
jkirkerx28-Jun-18 20:14
professionaljkirkerx28-Jun-18 20:14 
AnswerRe: .Net Core 2.1 IHostingEnvironment, how to access it Pin
Richard Deeming29-Jun-18 0:00
mveRichard Deeming29-Jun-18 0:00 
GeneralRe: .Net Core 2.1 IHostingEnvironment, how to access it Pin
jkirkerx29-Jun-18 6:18
professionaljkirkerx29-Jun-18 6:18 
Question.Net Core 2.1, Get the Environment to seed a database so I can get the path Pin
jkirkerx28-Jun-18 9:02
professionaljkirkerx28-Jun-18 9:02 
AnswerDirectory.GetCurrentDirectory Pin
jkirkerx28-Jun-18 9:11
professionaljkirkerx28-Jun-18 9:11 
AnswerRe: .Net Core 2.1, Get the Environment to seed a database so I can get the path Pin
Richard Deeming28-Jun-18 10:26
mveRichard Deeming28-Jun-18 10:26 
GeneralRe: .Net Core 2.1, Get the Environment to seed a database so I can get the path Pin
jkirkerx28-Jun-18 11:56
professionaljkirkerx28-Jun-18 11:56 
QuestionSenior MVC Full Stack Developer Job Postings with Angular Experience Pin
jkirkerx27-Jun-18 8:42
professionaljkirkerx27-Jun-18 8:42 
AnswerRe: Senior MVC Full Stack Developer Job Postings with Angular Experience Pin
F-ES Sitecore27-Jun-18 23:44
professionalF-ES Sitecore27-Jun-18 23:44 
GeneralRe: Senior MVC Full Stack Developer Job Postings with Angular Experience Pin
jkirkerx28-Jun-18 6:50
professionaljkirkerx28-Jun-18 6:50 
AnswerRe: Senior MVC Full Stack Developer Job Postings with Angular Experience Pin
Richard Deeming28-Jun-18 1:03
mveRichard Deeming28-Jun-18 1:03 
GeneralRe: Senior MVC Full Stack Developer Job Postings with Angular Experience Pin
jkirkerx28-Jun-18 6:55
professionaljkirkerx28-Jun-18 6:55 
Question.net Core 2.1, Startup.cs, IConfiguration vs IHostingEnviroment Pin
jkirkerx27-Jun-18 7:14
professionaljkirkerx27-Jun-18 7:14 
AnswerRe: .net Core 2.1, Startup.cs, IConfiguration vs IHostingEnviroment Pin
Richard Deeming27-Jun-18 7:45
mveRichard Deeming27-Jun-18 7:45 
GeneralRe: .net Core 2.1, Startup.cs, IConfiguration vs IHostingEnviroment [solved] Pin
jkirkerx27-Jun-18 8:08
professionaljkirkerx27-Jun-18 8:08 
QuestionBody Tag, Razor and AngularJS workaround or better idea for body tag cannot have c# in it. Pin
jkirkerx27-Jun-18 6:26
professionaljkirkerx27-Jun-18 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.