Sunday, May 3, 2015

Grouping RadioButton in GridView

EnableRbtnGrouping: function (spanChk) {
        ///<summary>
        /// Used to un Check other Radio buttons in the Grid
        ///</summary>
        /// <param name="mode" optional="true" type="String">
        /// Mode = 1 Determins ites on View Mode
        /// Mode = 2 Indicates its on New Mode
        /// </param>
        //Mode = 1 Indicates its on View Mode
        //Mode = 2 Indicates its on New Mode
        var IsChecked = spanChk.checked;
        var CurrentRdbID = spanChk.id;
        //Finding the Grid Id with RadioButoon as Parent
        var gridID = $(spanChk).parents("table:first").attr("id");
        $("[id$=" + gridID + "]").find("tr:has(td)").each(function () {
            var id = $(this).find("td:first input").attr("id");
            if (id != CurrentRdbID) {
                $(this).find("td:first input").attr("checked", false);
            }
        });
        if (typeof AfterRbtnSelect == 'function') {
            AfterRbtnSelect(gridID);
        }
    },

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...