Wednesday, 26 July 2017

Kendo MVC
RibbonMenu


@using Kendo.Mvc.UI
@(Html.Kendo().ToolBar()
    .Name("ToolBar")
    .Items(items =>
    {
        //items.Add().Type(CommandType.Button).Click("homebtn").Id("btn_Home").ImageUrl(Url.Content("~/images/icon/home.png")).HtmlAttributes(new { @title = "Home" });
        items.Add().Type(CommandType.Button).Id("btn_new").ImageUrl(Url.Content("~/images/icon/add_new.png")).HtmlAttributes(new { @title = "New" });//.Text("Add")
        items.Add().Type(CommandType.Button).Click("savebtn").Id("rbn_leadSave").ImageUrl(Url.Content("~/images/icon/save.png")).HtmlAttributes(new { @title = "Save" });//.Click("createbtn")
        items.Add().Type(CommandType.Button).Id("btn_Edit").ImageUrl(Url.Content("~/images/icon/Edit.png")).HtmlAttributes(new { @title = "Edit" });//.Click("createbtn")
        items.Add().Type(CommandType.Button).Id("btn_Delete").ImageUrl(Url.Content("~/images/icon/delete.png")).HtmlAttributes(new { @title = "Delete" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Click("backbtn").Id("btn_backword").ImageUrl(Url.Content("~/images/icon/Back.png")).HtmlAttributes(new { @title = "Backward" });//.Text("Add")
        items.Add().Type(CommandType.Button).Click("forwardbtn").Id("btn_forword").ImageUrl(Url.Content("~/images/icon/Forward.png")).HtmlAttributes(new { @title = "Forward" });
        //items.Add().Type(CommandType.Separator);

        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Click("clearbtn").Id("btn_clear").ImageUrl(Url.Content("~/images/icon/clear.png")).HtmlAttributes(new { @title = "Clear" });
        //  items.Add().Type(CommandType.Button).Click("refreshbtn").Id("btn_Refresh").ImageUrl(Url.Content("~/images/Refress1.jpg")).HtmlAttributes(new { @title = "Refresh" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Id("btn_upload").ImageUrl(Url.Content("~/images/icon/upload.png")).HtmlAttributes(new { @title = "Upload" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Template("<input id='dropdown' style='width: 160px;'  />").Overflow(ShowInOverflowPopup.Never);
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Id("btn_Export").ImageUrl(Url.Content("~/images/icon/Export.png")).HtmlAttributes(new { @title = "Export" });
        items.Add().Type(CommandType.Button).Id("btn_Exportexcel").ImageUrl(Url.Content("~/images/icon/ExportExcel.png")).HtmlAttributes(new { @title = "Export Excel" });
        // items.Add().Type();
        items.Add().Type(CommandType.Button).Id("btn_print").ImageUrl(Url.Content("~/images/icon/printer.png")).HtmlAttributes(new { @title = "Print" });
        items.Add().Type(CommandType.Button).Id("btn_print").ImageUrl(Url.Content("~/images/icon/help.png")).HtmlAttributes(new { @title = "Help" });
        //  items.Add().Type(CommandType.Button).Click("editbtn").Id("btn_Edit").ImageUrl(Url.Content("~/images/Edit1.jpg"));//.Text("Add")


        //items.Add().Type(CommandType.Button).Click("logoutbtn").Id("btn_Delete").ImageUrl(Url.Content("~/images/icon/logout.png"));
        //items.Add().Template("<img src='" + Url.Content("~/images/Create1.jpg") + "' alt='add image' title='create' />");
        //items.Add().Type(CommandType.Separator);
        //items.Add().Template("<img src='" + Url.Content("~/images/Edit1.jpg") + "' alt='add image' title='Edit' />");
        //items.Add().Type(CommandType.Separator);
        // items.Add().Template("<img src='" + Url.Content("~/images/Refress1.jpg") + "' alt='add image' title='Refresh' />");
    })
        // .Events(e => e.Click("onClick").Toggle("onToggle").Open("onOpen").Close("onClose").OverflowOpen("onOverflowOpen").OverflowClose("onOverflowClose"))
)
@*@(Html.Kendo().AutoComplete()
                        .Name("kautocomplete1")
                        .MinLength(1)
                        .Placeholder("Select Customer")
                        .HtmlAttributes(new { style = "width:20%" })
                        .BindTo(new string[] { "Bulgaria", "USA", "India", "Australia", "UK" })
                        .Template("<span><img src='/images/${data}.jpg' " + " width='30' height='30' />&nbsp;${data}</span>")
                        .Filter(FilterType.Contains)
    )*@

<script>

    $(document).ready(function () {

        $("#dropdown").kendoDropDownList({
            optionLabel: "Select",
            dataTextField: "text",
            dataValueField: "value",
            dataSource: [
                { text: "A", value: 1 },
                { text: "B", value: 2 },
                { text: "C", value: 3 },
                { text: "D", value: 4 },
                { text: "E", value: 5 },
            ]
        });
    });

    function homebtn(e) {

        document.location.href = "localhost:2588/HRMSMain/Index";
        return;

    }

    //function savebtn(e) {
    //    alert('hgfhfgh');
    //    return;

    //}

    function editbtn(e)
    {
        alert(e.id);
        return;

    }

    function backbtn(e)
    {

        parent.history.back();
        return false;

    }
    function forwardbtn(e)
    {

        parent.history.forward();
        return true;

    }
    function clearbtn()
    {
        $(':input').each(function () {
            var type = this.type;
            var tag = this.tagName.toLowerCase();

            if (type == 'text' || type == 'password' || tag == 'textarea' || type == 'file')
                this.value = "";


            else if (type == 'checkbox' || type == 'radio')
                this.checked = false;

            else if (tag == 'select')
                this.selectedIndex = 0;
        });
    }
    function refreshbtn()
    {
       // document.location.reload();
        location.reload(true)
    }

    function deletebtn(e)
    {
        alert(e.id);

    }

</script>

////////////////////////////////////////////////////////////////////////

Kendo MVCEditRibbonMenu


@using Kendo.Mvc.UI
@(Html.Kendo().ToolBar()
    .Name("ToolBar")
    .Items(items =>
    {
        //items.Add().Type(CommandType.Button).Click("homebtn").Id("btn_Home").ImageUrl(Url.Content("~/images/icon/home.png")).HtmlAttributes(new { @title = "Home" });
        items.Add().Type(CommandType.Button).Id("btn_new").ImageUrl(Url.Content("~/images/icon/add_new.png")).HtmlAttributes(new { @title = "New" });//.Text("Add")
        items.Add().Type(CommandType.Button).Click("savebtn").Id("rbn_leadSave").ImageUrl(Url.Content("~/images/icon/save.png")).HtmlAttributes(new { @title = "Save" });//.Click("createbtn")
        items.Add().Type(CommandType.Button).Id("btn_Edit").ImageUrl(Url.Content("~/images/icon/Edit.png")).HtmlAttributes(new { @title = "Edit" });//.Click("createbtn")
        items.Add().Type(CommandType.Button).Id("btn_Delete").ImageUrl(Url.Content("~/images/icon/delete.png")).HtmlAttributes(new { @title = "Delete" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Click("backbtn").Id("btn_backword").ImageUrl(Url.Content("~/images/icon/Back.png")).HtmlAttributes(new { @title = "Backward" });//.Text("Add")
        items.Add().Type(CommandType.Button).Click("forwardbtn").Id("btn_forword").ImageUrl(Url.Content("~/images/icon/Forward.png")).HtmlAttributes(new { @title = "Forward" });
        //items.Add().Type(CommandType.Separator);

        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Click("clearbtn").Id("btn_clear").ImageUrl(Url.Content("~/images/icon/clear.png")).HtmlAttributes(new { @title = "Clear" });
        //  items.Add().Type(CommandType.Button).Click("refreshbtn").Id("btn_Refresh").ImageUrl(Url.Content("~/images/Refress1.jpg")).HtmlAttributes(new { @title = "Refresh" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Id("btn_upload").ImageUrl(Url.Content("~/images/icon/upload.png")).HtmlAttributes(new { @title = "Upload" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Template("<input id='dropdown' style='width: 160px;'  />").Overflow(ShowInOverflowPopup.Never);
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Id("btn_Export").ImageUrl(Url.Content("~/images/icon/Export.png")).HtmlAttributes(new { @title = "Export" });
        items.Add().Type(CommandType.Button).Id("btn_Exportexcel").ImageUrl(Url.Content("~/images/icon/ExportExcel.png")).HtmlAttributes(new { @title = "Export Excel" });
        // items.Add().Type();
        items.Add().Type(CommandType.Button).Id("btn_print").ImageUrl(Url.Content("~/images/icon/printer.png")).HtmlAttributes(new { @title = "Print" });
        items.Add().Type(CommandType.Button).Id("btn_print").ImageUrl(Url.Content("~/images/icon/help.png")).HtmlAttributes(new { @title = "Help" });
        //  items.Add().Type(CommandType.Button).Click("editbtn").Id("btn_Edit").ImageUrl(Url.Content("~/images/Edit1.jpg"));//.Text("Add")


        //items.Add().Type(CommandType.Button).Click("logoutbtn").Id("btn_Delete").ImageUrl(Url.Content("~/images/icon/logout.png"));
        //items.Add().Template("<img src='" + Url.Content("~/images/Create1.jpg") + "' alt='add image' title='create' />");
        //items.Add().Type(CommandType.Separator);
        //items.Add().Template("<img src='" + Url.Content("~/images/Edit1.jpg") + "' alt='add image' title='Edit' />");
        //items.Add().Type(CommandType.Separator);
        // items.Add().Template("<img src='" + Url.Content("~/images/Refress1.jpg") + "' alt='add image' title='Refresh' />");
    })
        // .Events(e => e.Click("onClick").Toggle("onToggle").Open("onOpen").Close("onClose").OverflowOpen("onOverflowOpen").OverflowClose("onOverflowClose"))
)
@*@(Html.Kendo().AutoComplete()
                        .Name("kautocomplete1")
                        .MinLength(1)
                        .Placeholder("Select Customer")
                        .HtmlAttributes(new { style = "width:20%" })
                        .BindTo(new string[] { "Bulgaria", "USA", "India", "Australia", "UK" })
                        .Template("<span><img src='/images/${data}.jpg' " + " width='30' height='30' />&nbsp;${data}</span>")
                        .Filter(FilterType.Contains)
    )*@

<script>

    $(document).ready(function () {

        $("#dropdown").kendoDropDownList({
            optionLabel: "Select",
            dataTextField: "text",
            dataValueField: "value",
            dataSource: [
                { text: "A", value: 1 },
                { text: "B", value: 2 },
                { text: "C", value: 3 },
                { text: "D", value: 4 },
                { text: "E", value: 5 },
            ]
        });
    });

    function homebtn(e) {

        document.location.href = "localhost:2588/HRMSMain/Index";
        return;

    }

    //function savebtn(e) {
    //    alert('hgfhfgh');
    //    return;

    //}

    function editbtn(e)
    {
        alert(e.id);
        return;

    }

    function backbtn(e)
    {

        parent.history.back();
        return false;

    }
    function forwardbtn(e)
    {

        parent.history.forward();
        return true;

    }
    function clearbtn()
    {
        $(':input').each(function () {
            var type = this.type;
            var tag = this.tagName.toLowerCase();

            if (type == 'text' || type == 'password' || tag == 'textarea' || type == 'file')
                this.value = "";


            else if (type == 'checkbox' || type == 'radio')
                this.checked = false;

            else if (tag == 'select')
                this.selectedIndex = 0;
        });
    }
    function refreshbtn()
    {
       // document.location.reload();
        location.reload(true)
    }

    function deletebtn(e)
    {
        alert(e.id);

    }

</script>



Kendo MVC
RibbonMenuView

@using Kendo.Mvc.UI
@(Html.Kendo().ToolBar()
    .Name("ToolBar")
    .Items(items =>
    {


        //items.Add().Type(CommandType.Button).Click("homebtn").Id("btn_Home").ImageUrl(Url.Content("~/images/icon/home.png")).HtmlAttributes(new { @title = "Home" });
        items.Add().Type(CommandType.Button).Click("rbn_LeadDetailsNew").Id("btn_new").ImageUrl(Url.Content("~/images/icon/add_new.png")).HtmlAttributes(new { @title = "New" });//.Text("Add")
        items.Add().Type(CommandType.Button).Id("rbn_LeadDetailsSave").ImageUrl(Url.Content("~/images/icon/save.png")).HtmlAttributes(new { @title = "Save" });//.Click("createbtn")
        items.Add().Type(CommandType.Button).Click("rbn_LeadDetailsEditbtn").Id("btn_Edit").ImageUrl(Url.Content("~/images/icon/Edit.png")).HtmlAttributes(new { @title = "Edit" });//.Click("createbtn")
        items.Add().Type(CommandType.Button).Id("btn_Delete").ImageUrl(Url.Content("~/images/icon/delete.png")).HtmlAttributes(new { @title = "Delete" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Click("backbtn").Id("btn_backword").ImageUrl(Url.Content("~/images/icon/Back.png")).HtmlAttributes(new { @title = "Backward" });//.Text("Add")
        items.Add().Type(CommandType.Button).Click("forwardbtn").Id("btn_forword").ImageUrl(Url.Content("~/images/icon/Forward.png")).HtmlAttributes(new { @title = "Forward" });
        //items.Add().Type(CommandType.Separator);


        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Click("clearbtn").Id("btn_clear").ImageUrl(Url.Content("~/images/icon/clear.png")).HtmlAttributes(new { @title = "Clear" });
        //  items.Add().Type(CommandType.Button).Click("refreshbtn").Id("btn_Refresh").ImageUrl(Url.Content("~/images/Refress1.jpg")).HtmlAttributes(new { @title = "Refresh" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Id("btn_upload").ImageUrl(Url.Content("~/images/icon/upload.png")).HtmlAttributes(new { @title = "Upload" });//.Text("Add")
        items.Add().Type(CommandType.Separator);
        items.Add().Template("<input id='dropdown' style='width: 160px;'  />").Overflow(ShowInOverflowPopup.Never);
        items.Add().Type(CommandType.Separator);
        items.Add().Type(CommandType.Button).Id("btn_Export").ImageUrl(Url.Content("~/images/icon/Export.png")).HtmlAttributes(new { @title = "Export" });
        items.Add().Type(CommandType.Button).Id("btn_Exportexcel").ImageUrl(Url.Content("~/images/icon/ExportExcel.png")).HtmlAttributes(new { @title = "Export Excel" });
        // items.Add().Type();
        items.Add().Type(CommandType.Button).Id("btn_print").ImageUrl(Url.Content("~/images/icon/printer.png")).HtmlAttributes(new { @title = "Print" });
        items.Add().Type(CommandType.Button).Id("btn_print").ImageUrl(Url.Content("~/images/icon/help.png")).HtmlAttributes(new { @title = "Help" });
        items.Add().Type(CommandType.Button).Click("rbn_LeadViewConvert").ImageUrl(Url.Content("~/images/icon/convert.jpg")).HtmlAttributes(new { @title = "Qualify" });
        //  items.Add().Type(CommandType.Button).Click("editbtn").Id("btn_Edit").ImageUrl(Url.Content("~/images/Edit1.jpg"));//.Text("Add")


        //items.Add().Type(CommandType.Button).Click("logoutbtn").Id("btn_Delete").ImageUrl(Url.Content("~/images/icon/logout.png"));
        //items.Add().Template("<img src='" + Url.Content("~/images/Create1.jpg") + "' alt='add image' title='create' />");
        //items.Add().Type(CommandType.Separator);
        //items.Add().Template("<img src='" + Url.Content("~/images/Edit1.jpg") + "' alt='add image' title='Edit' />");
        //items.Add().Type(CommandType.Separator);
        // items.Add().Template("<img src='" + Url.Content("~/images/Refress1.jpg") + "' alt='add image' title='Refresh' />");
    })
        // .Events(e => e.Click("onClick").Toggle("onToggle").Open("onOpen").Close("onClose").OverflowOpen("onOverflowOpen").OverflowClose("onOverflowClose"))
)
@*@(Html.Kendo().AutoComplete()
                        .Name("kautocomplete1")
                        .MinLength(1)
                        .Placeholder("Select Customer")
                        .HtmlAttributes(new { style = "width:20%" })
                        .BindTo(new string[] { "Bulgaria", "USA", "India", "Australia", "UK" })
                        .Template("<span><img src='/images/${data}.jpg' " + " width='30' height='30' />&nbsp;${data}</span>")
                        .Filter(FilterType.Contains)
    )*@

<script>

    $(document).ready(function () {

        $("#dropdown").kendoDropDownList({
            optionLabel: "Select",
            dataTextField: "text",
            dataValueField: "value",
            dataSource: [
                { text: "A", value: 1 },
                { text: "B", value: 2 },
                { text: "C", value: 3 },
                { text: "D", value: 4 },
                { text: "E", value: 5 },
            ]
        });
    });

    function homebtn(e) {

        document.location.href = "localhost:2588/HRMSMain/Index";
        return;

    }

    function rbn_LeadDetailsNew(e) {
          var url = '@Url.Action("CreateLead", "LeadDetails")';
        window.location.href = url;

        return;

    }
    function editbtn(e)
    {
        alert(e.id);
        return;

    }

    function backbtn(e)
    {

        parent.history.back();
        return false;

    }
    function forwardbtn(e)
    {

        parent.history.forward();
        return true;

    }
    function clearbtn()
    {
        $(':input').each(function () {
            var type = this.type;
            var tag = this.tagName.toLowerCase();

            if (type == 'text' || type == 'password' || tag == 'textarea' || type == 'file')
                this.value = "";


            else if (type == 'checkbox' || type == 'radio')
                this.checked = false;

            else if (tag == 'select')
                this.selectedIndex = 0;
        });
    }
    function refreshbtn()
    {
       // document.location.reload();
        location.reload(true)
    }

    function deletebtn(e)
    {
        alert(e.id);

    }

</script>




Kendo MVC
Partial Create View


@using Kendo.Mvc.UI
@model CRM.Models.ViewLeadModel
   @{

    ViewBag.Title = "PRV_CreateLead";
}
<div class="col-md-12">
    <div class="col-md-6">
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="form-group"></div>  
        <div class="col-md-5" style="width:25%">
            Leade Name:
        </div>

   
        <div class="col-md-7">
            @*@(Html.Kendo().TextBoxFor(t => t.JobTitle)
                   .Name("txtname")
               
                  .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))*@
            <input type="lebel"
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Job Title:
        </div>
        <div class="col-md-7">
                      @(Html.Kendo().TextBoxFor(t=>t.JobTitle)
                   .Name("txtjobtitle")
                  .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Lead Source:
        </div>
        <div class="col-md-7">
                    @(Html.Kendo().TextBoxFor(t=>t.LeadSource)
                 .Name("txtSource")
                .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Lead Type:
        </div>
        <div class="col-md-7">
                   @(Html.Kendo().TextBoxFor(t=>t.LeadTypeName)
                 .Name("txtType")
                  .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            AssignTo:
        </div>
        <div class="col-md-7">
                   @(Html.Kendo().TextBoxFor(t=>t.AssignedTo)
                  .Name("txtAssignTo")
                 .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Description:
        </div>
        <div class="col-md-7">
                   @(Html.Kendo().TextBoxFor(t=>t.Description)
                 .Name("txtDescription")
                  .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Phone No:
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBoxFor(t=>t.PhoneNo)
                 .Name("txtPhone")
        .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Email :
        </div>
        <div class="col-md-7">
                   @(Html.Kendo().TextBoxFor(t=>t.EmailId)
                 .Name("txtEmail")
               .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Skype:
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBoxFor(t=>t.Skype)
                 .Name("txtSkype")
        .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Potential Amount:
        </div>
        <div class="col-md-7">
                 @(Html.Kendo().TextBoxFor(t=>t.PotentialAmount)
                 .Name("txtAmount")
                .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Rank :
        </div>
        <div class="col-md-7">
                 @(Html.Kendo().TextBoxFor(t=>t.Rank)
                 .Name("txtRank")
                 .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Teritory :
        </div>
        <div class="col-md-7">
                   @(Html.Kendo().TextBoxFor(t=>t.TerritoryName)
                       .Name("txtTeritory")
                   .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            NoOf Employee:
        </div>
        <div class="col-md-7">
                 @(Html.Kendo().TextBoxFor(t=>t.NoOfEmployee)
                 .Name("txtEmployee")
                 .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Industry :
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBoxFor(t=>t.IndustryName)
                 .Name("txtIndustry")
        .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Address Type :
        </div>
        <div class="col-md-7">
                 @(Html.Kendo().TextBoxFor(t=>t.AddressTypeId)
                 .Name("txtAddressType")
                .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Address Line1:
        </div>
        <div class="col-md-7">
                    @(Html.Kendo().TextBoxFor(t=>t.AddressLine1)
                 .Name("txtAddressLine1")
                   .HtmlAttributes(new {@readonly = "readonly" , style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Country :
        </div>
        <div class="col-md-7">
                 @(Html.Kendo().TextBoxFor(t=>t.CountryName)
                 .Name("txtCountry")
                         .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
     
    </div>
    <div class="col-md-6">
        <div class="form-group"></div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Zipcode :
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBoxFor(t => t.ZipCode)
                 .Name("txtZipcode")
                        .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Delivery Instruction:
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtDeliveryInstruction")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Facebook :
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtFacebook")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            LinkedIn:
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtLinkedIn")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Wayto Contact:
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtWaytoContact")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Lead Source:
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtLeadSource")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            ReferedBy:
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtReferedBy")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
   
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
            Fax :
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtFax")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
        <div class="clearfix" style="margin-bottom:2px;"></div>
        <div class="col-md-5" style="width:25%">
           Estimate Closing Date:
        </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtClosingDate")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    <div class="clearfix" style="margin-bottom:2px;"></div>
    <div class="col-md-5" style="width:25%">
        Source Campaign:
    </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtCampaign")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    <div class="clearfix" style="margin-bottom:2px;"></div>
    <div class="col-md-5" style="width:25%">
        Company :
    </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtCompany")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    <div class="clearfix" style="margin-bottom:2px;"></div>
    <div class="col-md-5" style="width:25%">
        Anual Revenue:
    </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtAnualRevenue")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    <div class="clearfix" style="margin-bottom:2px;"></div>
    <div class="col-md-5" style="width:25%">
       Address Line2:
    </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtAddressLine2")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    <div class="clearfix" style="margin-bottom:2px;"></div>
    <div class="col-md-5" style="width:25%">
        State :
    </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtState")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    <div class="clearfix" style="margin-bottom:2px;"></div>
    <div class="col-md-5" style="width:25%">
       City :
    </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtCity")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    <div class="clearfix" style="margin-bottom:2px;"></div>
    <div class="col-md-5" style="width:25%">
        Twiter :
    </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtTwiter")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    <div class="clearfix" style="margin-bottom:2px;"></div>
    <div class="col-md-5" style="width:25%">
        Website :
    </div>
        <div class="col-md-7">
            @(Html.Kendo().TextBox()
                 .Name("txtWebsite")
                .HtmlAttributes(new { @readonly = "readonly", style = "width: 100%;" }))
        </div>
    </div>
</div>

Kendo MVC
Grid  View




@using Kendo.Mvc.UI

@{
    ViewBag.Title = "ViewLead";
    Layout = "~/Views/Shared/_FinalMasterLayout.cshtml";
}

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>View Page</title>
    @*<script>
        function Closeabc1() {
            $("#PopGridData").show();
        }
        function RowSelected(e) {
            debugger
            var gview = $("#Leadgrid").data("kendoGrid");
            //Getting selected item
            var selectedItem = gview.dataItem(gview.select());
            var id = selectedItem.LeadId
            var ln = selectedItem.LeadName
            var jt = selectedItem.JobTitle
            var ls = selectedItem.LeadSource
            var lt = selectedItem.LeadTypeName
            var at = selectedItem.AssignedTo
            var des = selectedItem.Description
            var pno = selectedItem.PhoneNo
            var skyp = selectedItem.Skyp
            var pa = selectedItem.PotentialAmount
            var rank = selectedItem.Rank
            var teritory = selectedItem.TerritoryName
            var noemp = selectedItem.NoOfEmployee
            var indus = selectedItem.IndustryName
            var addtype = selectedItem.AddressTypeId
            var addlane1 = selectedItem.AddressLine1
            var country = selectedItem.CountryName
            var zip = selectedItem.ZipCode
            var delvryinst = selectedItem.DeleveryInstruction
            var fb = selectedItem.Facebook
            var li = selectedItem.LinkedIn
            var wtc = selectedItem.BestWayToContact
            var referedby = selectedItem.ReferredBy
            var email = selectedItem.EmailId
            var fax = selectedItem.Fax
            var ecost = selectedItem.EstimatedCloseDate
            var campaign = selectedItem.campaign
            var com = selectedItem.company
            var ar = selectedItem.AnnualRevenue
            var addresslane2 = selectedItem.AddressLine2
            var state = selectedItem.StateName
            var city = selectedItem.CityName
            var twitter = selectedItem.Twitter
            var website = selectedItem.WebSite


            $.ajax({
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: '/LeadDetails/ShowPopUp',
                data: '{"LeadId":"' + id + '","LeadName":"' + ln + '","jobTitle":"' + jt + '","leadsource":"' + ls + '","leadType":"' + lt + '","assigned":"' + at + '","description":"' + des + '","phoneno":"' + pno + '","skype":"' + skyp + '","potential":"' + pa + '""rank":"' + rank + '","teritory":"' + teritory + '","noempy":"' + noemp + '","industry":"' + indus + '","addresstype":"' + addtype + '","addresslane1":"' + addlane1 + '","country":"' + country + '","zip":"' + zip + '","delvryinst":"' + delvryinst + '","facebook":"' + fb + '","linkdin":"' + li + '","waytocontact":"' + wtc + '","referedby":"' + referedby + '","email":"' + email + '","fax":"' + fax + '","ecost":"' + ecost + '","campaign":"' + campaign + '","company":"' + com + '","annulrev":"' + ar + '","addresslane2":"' + addresslane2 + '","state":"' + state + '","city":"' + city + '","twitter":"' + twitter + '","website":"' + website + '"}',
                dataType: "json",
            });

            document.getElementById("txtname").value = ln
            document.getElementById("txtjobtitle").value = jt
            document.getElementById("txtSource").value = ls
            document.getElementById("txtType").value = lt
            document.getElementById("txtAssignTo").value = at
            document.getElementById("txtDescription").value = des
            document.getElementById("txtPhone").value = pno

            document.getElementById("txtSkype").value = skyp
            document.getElementById("txtAmount").value = pa
            document.getElementById("txtRank").value = rank
            document.getElementById("txtTeritory").value = teritory
            document.getElementById("txtEmployee").value = noemp
            document.getElementById("txtIndustry").value = indus
            document.getElementById("txtAddressType").value = addtype
            document.getElementById("txtAddressLine1").value = addlane1
            document.getElementById("txtCountry").value = country
            document.getElementById("txtZipcode").value = zip
            document.getElementById("txtDeliveryInstruction").value = delvryinst

            document.getElementById("txtFacebook").value = fb
            document.getElementById("txtLinkedIn").value = li
            document.getElementById("txtWaytoContact").value = wtc
            //document.getElementById("txtLeadSource").value = ln
            document.getElementById("txtReferedBy").value = referedby
            document.getElementById("txtEmail").value = email
            document.getElementById("txtFax").value = fax
            document.getElementById("txtClosingDate").value = ecost
            document.getElementById("txtCampaign").value = campaign
            document.getElementById("txtCompany").value = com
            document.getElementById("txtAnualRevenue").value = ar
            document.getElementById("txtAddressLine2").value = addresslane2
            document.getElementById("txtState").value = state
            document.getElementById("txtCity").value = city
            document.getElementById("txtTwiter").value = twitter
            document.getElementById("txtWebsite").value = website

            $("#PopGridData").data("kendoWindow").open();
        }
        function onClose() {
            $("#PopGridData").data("kendoWindow").close();
        }
    </script>*@
    @*<script>
        function onClose() {
            $("#Leadgrid").show();
        }
        $(document).ready(function () {
            $("#Leadgrid").bind("dblclick", function () {
                $("#PopGridData").data("kendoWindow").center().open();
                $("#Leadgrid").show();
            });
        });
        </script>*@

    <script>
        var rowNumber = 0;

        function resetRowNumber(e) {
            rowNumber = 0;
        }

        function renderNumber(data) {
            return ++rowNumber;
        }
        //function checkAll(ele) {
        //    debugger;
        //    var state = $(ele).is(':checked');
        //    var grid = $('#Leadgrid').data('kendoGrid');
        //    var Count = $('#Leadgrid').data("kendoGrid").dataSource.total();
        //    if (state == true) {
        //        $('.chkFormols').prop('checked', true);
        //        grid.tbody.find('tr').attr("class", "k-state-selected");
        //    }
        //    else {

        //        $('.chkFormols').prop('checked', false);
        //        grid.tbody.find('tr').removeAttr("class", "k-state-selected");
        //    }
        //};
        function SetCheckBOX(ele) {
            debugger;
            var state = $(ele).is(':checked');
            var grid = $('#Leadgrid').data('kendoGrid');
            var Count = $('#Leadgrid').data("kendoGrid").dataSource.total();
            for (i = 0; i < Count; i++) {
                var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.chkFormols').is(':checked');
                if (isChecked == true) {
                    grid.tbody.find('tr:eq(' + i + ')').attr("class", "k-state-selected");
                   
                }
                else {
                    grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
                    //$("#over_hide").show();
                }
            }
            if (state == true) {
                $("#over_hide").hide();
            }
            else {
                $("#over_hide").show();
            }
        };


        function rbn_LeadDetailsEditbtn(ele) {
            debugger;
            var grid = $('#Leadgrid').data('kendoGrid');
            var Count = $('#Leadgrid').data("kendoGrid").dataSource.total();
            for (i = 0; i < Count; i++) {
                var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.chkFormols').is(':checked');
                if (isChecked == true) {
                    grid.tbody.find('tr:eq(' + i + ')').attr("class", "k-state-selected");
                    var rw = grid.tbody.find('tr:eq(' + i + ')');
                    var cellValue = rw.find("td:eq(" + 1 + ")").text();
                    alert(cellValue);
                    var url = "/LeadDetails/EditLead?id=" + cellValue;
                    window.location.href = url;
                    $.ajax({
                        method: "POST",
                        dataType: 'text',
                        url: '/LeadDetails/EditLead1/',
                        data: { id: cellValue },
                        success: function (data) {
                            if (data) {
                                window.location.href = "EditLead";
                            }
                            else {
                                window.location.href = "url";
                            }
                        }
                    });
                }
                else {
                    grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
                }
            }
        }


        function rbn_LeadViewConvert(ele) {
            debugger;
            var grid = $('#Leadgrid').data('kendoGrid');
            var Count = $('#Leadgrid').data("kendoGrid").dataSource.total();
            for (i = 0; i < Count; i++) {
                var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.chkFormols').is(':checked');
                if (isChecked == true) {
                    grid.tbody.find('tr:eq(' + i + ')').attr("class", "k-state-selected");
                    var rw = grid.tbody.find('tr:eq(' + i + ')');
                    var cellValue = rw.find("td:eq(" + 1 + ")").text();
               
                    alert(cellValue);
                    $.ajax({
                        method: "POST",
                        dataType: 'text',
                        url: '/LeadDetails/ConvertLead1/',
                        data: { id: cellValue },
                        success: function (data) {
                            if (data) {
                                window.location.href = "ConvertLead";
                            }
                            else {
                                window.location.href = "url";
                            }
                        }
                    });
                }
                else {
                    grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
                }
            }
            location.reload();
        }



    </script>
    @*<script type="text/javascript">
        $(document).ready(function () {
            $('tr').dblclick(function () {
                alert('dblclick');
            });
        });
        </script>*@
   
    <style>
        .Newtoolbar {
        height:28px;
        width:236px;
        background-color:#f1f1f1;
        border:1px solid #ccc;
        float:right;
        }
        .Newtoolbar_Box {
        height:20px;
        width:20px;
        border:1px solid #ccc;
        padding:2px;
        margin:3px;
        float:left;
        }
        /* Tooltip container */
        .Mytooltip {
            position: relative;
            display: inline-block;
        }

            .Mytooltip a {
                color: #4a8bf5;
            }
            /* Tooltip text */
            .Mytooltip .Mytooltiptext {
                visibility: hidden;
                width: 120px;
                background-color: #000;
                color: #fff;
                text-align: center;
                padding: 5px 0;
                border-radius: 6px;
                /* Position the tooltip text - see examples below! */
                position: absolute;
                z-index: 9999;
                top:25px;
                left:-100px;
            }
            /* Show the tooltip text when you mouse over the tooltip container */
            .Mytooltip:hover .Mytooltiptext {
                visibility: visible;
            }
    </style>
   
    <script>
        $(document).ready(function () {
            $("#div_toolOption").hide();
        });
        function SetOption(ele) {
            debugger;
            $("#div_toolOption").slideToggle(1000);
        };

    </script>
</head>
<body>

    <div class="bodee1">
        @Html.Partial("_LeadViewRibbonMenu")
    </div>
    <div style="padding:10px;">
        <div style="width:100%;height:27px;text-align:center;" id="div_toolOption">
            <div class="Newtoolbar">
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-tag" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">Schedule Follow Up</span>
                    </div>
                </div>
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-star" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">Add Event</span>
                    </div>
                </div>
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-tasks" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">Add Task</span>
                    </div>
                </div>
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-earphone" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">Log Call</span>
                    </div>
                </div>
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-envelope" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">Send Email</span>
                    </div>
                </div>
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-edit" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">Add Note</span>
                    </div>
                </div>
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-paperclip" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">Add Document</span>
                    </div>
                </div>
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-option-horizontal" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">More Details</span>
                    </div>
                </div>
                <div class="Newtoolbar_Box">
                    <div class="Mytooltip">
                        <span class="glyphicon glyphicon-trash" style="cursor:pointer"></span>
                        <span class="Mytooltiptext">Delete</span>
                    </div>
                </div>
            </div>
            <div id="over_hide" style="width:235px;height:27px;background-color:rgba(255, 255, 255, 0.42);position:absolute;z-index:99999;right:29px;"></div>
        </div>
        <div>
            @(Html.Kendo().Grid<CRM.Models.ViewLeadModel>()
                .Name("Leadgrid")
        .Columns(columns =>
        {

            columns.Template(@<text></text>).ClientTemplate("<input  type='checkbox' name='chkStatus' type='checkbox' class='chkFormols' onclick='SetCheckBOX(this)'>").Width(50);

            //.HeaderTemplate("<input type='checkbox' id='chkSelectAll' onclick='checkAll(this)' />").Width(50);
            //columns.Template(t => { }).Title("SL No").ClientTemplate("#= renderNumber(data) #");
            columns.Bound(o => o.LeadId).Hidden();
            columns.Bound(o => o.ClientId).Hidden();
     
            columns.Bound(o => o.Title).Title("Salutation");
            columns.Bound(o => o.LeadName).Title("Lead Name");
            columns.Bound(o => o.JobTitle).Hidden();
            columns.Bound(o => o.BestWayToContact).Hidden();
            columns.Bound(o => o.Company);
         
         
            columns.Bound(o => o.LeadStatus).Hidden();
            columns.Bound(o => o.LeadTypeId).Hidden();
            columns.Bound(o => o.ReferredBy).Hidden();
            columns.Bound(o => o.AssignedTo).Hidden();
            columns.Bound(o => o.Description).Hidden();
            columns.Bound(o => o.CreatedOn).Hidden();
            columns.Bound(o => o.PhoneNo);
            columns.Bound(o => o.EmailId);
            columns.Bound(o => o.LeadSource).Hidden();
            columns.Bound(o => o.SourceName).Title("LeadSource");
            columns.Bound(o => o.Rating);
            columns.Bound(o => o.StatusId).Hidden();
            columns.Bound(o => o.StatusName).Title("Status");
           

         
            columns.Bound(o => o.Skype).Hidden();
            columns.Bound(o => o.Fax).Hidden();

            //columns.Bound(o => o.PotentialAmount);
            columns.Bound(o => o.EstimatedCloseDate).Hidden();
            columns.Bound(o => o.Rank).Hidden();
            columns.Bound(o => o.CampaignId).Hidden();
            columns.Bound(o => o.TerritoryId).Hidden();

            columns.Bound(o => o.CustomerId).Hidden();
            columns.Bound(o => o.IndustryId).Hidden();
         
            //columns.Bound(o => o.NoOfEmployee);
            columns.Bound(o => o.AnnualRevenue).Hidden();

            columns.Bound(o => o.AddressTypeId).Hidden();
            //columns.Bound(o => o.AddressLine1);
            columns.Bound(o => o.AddressLine2).Hidden();
            columns.Bound(o => o.CityId).Hidden();
            columns.Bound(o => o.StateId).Hidden();
            columns.Bound(o => o.CountryId).Hidden();
            columns.Bound(o => o.ZipCode).Hidden();
            columns.Bound(o => o.DeleveryInstruction).Hidden();

            columns.Bound(o => o.Facebook).Hidden();
            columns.Bound(o => o.Twitter).Hidden();
            columns.Bound(o => o.LinkedIn).Hidden();
            columns.Bound(o => o.WebSite).Hidden();
            columns.Bound(o => o.StatusName).Hidden();
           
            columns.Template(@<text></text>).ClientTemplate("<span class='glyphicon glyphicon-option-horizontal' style='cursor:pointer' onclick='SetOption(this)'></span>").Title("Options");
        })
                                            .Events(ev => ev.DataBound("resetRowNumber"))
                    // .HtmlAttributes(new { style = "height: 100%" })
                                    .Pageable(pageable => pageable
                                    .Refresh(true)
                                    .PageSizes(true)
                                    .ButtonCount(5)
                                    )
                                    .Selectable()
                                    .Sortable()
                                    .Filterable()
                    //.Scrollable()
                    //.Groupable()
                                    .DataSource(dataSource => dataSource
                                    .Ajax()
                                    .PageSize(10)
                                    .Model(model => { model.Id(o => o.LeadId); })
                                     .Read(read => read.Action("ViewLead1", "LeadDetails"))
                                     )
)
        </div>
     
       
    </div>
    @(Html.Kendo().Window().Name("PopGridData")
                .Title("Display Grid Data")
                .Visible(false)
                .Modal(true)
                .Content(@<text>
                    <div style="width:100%" id="fieldlist">

                        @Html.Partial("PRV_CreateLead")


                    </div>
                </text>)
                                                                    .Draggable()
                                                                    .Width(800)
                                                                    .Height(500)

                                                                    .Actions(actions => actions.Pin().Minimize().Maximize().Close())
                                                                   //.Events(ev => ev.Close("Closeabc1"))
    )
</body>
</html>

Kendo MVC
Edit View


@using Kendo.Mvc.UI
@{
    ViewBag.Title = "EditLead";
    Layout = "~/Views/Shared/_FinalMasterLayout.cshtml";
}
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
    <script>
    $(window).load(function () {
        var dropDown = $("#ddlempsel").data("kendoDropDownList");
        dropDown.enable(false);
        var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
        dropDown1.enable(false);

        var refer = $("#txthiderefer").val();
        if (refer == 'Employee') {
            dropDown.enable(true);
        }
        else if (refer == 'Customer') {
            dropDown1.enable(true);
        }
        else if ($("#txtotherRef").val() != '') {
            $("#txtotherRef").show();
        }
        debugger
        var pht = $("#txthidePhoto").val();
        if (pht != '')
        {
            $('#imageupload').src = pht;
            document.getElementById("imageupload").src = pht;
        }

        $("#emp_chk").bind("click", function () {
            var dropDown = $("#ddlempsel").data("kendoDropDownList");
            dropDown.enable(true);
            var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
            dropDown1.enable(false);
            $("#txtotherRef").hide(1000);
        });
        $("#cus_chk").bind("click", function () {
            var dropDown = $("#ddlempsel").data("kendoDropDownList");
            dropDown.enable(false);
            var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
            dropDown1.enable(true);
            $("#txtotherRef").hide(1000);
        });
        $("#top_div").scrollTop(0);
    });
    function onClickOther(e) {
        var dropDown = $("#ddlempsel").data("kendoDropDownList");
        dropDown.enable(false);
        var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
        dropDown1.enable(false);

        $("#txtotherRef").show(1000);
    }



    </script>

    <script type="text/javascript">
    function isNumberKey(evt) {
        var charCode = (evt.which) ? evt.which : event.keyCode;
        if (charCode != 46 && charCode > 31
          && (charCode < 48 || charCode > 57))
            return false;
        //$("#errormsg").html("Digits Only").show().fadeOut("slow");
        return true;
    }
    function isCharacterKey(evt) {
        if ((event.keyCode > 64 && event.keyCode < 91) || (event.keyCode > 96 && event.keyCode < 123) || event.keyCode == 8)
            return true;
        else {
            //alert("Please enter only char");
            return false;
        }
    }
    </script>

    <script>
    $(document).ready(function () {

        $("#txtotherRef").hide();
        $("#addbtnDel1").hide();
        $("#addbtnDel2").hide();
        $("#addbtnDel3").hide();
        $("#addbtnDel4").hide();
        $("#add_panel2").hide();
        $("#add_panel3").hide();
        $("#add_panel4").hide();

        $("#addbtnPlus1").click(function () {
            $("#addbtnDel1").show();
            $("#addbtnPlus1").hide();
            $("#add_panel2").show(1000);
        });

        $("#addbtnDel1").click(function () {

            $("#addbtnPlus1").show();
            $("#addbtnDel1").hide();
            $("#add_panel2").hide(1000);
        });

        $("#addbtnPlus2").click(function () {
            $("#addbtnDel2").show();
            $("#addbtnPlus2").hide();
            $("#add_panel3").show(1000);
        });

        $("#addbtnDel2").click(function () {
            $("#addbtnPlus2").show();
            $("#addbtnDel2").hide();
            $("#add_panel3").hide(1000);
        });

        $("#addbtnPlus3").click(function () {
            $("#addbtnDel3").show();
            $("#addbtnPlus3").hide();
            $("#add_panel4").show(1000);
        });

        $("#addbtnDel3").click(function () {
            $("#addbtnPlus3").show();
            $("#addbtnDel3").hide();
            $("#add_panel4").hide(1000);
        });


    });
    </script>

    <script language="javascript" type="text/javascript">

    var PhoneuniqueId = 1;
    var EmailuniqueId = 1;
    function AddPhone_onclick() {
        debugger
        $test = $("#div_AddPhone").clone().prependTo(".add_phonepanel");
        $test.find("#ddlLeadPhoneType").kendoDropDownList().each(function () {
            this.id += PhoneuniqueId
            $test.find("#ddlLeadPhoneType" + PhoneuniqueId + "").kendoDropDownList({
                Name: ("ddlLeadPhoneType" + PhoneuniqueId + ""),
                dataTextField: "text",
                dataValueField: "value",
                dataSource:
                     [
                        { text: "Business", value: "Business" },
                        { text: "Home", value: "Home" },
                        { text: "Mobile", value: "Mobile" },
                        { text: "Other", value: "Other" }
                     ]
            });
        });
        $test.find("#div_AddPhonePanel").each(function () { this.id += PhoneuniqueId });
        $test.find("#txtConPhone").each(function () { this.id += PhoneuniqueId });
        $test.find("#Phone_Del").css('display', 'inline');
        $test.find("#Phone_Del").each(function () { this.id += PhoneuniqueId });
        PhoneuniqueId++;
    }
    function Phone_Del_Click(e) {
        debugger
        var deleteid = e.id;
        var unId = deleteid.substring(9);

        $("#div_AddPhonePanel" + unId + "").remove();
        PhoneuniqueId--;
    }
    function AddEmail_onclick() {
        debugger
        $test = $("#div_AddEmail").clone().prependTo(".add_emailpanel");
        $test.find("#ddlLeadEmailType").kendoDropDownList().each(function () {
            this.id += EmailuniqueId
            $test.find("#ddlLeadEmailType" + EmailuniqueId + "").kendoDropDownList({
                Name: ("ddlLeadEmailType" + EmailuniqueId + ""),
                dataTextField: "text",
                dataValueField: "value",
                dataSource:
                     [
                        { text: "Business", value: "Business" },
                        { text: "Home", value: "Home" },
                        { text: "Mobile", value: "Mobile" },
                        { text: "Other", value: "Other" }
                     ]
            });
        });
        $test.find("#div_AddEmailPanel").each(function () { this.id += EmailuniqueId });
        $test.find("#txtConEmail").each(function () { this.id += EmailuniqueId });
        $test.find("#Email_Del").css('display', 'inline');
        $test.find("#Email_Del").each(function () { this.id += EmailuniqueId });
        EmailuniqueId++;
    }

    function Email_Del_Click(e) {
        debugger
        var deleteid = e.id;
        var unId = deleteid.substring(9);

        $("#div_AddEmailPanel" + unId + "").remove();
        EmailuniqueId--;
    }
    </script>



    @*------Popup Show-----*@
    <script>
        function onClose1() {
            $("#leadTypeAdd").show();
            $("#leadSouceAdd").show();
            $("#leadAssignSearch").show();
            $("#leadreffereddBy").show();
            $("#LeadTerritoryAdd").show();
            $("#LeadcampaignAdd").show();
            $("#LeadcustomerAdd").show();
            $("#LeadempAdd").show();
            $("#LeadindustryAdd").show();
            $("#LeadaddressTypAdd").show();
        }
        $(document).ready(function () {
            $("#leadTypeAdd").bind("click", function () {
                $("#popupLeadtype").data("kendoWindow").center().open();
                $("#leadTypeAdd").show();
            });
            $("#leadSouceAdd").bind("click", function () {
                $("#popupLeadsource").data("kendoWindow").center().open();
                $("#leadSouceAdd").show();
            });
            $("#leadAssignSearch").bind("click", function () {
                $("#popupLeadAssign").data("kendoWindow").center().open();
                $("#leadAssignSearch").show();
            });
            $("#leadreffereddBy").bind("click", function () {
                $("#popupLeadreffered").data("kendoWindow").center().open();
                $("#leadreffereddBy").show();
            });
            $("#LeadTerritoryAdd").bind("click", function () {
                $("#popupLeadterritory").data("kendoWindow").center().open();
                $("#LeadTerritoryAdd").show();
            });
            $("#LeadcampaignAdd").bind("click", function () {
                $("#popupLeadcampaign").data("kendoWindow").center().open();
                $("#LeadcampaignAdd").show();
            });
            $("#LeadcustomerAdd").bind("click", function () {
                $("#popupLeadcustomer").data("kendoWindow").center().open();
                $("#LeadcustomerAdd").show();
            });
            $("#LeadempAdd").bind("click", function () {
                $("#popupLeademp").data("kendoWindow").center().open();
                $("#LeadempAdd").show();
            });
            $("#LeadindustryAdd").bind("click", function () {
                $("#popupLeadindustry").data("kendoWindow").center().open();
                $("#LeadindustryAdd").show();
            });
            $("#LeadaddressTypAdd").bind("click", function () {
                $("#popupLeadAddressTyp").data("kendoWindow").center().open();
                $("#LeadaddressTypAdd").show();
            });
        });
    </script>

    <style>
        /* Tooltip container */
        .Mytooltip {
            position: relative;
            display: inline-block;
        }

            .Mytooltip a {
                color: #4a8bf5;
            }
            /* Tooltip text */
            .Mytooltip .Mytooltiptext {
                visibility: hidden;
                width: 120px;
                background-color: #524e4e;
                color: #fff;
                text-align: center;
                padding: 5px 0;
                border-radius: 6px;
                /* Position the tooltip text - see examples below! */
                position: absolute;
                z-index: 1;
            }
            /* Show the tooltip text when you mouse over the tooltip container */
            .Mytooltip:hover .Mytooltiptext {
                visibility: visible;
            }

        .Upper_strip {
            width: 100%;
            height: 36px;
            background-color: #ebe9e9;
            border: 1px solid #b9b9b9;
            padding: 3px;
            background-image: none,linear-gradient(to bottom,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 100%);
            background-image: none,-o-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 100%);
            background-image: none,-moz-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 100%);
            background-image: none,-webkit-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 100%);
        }

        .Upstrip {
            color: #4a8bf5;
        font-size: 11px;
        }

        .k-filename {
            display: inline-block;
            min-width: 120px;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .k-widget, .k-upload, .k-header {
            padding: 0px;
        }

        .k-dropzone {
            padding: 4px;
            height: 23px;
        }

        .k-file {
            padding: 0px !important;
            font-size: 11px;
        }

        .k-upload-selected {
            padding: 3px;
            font-size: 11px;
            margin: 3px;
        }

        .k-upload-files {
            margin: 0px;
        }

        .k-upload-button {
            font-size: 11px;
        }
    </style>



    @*------Ribbon Save-----*@
    <script>
        function savebtn(e) {
        debugger
        //var validator = $("#top_div").kendoValidator().data("kendoValidator");
        //if (validator.validate()) {

        //} else {
        //    return false;
        //}
        //---T_crm_Lead---\\
        var obj = $("#ddlLeadTitle").val();
        var obj1 = $("#txtFirstName").val();
        var obj2 = $("#txtLastName").val();
        var objMiddle = $("#txtMiddleName").val();
        var obj3 = $("#txtJobTitle").val();
        var obj4 = $("#ddlBestwaytoContact").val();
        var obj5 = $("#ddlLeadStatus").val();
        var obj6 = $("#ddlLeadSource").val();
        var obj7 = $("#ddlLeadType").val();
        var obj8;
        var obj9 = $("#txtAssignedTo").val();
        var obj10 = $("#EditorLeadDescription").val();
        var empid = null;
        var cusid = null;
        var othertxt = null;
        if ($('#ddlempsel').is(':enabled')) {
            empid = $("#ddlempsel").val();
            obj8 = 'Employee';
        }
        else if ($('#ddlCussel').is(':enabled')) {
            cusid = $("#ddlCussel").val();
            obj8 = 'Customer';
        }
        else {
            othertxt = $("#txtotherRef").val();
            obj8 = 'Other';
        }

        var objtopic = $("#txttopic").val();
        var objPhoto = $("#LeadImage").val();
        var obj10 = $("#EditorLeadDescription").val();

        //---T_crm_LeadConactInformation---\\
        var obj11 = $("#ddlLeadPhoneType").val();
        var obj12 = $("#txtPhone").val();
        var obj13 = $("#ddlLeadEmailType").val();
        var obj14 = $("#txtEmail").val();
        var obj15 = $("#txtSkype").val();
        var obj16 = $("#txtFax").val();

        //---T_crm_LeadAdditionalInformation---\\
        var obj17 = $("#txtPotentialAmt").val();
        //var obj18 = $("#txtCurTyp").val();
        var obj19 = $("#editdtpEstClgDt").val();
        var obj20 = $("#ddlRank").val();
        var obj21 = $("#ddlCampaign").val();
        var obj22 = $("#ddlTeritory").val();

        //--- T_crm_LeadBussines---\\
        var obj23 = $("#ddlCustomer").val();
        var obj24 = $("#ddlIndustry").val();
        var obj25 = $("#txtCompany").val();
        var obj26 = $("#txtNoOfEmp").val();
        var obj27 = $("#txtAnnualRev").val();

        //--- T_crm_LeadAddressInformation---\\
        //var obj28 = $("#ddlAddressType").val();
        //var obj29 = $("#txtAddressLine1").val();
        //var obj30 = $("#txtAddressLine2").val();
        //var obj31 = $("#ddlCityName").val();
        //var obj32 = $("#ddlDistName").val();
        //var obj33 = $("#ddlStateName").val();
        //var obj34 = $("#ddlCountryName").val();
        //var obj35 = $("#txtZipCode").val();
        //var obj36 = $("#txtDelInstn").val();

        //--- T_crm_LeadAddressInformation1---\\
        var objadd1 = $("#ddlAddressType").val();
        var objadd2 = $("#txtAddressLine1").val();
        //var objadd3 = $("#txtAddressLine2").val();
        var objadd4 = $("#txtCity").val();
        //var objadd5 = $("#ddlDistName").val();
        var objadd6 = $("#ddlStateName").val();
        var objadd7 = $("#ddlCountryName").val();
        var objadd8 = $("#txtZipCode").val();
        var objadd9 = $("#txtDelInstn").val();

        //--- T_crm_LeadAddressInformation2---\\
        var objadd10 = $("#ddlAddressType2").val();
        var objadd11 = $("#txtAddressLine12").val();
        //var objadd12 = $("#txtAddressLine22").val();
        var objadd13 = $("#txtCity2").val();
        //var objadd14 = $("#ddlDistName").val();
        var objadd15 = $("#ddlStateName2").val();
        var objadd16 = $("#ddlCountryName2").val();
        var objadd17 = $("#txtZipCode2").val();
        var objadd18 = $("#txtDelInstn2").val();

        //--- T_crm_LeadAddressInformation3---\\
        var objadd19 = $("#ddlAddressType3").val();
        var objadd20 = $("#txtAddressLine13").val();
        var objadd21 = $("#txtAddressLine23").val();
        var objadd22 = $("#txtCity3").val();
        //var objadd23 = $("#ddlDistName").val();
        var objadd24 = $("#ddlStateName3").val();
        var objadd25 = $("#ddlCountryName3").val();
        var objadd26 = $("#txtZipCode3").val();
        var objadd27 = $("#txtDelInstn3").val();

        //--- T_crm_LeadAddressInformation4---\\
        var objadd28 = $("#ddlAddressType4").val();
        var objadd29 = $("#txtAddressLine14").val();
        // var objadd30 = $("#txtAddressLine24").val();
        var objadd31 = $("#txtCity4").val();
        //var objadd32 = $("#ddlDistName").val();
        var objadd33 = $("#ddlStateName4").val();
        var objadd34 = $("#ddlCountryName4").val();
        var objadd35 = $("#txtZipCode4").val();
        var objadd36 = $("#txtDelInstn4").val();




        //--- T_crm_LeadSocialInformation---\\
        var obj37 = $("#txtFacebook").val();
        var obj38 = $("#txtTwitter").val();
        var obj39 = $("#txtLinkedin").val();
        var obj40 = $("#txtWebsite").val();
        var ddlPhType, txtLeadPhNo, ddlEmType, txtLeadEmail;
        for (c = 0 ; c < PhoneuniqueId; c++) {
            if (c == 0) {
                ddlPhType = $("#ddlLeadPhoneType").val();
                txtLeadPhNo = $("#txtConPhone").val();
            }
            else {
                ddlPhType += "," + $("#ddlLeadPhoneType" + c + "").val();
                txtLeadPhNo += "," + $("#txtConPhone" + c + "").val();
            }
        }
        for (d = 0 ; d < EmailuniqueId; d++) {
            if (d == 0) {
                ddlEmType = $("#ddlLeadEmailType").val();
                txtLeadEmail = $("#txtConEmail").val();
            }
            else {
                ddlEmType += "," + $("#ddlLeadEmailType" + d + "").val();
                txtLeadEmail += "," + $("#txtConEmail" + d + "").val();
            }
        }

        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: '/LeadDetails/EditLeadSave',
            data: '{"ClientId":"' + 'SWASH'
                + '","Title":"' + obj + '","FirstName":"' + obj1 + '","LastName":"' + obj2
                + '","JobTitle":"' + obj3 + '","BestWayToContact":"' + obj4 + '","StatusId":"' + obj5
                + '","SourceId":"' + obj6 + '","LeadTypeId":"' + obj7 + '","ReferredBy":"' + obj8
                + '","SalesRepEmployeeId":"' + obj9 + '","Description":"' + obj10
                + '","PhoneType":"' + ddlPhType
                + '","PhoneNo":"' + txtLeadPhNo + '","EmailType":"' + ddlEmType + '","EmailId":"' + txtLeadEmail

                + '","MiddleName":"' + objMiddle + '","Topic":"' + objtopic + '","SalesRepresentativeId":"' + obj9
                + '","Rating":"' + obj20 + '","Photo":"' + objPhoto + '","EmployeeId":"' + empid
                + '","CustomerId":"' + cusid + '","Other":"' + othertxt


                + '","Skype":"' + obj15 + '","Fax":"' + obj16 + '","PotentialAmount":"' + obj17
                + '","EstimatedCloseDate":"' + obj19 + '","CampaignId":"' + obj21
                + '","TerritoryId":"' + obj22 + '","IndustryId":"' + obj24
                + '","Company":"' + obj25 + '","NoOfEmployee":"' + obj26 + '","AnnualRevenue":"' + obj27

               + '","AddressTypeId":"' + objadd1 + '","AddressLine1":"' + objadd2
                + '","CityName":"' + objadd4 + '","StateId":"' + objadd6 + '","CountryId":"' + objadd7
                + '","ZipCode":"' + objadd8 + '","DeleveryInstruction":"' + objadd9

               + '","AddressTypeId2":"' + objadd10 + '","AddressLine12":"' + objadd11
                + '","CityId2":"' + objadd13 + '","StateId2":"' + objadd15 + '","CountryId2":"' + objadd16
                + '","ZipCode2":"' + objadd17 + '","DeleveryInstruction2":"' + objadd18

               + '","AddressTypeId3":"' + objadd19 + '","AddressLine13":"' + objadd20
                + '","CityId3":"' + objadd22 + '","StateId3":"' + objadd24 + '","CountryId3":"' + objadd25
                + '","ZipCode3":"' + objadd26 + '","DeleveryInstruction3":"' + objadd27

                + '","AddressTypeId4":"' + objadd28 + '","AddressLine14":"' + objadd29
                + '","CityId4":"' + objadd31 + '","StateId4":"' + objadd33 + '","CountryId4":"' + objadd34
                + '","ZipCode4":"' + objadd35 + '","DeleveryInstruction4":"' + objadd36

                + '","Facebook":"' + obj37
                + '","Twitter":"' + obj38 + '","LinkedIn":"' + obj39 + '","WebSite":"' + obj40 + '"}',
            dataType: "json",
            error: function () {
                // $("#PopSupplier").data("kendoWindow").close();
                alert('Data Edited Successfully');
                var url = '@Url.Action("ViewLead", "LeadDetails")';
                window.location.href = url;
            }
        });
        return;
    }
    </script>



    <script>
        function fillText(e) {
            debugger;

            var state = $(e).is(':checked');
            var grid = $('#Empdatagrid').data('kendoGrid');

            //var txt = $("#txtAssignedTo").val();
            var Count = $('#Empdatagrid').data("kendoGrid").dataSource.total();
            for (i = 0; i < Count; i++) {
                var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.chkFormols').is(':checked');
                if (isChecked == true) {
                    grid.tbody.find('tr:eq(' + i + ')').attr("class", "k-state-selected");


                    var isChecked12 = grid.tbody.find('tr:eq(' + i + ')').find('EmployeeProfessionalDtlsId');


                    // var grid = $('#Empdatagrid').append('getCell', i, 'EmpName');
                    $('#txtAssignedTo').bind(isChecked12.text);
                }
                else {
                    grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
                }
            }
            // $("#popupLeadAssign").hide();
        };
        //function fillText(e) {
        //    debugger;
        //    var state = $(e).is(':checked');
        //    $('#Empdatagrid').jqGrid({
        //        onSelectRow: function (id) {
        //            var amount = $('#Empdatagrid').jqGrid('getCell', id, 'EmpName');
        //            $('#txtAssignedTo').val(amount);
        //        },

        //    });
        //}
    </script>
    <script type="text/javascript">
        function fillText1(e) {
            debugger;
            //if ($(this).is(':checked')) {
            $(this).parent().parent().attr("class", "k-state-selected");
            var grid2 = $('#Empdatagrid').data('kendoGrid');
            var DataItem = grid2.dataItem(grid2.select());
            var ID = DataItem.EmpName;
            alert(ID);
            // }
            // else {
            //     $(this).parent().parent().removeAttr("class", "k-state-selected");
            // }
        }
    </script>
    @model CRM.Models.EditLeadModel
    <script type="text/javascript">
    $(document).ready(function () {
        if(document.getElementById('txtAddressLine12').value !='')
        {
            $("#addbtnDel1").show();
            $("#addbtnPlus1").hide();
            $("#add_panel2").show();
        }
        if(document.getElementById('txtAddressLine13').value !='')
        {
            $("#addbtnDel2").show();
            $("#addbtnPlus2").hide();
            $("#add_panel3").show();
        }
        if (document.getElementById('txtAddressLine14').value != '')
        {
            $("#addbtnDel3").show();
            $("#addbtnPlus3").hide();
            $("#add_panel4").show();
        }
        ////////////////////////////////////
   
        var Ph = document.getElementById('txthidePhone').value;
        var PhType = document.getElementById('txthidePhoneType').value;
        var array = Ph.toString().split(',')
        var arrayType = PhType.toString().split(',')
        var PhoneuniqueId = 0;
        for (PhoneuniqueId = 1; PhoneuniqueId < array.length; PhoneuniqueId++) {
            //alert(array[i]);
           
            var phon = array[PhoneuniqueId].toString();
            var phonType = arrayType[PhoneuniqueId].toString();
            $test = $("#div_AddPhone").clone().prependTo(".add_phonepanel");
            $test.find("#ddlLeadPhoneType").kendoDropDownList().each(function () {
                this.id += PhoneuniqueId
                $test.find("#ddlLeadPhoneType" + PhoneuniqueId + "").kendoDropDownList({
                   
                    Name: ("ddlLeadPhoneType" + PhoneuniqueId + ""),
                    dataSource: ["Business", "Home", "Mobile", "Other"],
                });
                this.value = phonType
                debugger
                var ddl = $("#ddlLeadPhoneType" + PhoneuniqueId + "").data('kendoDropDownList');
                //ddl.value = phonType;
                ddl.text(phonType);
             
            });
           

         
            //$test.find("#ddlLeadPhoneType").kendoDropDownList().value(phonType);
            $test.find("#div_AddPhonePanel").each(function () { this.id += PhoneuniqueId });
            $test.find("#txtConPhone").each(function () { this.id += PhoneuniqueId, this.value = phon });
            $test.find("#Phone_Del").css('display', 'inline');
            $test.find("#Phone_Del").each(function () { this.id += PhoneuniqueId });
        }
        //////////////////////////////////////////////////
        var Em = document.getElementById('txthideEmail').value;
        var EmType = document.getElementById('txthideEmailType').value;
        var array1 = Em.toString().split(',')
        var array1Type = EmType.toString().split(',')
        var j;
        for (EmailuniqueId = 1; EmailuniqueId < array1.length; EmailuniqueId++) {
            //alert(array1[j]);
            var email = array1[EmailuniqueId].toString();
            var emailType = array1Type[EmailuniqueId].toString();
            $test = $("#div_AddEmail").clone().prependTo(".add_emailpanel");
            $test.find("#ddlLeadEmailType").kendoDropDownList().each(function () {
                this.id += EmailuniqueId
                $test.find("#ddlLeadEmailType" + EmailuniqueId + "").kendoDropDownList({
                    Name: ("ddlLeadEmailType" + EmailuniqueId + ""),
                    dataSource: ["Business", "Home", "Mobile", "Other"],
                });
                var ddl = $("#ddlLeadEmailType" + EmailuniqueId + "").data('kendoDropDownList');
                //ddl.value = phonType;
                ddl.text(emailType);
            });
            $test.find("#div_AddEmailPanel").each(function () { this.id += EmailuniqueId });
            $test.find("#txtConEmail").each(function () { this.id += EmailuniqueId, this.value = email });
            $test.find("#Email_Del").css('display', 'inline');
            $test.find("#Email_Del").each(function () { this.id += EmailuniqueId });
        }
        ////////////////////////////////////////////////////////////////
    });
        </script>
    <script>

    function SetCheckBOX1(ele) {
        debugger;
        var state = $(ele).is(':checked');
        var grid = $('#Empdatagrid').data('kendoGrid');
        var Count = $('#Empdatagrid').data("kendoGrid").dataSource.total();
        var cellValue = '';
        var cellValueId = '';
        for (i = 0; i < Count; i++) {
            var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.radio').is(':checked');
            if (isChecked == true) {
                var rw = grid.tbody.find('tr:eq(' + i + ')');
                cellValue += "," + rw.find("td:eq(" + 4 + ")").text();;
                cellValueId += "," + rw.find("td:eq(" + 0 + ")").text();;
            }
            else {
                grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
            }
        }

        $("input:checkbox").on('click', function () {
            var $box = $(this);
            if ($box.is(":checked")) {
                var group = "input:checkbox[name='" + $box.attr("name") + "']";
                $(group).prop("checked", false);
                $box.prop("checked", true);
            } else {
                $box.prop("checked", false);
            }
        });


        $("#popupLeadAssign").data("kendoWindow").close();
        document.getElementById('txtAssignedTo').value = cellValue.substring(1);
        document.getElementById('txtAssignedToId').value = cellValueId.substring(1);
        document.getElementById('txtAssignedToType').value = 'Employee';

    };
    </script>
    <script>
    function SetCheckBOX3(ele) {
        debugger;
        var state = $(ele).is(':checked');
        var grid = $('#Teamdatagrid').data('kendoGrid');
        var Count = $('#Teamdatagrid').data("kendoGrid").dataSource.total();
        var cellValue = '';
        var cellValueId = '';
        for (i = 0; i < Count; i++) {
            var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.radio').is(':checked');

            if (isChecked == true) {
                var rw = grid.tbody.find('tr:eq(' + i + ')');
                cellValue += "," + rw.find("td:eq(" + 3 + ")").text();;
                cellValueId += "," + rw.find("td:eq(" + 0 + ")").text();;
            }
            else {
                grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
            }
        }

        $("input:checkbox").on('click', function () {
            var $box = $(this);
            if ($box.is(":checked")) {
                var group = "input:checkbox[name='" + $box.attr("name") + "']";
                $(group).prop("checked", false);
                $box.prop("checked", true);
            } else {
                $box.prop("checked", false);
            }
        });

        $("#popupLeadAssign").data("kendoWindow").close();
        document.getElementById('txtAssignedTo').value = cellValue.substring(1);
        document.getElementById('txtAssignedToId').value = cellValueId.substring(1);
        document.getElementById('txtAssignedToType').value = 'Team';

    };
    </script>









   



   

   

</head>

<body>
    <div class="bodee1">
        @Html.Partial("_LeadEditRibbonMenu")
    </div>
    @*@if (TempData["Success"] != null)
        {
            <p class="alert alert-success" id="successMessage">@TempData["Success"]</p>
        }*@
    @using (Html.BeginForm("EditLead", "LeadDetails"))
    {
        <div class="Upper_strip">
        <div class="col-md-6">
            <div class="Upstrip">
                Created By :&nbsp;&nbsp; @Session["GetLoginDetails"] &nbsp;&nbsp;
            </div>
            <div class="Upstrip">
                Created Date :&nbsp;&nbsp;@Session["GetLoginDetailsTime"]
            </div>
        </div>
        <div class="col-md-6">
            <div class="Upstrip">
                Modified By :&nbsp;&nbsp;NA
                @*<input type="hidden" value="@Session["username"]" id="myHiddenVar" />*@
            </div>
            <div class="Upstrip">
                Modified Date :NA
            </div>
        </div>
    </div>
        <div id="top_div" style="height:450px; overflow:scroll;">

            <ul class="accordion">
                <div style="overflow-y:scroll; height:470px">
                    <li>
                        <a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Lead Infomation</a>
                        <ul class="inner1" style="display:inline;">
                            <li>
                                <div class="col-md-12">
                                    <div class="col-md-4">
                                        <div class="form-group">
                                            <div class="col-md-4"><label style="color:red">*</label><label>First Name :</label></div>
                                            <div class="col-md-3">
                                                @(Html.Kendo().DropDownListFor(t=> t.Title)
                                                .Name("ddlLeadTitle")
                                                .Filter("startswith")
                                                .BindTo(new List<string>() {
                                                   "Mr.",
                                                "Miss.",
                                                "Mrs.",
                                                "Dr.",
                                                "Er.",
                                                "Proff.",
                                                "Advot."
                                                })
                                                .HtmlAttributes(new { style = "width: 100%" }))
                                            </div>
                                            <div class="col-md-5">
                                                @(Html.Kendo().TextBoxFor(t => t.FirstName)
                                                .Name("txtFirstName")
.HtmlAttributes(new { style = "width: 100%", required = "required", placeholder = "First Name", maxlength = "30" }))
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Middle Name :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.MiddleName)
                                                .Name("txtMiddleName")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Middle Name", maxlength = "50" }))
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="form-group">
                                            <div class="col-md-4"><label style="color:red">*</label><label>Last Name :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.LastName)
                                                .Name("txtLastName")
.HtmlAttributes(new { style = "width: 100%", required = "required", placeholder = "Last Name", maxlength = "50" }))
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="clearfix" style="margin-bottom:1%"></div>
                                <div class="col-md-12">
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <div class="col-md-4"><label>Topic :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t=> t.Topic)
                                                .Name("txttopic")

            .HtmlAttributes(new { style = "width: 100%", placeholder = "Topic", maxlength = "50" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Lead Status :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.LeadStatus)
                                                .Name("ddlLeadStatus")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                                .DataTextField("StatusName")
                                                .DataValueField("StatusId")
                                                //.AutoBind(false)
                                                .HtmlAttributes(new { style = "width: 100%;" })
                                                .DataSource(ds =>
                                                {
                                                    ds.Read("FillStatus", "LeadDetails");
                                                })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Lead Type :</label></div>
                                            <div class="col-md-8">
                                                <span class="k-textbox k-space-right" style="width:100%">
                                                    @(Html.Kendo().DropDownListFor(t => t.LeadTypeId)
                                                    .Name("ddlLeadType")
                                                    .Filter("startswith")
                                                    .OptionLabel("Select One")
                                                    .DataTextField("LeadTypeName")
                                                    .DataValueField("LeadTypeId")
                                                    //.AutoBind(false)
                                                    .HtmlAttributes(new { style = "width: 100%;" })
                                                    .DataSource(ds =>
                                                    {
                                                        ds.Read("FillLeadType", "LeadDetails");
                                                    })
                                                    )
                                                    <a id="leadTypeAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
                                                </span>
                                            </div>
                                            <div style="display:none;">
                                                @(Html.Kendo().Window().Name("popupLeadtype")
                                                .Title("Create Lead Type")
                                                .Visible(false)
                                                .Modal(true)
                                                .Content
                                                (@<text>
                                                <div class="col-md-12">
                                                    <div class="form-group">
                                                        <div class="col-md-4"><label>LeadType Name :</label></div>
                                                        <div class="col-md-8">
                                                            @(Html.Kendo().TextBoxFor(t=>t.LeadName)
                                                            .Name("txtLeadTypeName")
                                                            .HtmlAttributes(new { style = "width: 100%", placeholder = "LeadType Name" }))
                                                        </div>
                                                    </div>
                                                    <div class="clearfix" style="margin-bottom:2%"></div>
                                                    <div class="form-group">
                                                        <div class="col-md-4"><label>Description :</label></div>
                                                        <div class="col-md-8">
                                                            @Html.TextArea("Textarea", new { id = "txtLeadTypDesc", style = "height:50px;width:97%;border-color: #cccccc;border-radius:3px " })
                                                        </div>
                                                    </div>
                                                    <div class="clearfix" style="margin-bottom:3%"></div>
                                                    <div class="col-md-9" align="right">
                                                        <input type="submit" value="Submit" class="btn btn-success" />
                                                    </div>
                                                </div>
                                                </text>)
                                                                        .Draggable()
                                                                        .Width(350)
                                                                        .Height(170)
                                                                        .Actions(actions => actions.Pin().Minimize().Maximize().Close())
                                                                        .Events(ev => ev.Close("onClose1"))
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Sales Rep. :</label></div>
                                            <div class="col-md-8">
                                                <span class="k-textbox k-space-right" style="width:100%">
                                                    @(Html.Kendo().TextBox()
                                                    .Name("txtAssignedTo")
                                                    .HtmlAttributes(new { style = "width: 100%", placeholder = "Assign to" }))
                                                    <a id="leadAssignSearch" class="k-icon k-i-search" style="padding:0px;"></a>
                                                </span>
                                                @(Html.Kendo().TextBox()
                                                    .Name("txtAssignedToId")
                                                       .HtmlAttributes(new { style = "display:none" }))
                                                @(Html.Kendo().TextBox()
                                                    .Name("txtAssignedToType")
                                                    .HtmlAttributes(new { style = "display:none" }))
                                            </div>
                                            <div style="display:none;">
                                                @(Html.Kendo().Window().Name("popupLeadAssign")
                                                .Title("Employee/Team: Search and Select")
                                                .Visible(false)
                                                .Modal(true)
                                                .Content
                                                (@<text>
                                                    @Html.Partial("PRV_Emp_Team_Search")
                                                </text>)
                                                            .Draggable()
                                                            .Width(1000)
                                                            .Height(400)
                                                            .Actions(actions => actions.Pin().Minimize().Maximize().Close())
                                                            .Events(ev => ev.Close("onClose1"))
                                                )
                                            </div>
                                        </div>
                                        @*<div class="form-group">
                                            <div class="col-md-4"><label>Sales Rep. :</label></div>
                                            <div class="col-md-8">
                                                <span class="k-textbox k-space-right" style="width:100%">
                                                    @(Html.Kendo().TextBoxFor(t => t.AssignedTo)
                                                    .Name("txtAssignedTo")
                                                    .HtmlAttributes(new { style = "width: 100%", placeholder = "Assign to" }))
                                                    <a id="leadAssignSearch" class="k-icon k-i-search" style="padding:0px;"></a>
                                                </span>
                                            </div>
                                            <div style="display:none;">
                                                @(Html.Kendo().Window().Name("popupLeadAssign")
                                                .Title("Employee/Team: Search and Select")
                                                .Visible(false)
                                                .Modal(true)
                                                .Content
                                                (@<text>
                                                @Html.Partial("PRV_Emp_Team_Search")
                                                </text>)
                                                            .Draggable()
                                                            .Width(1000)
                                                            .Height(400)
                                                            .Actions(actions => actions.Pin().Minimize().Maximize().Close())
                                                            .Events(ev => ev.Close("onClose1"))
                                                )
                                            </div>
                                        </div>*@
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Lead Rating :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.Rating)
                                                .Name("ddlRank")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                                .BindTo(new List<string>() {
                                                     "Cold",
                                                "Hot",
                                                "Warm"
                                             
                                                })

                                                .HtmlAttributes(new { style = "width: 100%" }))
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">

                                        <div class="form-group">
                                            <div class="col-md-4"><label>Way to Contact :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.BestWayToContact)
                                                .Name("ddlBestwaytoContact")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                               .BindTo(new List<string>() {
                                                "SMS",
                                                "E-Mail",
                                                 "Phone"
                                                })
                                                .HtmlAttributes(new { style = "width: 100%" })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Lead Source :</label></div>
                                            <div class="col-md-8">
                                                <span class="k-textbox k-space-right" style="width:100%">
                                                    @(Html.Kendo().DropDownListFor(t => t.SourceId)
                                                    .Name("ddlLeadSource")
                                                    .Filter("startswith")
                                                    .OptionLabel("Select One")
                                                    .DataTextField("SourceName")
                                                    .DataValueField("SourceId")
                                                    //.AutoBind(false)
                                                    .HtmlAttributes(new { style = "width: 100%;" })
                                                    .DataSource(ds =>
                                                    {
                                                        ds.Read("FillSource", "LeadDetails");
                                                    })
                                                    )
                                                    <a id="leadSouceAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
                                                </span>
                                            </div>
                                            <div style="display:none;">
                                                @(Html.Kendo().Window().Name("popupLeadsource")
                                                .Title("Create Lead Source")
                                                .Visible(false)
                                                .Modal(true)
                                                .Content
                                                (@<text>
                                                @Html.Partial("PRV_Source")
                                                </text>)
                                                            .Draggable()
                                                            .Width(1050)
                                                            .Height(550)
                                                            .Actions(actions => actions.Pin().Minimize().Maximize().Close())
                                                            .Events(ev => ev.Close("onClose1"))
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Job Title :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.JobTitle)
                                                .Name("txtJobTitle")
            //.Value(Session["JobTitle"].ToString())

            .HtmlAttributes(new { style = "width: 100%", placeholder = "Job Title", maxlength = "30" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Reffered By :</label></div>
                                            <div class="col-md-8">
                                                <div style="width:39%;float:left;">
                                                    <span class="k-textbox k-space-right" style="width:100%">
                                                        @(Html.Kendo().DropDownListFor(t => t.EmployeeId)
                                                        .Name("ddlempsel")
                                                        .Filter("startswith")
                                                        .OptionLabel("Employee")
        .DataTextField("EmployeeName")
.DataValueField("EmployeeProfessionalDtlsId")
                                                        .HtmlAttributes(new { style = "width: 100%;font-size:12px;" })
                                                        .DataSource(ds =>
                                                        {
                                                            ds.Read("FillEmployee", "LeadDetails");
                                                        })
                                                        )
                                                        <a id="emp_chk" class="k-icon k-i-search" style="padding:0px;"></a>
                                                    </span>
                                                </div>
                                                <div style="width:39%;float:left;margin-left:10px;">
                                                    <span class=" k-textbox k-space-right" style="width:100%">
                                                        @(Html.Kendo().DropDownListFor(t=> t.Customer)
                                                        .Name("ddlCussel")
                                                        .Filter("startswith")
                                                        .OptionLabel("Customer")
                                                        .DataTextField("CustomerName")
                                                        .DataValueField("CustomerId")
                                                        .HtmlAttributes(new { style = "width: 100%;font-size:12px;" })
                                                        .DataSource(ds =>
                                                        {
                                                            ds.Read("FillCustomer", "LeadDetails");
                                                        })
                                                        )
                                                        <a id="cus_chk" class="k-icon k-i-search" style="padding:0px;"></a>
                                                    </span>
                                                </div>
                                                <div style="width:17%;float:right;">
                                                    @(Html.Kendo().Button()
                                                    .Name("btnother")
                                                    .Content("Other")
                                                    .HtmlAttributes(new { type = "button", style = "font-size:12px;" })
                                                    .Events(e => e.Click("onClickOther"))
                                                    )

                                                </div>


                                            </div>
                                            @(Html.Kendo().TextBoxFor(t=> t.Other)
                                            .Name("txtotherRef")
                                            .HtmlAttributes(new { style = "width: 50%; float:right", placeholder = "Other Reference" }))
                                            @(Html.Kendo().TextBoxFor(t => t.ReferredBy)
                                            .Name("txthiderefer")
                                            .HtmlAttributes(new { style = "display:none" }))
                                            @(Html.Kendo().TextBoxFor(t => t.Photo)
                                            .Name("txthidePhoto")
                                            .HtmlAttributes(new { style = "display:none" }))

                                        </div>

                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Attach Photo :</label></div>
                                            <div class="col-md-8">
                                                <div>
                                                    <img id="imageupload" alt="Image" class=" img-rounded" style="float:right;height:100px;width:100px;" />


                                                    <div style="float:left; width:50%">
                                                        @(Html.Kendo().Upload().Name("LeadImage").Multiple(false)
                                                        .Async(a => a
                                                        .Save("SaveCompanyPhoto", "LeadDetails").AutoUpload(false))
                                                        .Events(e => e.Select("onSelectLogo"))
                                                        .HtmlAttributes(new { accept = "image/*", style = "font-size:12px;" })
                                                        )

                                                        <script>
                                                        function onSelectLogo(e) {
                                                            debugger
                                                            var fileReader = new FileReader();
                                                            fileReader.onload = function (event) {
                                                                var mapImage = event.target.result;
                                                                $("#imageupload").attr('src', mapImage);
                                                            }
                                                            fileReader.readAsDataURL(e.files[0].rawFile);

                                                        }

                                                        </script>

                                                    </div>
                                                </div>

                                            </div>

                                        </div>


                                    </div>
                                    <div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <div class="col-md-2"><label>Note :</label></div>
                                            <div class="col-md-10">
                                                @(Html.Kendo().EditorFor(t=> t.Description)
                                                .Name("EditorLeadDescription")
                                                .HtmlAttributes(new { style = "height:10%", placeholder = "Write here somthing..." })
                                                .Resizable(resizable => resizable.Content(true).Toolbar(true))
                                                .ImageBrowser(imageBrowser => imageBrowser
                                                .Image("~/Content/UserFiles/Images/{0}")
                                                .Read("Read", "ImageBrowser")
                                                .Create("Create", "ImageBrowser")
                                                .Destroy("Destroy", "ImageBrowser")
                                                .Upload("Upload", "ImageBrowser")
                                                .Thumbnail("Thumbnail", "ImageBrowser")
                                                ))
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </li>
                        </ul>
                    </li>

                    <li>
                        <a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Contact Infomation</a>
                        <ul class="inner1">
                            <li>
                                <div class="col-md-12">
                                    <div class="col-md-6">
                                        <div id="div_AddPhone">
                                            <div class="form-group" id="div_AddPhonePanel">
                                                <div class="col-md-4"><label>Phone :</label></div>
                                                <div class="col-md-3">
                                                    @(Html.Kendo().DropDownListFor(t=> t.PhoneType)
                                            .Name("ddlLeadPhoneType")
                                            .Filter("startswith")
                                            .BindTo(new List<string>() {
                                                  "Business",
                                                  "Home",
                                                  "Mobile",
                                                  "Others"
                                              })
                                            .HtmlAttributes(new { style = "width: 100%" }))

                                                </div>
                                                <div class="col-md-5">
                                                    @(Html.Kendo().TextBoxFor(t => t.PhoneNo)
                                            .Name("txtConPhone")
    .HtmlAttributes(new { style = "width: 90%", placeholder = "Phone", onkeypress = "return isNumberKey(event)", @maxlength = "10" }))
                                                    <span id="Phone_Del" class="glyphicon glyphicon-trash" onclick="Phone_Del_Click(this)" style="display:none;cursor:pointer; "></span>

                                                </div>

                                                <div class="clearfix" style="margin-bottom:2%"></div>
                                            </div>
                                        </div>
                                        <p class="add_phonepanel"></p>

                                        <div class="form-group">
                                            <div class="col-md-4"></div>
                                            <div class="col-md-8">
                                                <div class="Mytooltip">

                                                    <a class="cornerLink" onclick='AddPhone_onclick()' style="cursor:pointer">Add Phone</a>
                                                    <span class="Mytooltiptext">Add Phone</span>
                                                </div>
                                                @(Html.Kendo().TextBoxFor(t => t.PhoneNoA)
                                            .Name("txthidePhone")
                                            .HtmlAttributes(new { style = "display:none"}))
                                                @(Html.Kendo().TextBoxFor(t => t.PhoneTypeA)
                                            .Name("txthidePhoneType")
                                            .HtmlAttributes(new { style = "display:none" }))


                                            </div>

                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Skype :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.Skype)
                                            .Name("txtSkype")
        .HtmlAttributes(new { style = "width: 100%", placeholder = "Skype", maxlength = "30" }))
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div id="div_AddEmail">
                                            <div class="form-group" id="div_AddEmailPanel">

                                                <div class="col-md-4"><label>E-Mail :</label></div>
                                                <div class="col-md-3">
                                                    @(Html.Kendo().DropDownListFor(t => t.EmailType)
                                            .Name("ddlLeadEmailType")
                                            .Filter("startswith ")
                                            .BindTo(new List<string>() {
                                                  "Business",
                                                  "Home",
                                                  "Others"
                                              })
                                            .HtmlAttributes(new { style = "width: 100%" }))
                                                </div>
                                                <div class="col-md-5">
                                                    @(Html.Kendo().TextBoxFor(t => t.EmailId)
                                            .Name("txtConEmail")
                                            .HtmlAttributes(new { style = "width: 90%", placeholder = "E-Mail", type = "email", data_email_msg = "Email format is not valid"}))
                                                    <span id="Email_Del" class="glyphicon glyphicon-trash" onclick="Email_Del_Click(this)" style="display:none;cursor:pointer; "></span>
                                                </div>
                                                <div class="clearfix" style="margin-bottom:2%"></div>
                                            </div>
                                        </div>
                                        <p class="add_emailpanel"></p>
                                        <div class="form-group">
                                            <div class="col-md-4"></div>
                                            <div class="col-md-8">

                                                <div class="Mytooltip">
                                                    <a class="cornerLink" onclick='AddEmail_onclick()' style="cursor:pointer">Add Email</a>
                                                    <span class="Mytooltiptext">Add Email</span>
                                                </div>
                                                @(Html.Kendo().TextBoxFor(t => t.EmailIdA)
                                            .Name("txthideEmail")
                                            .HtmlAttributes(new { style = "display:none" }))
                                                @(Html.Kendo().TextBoxFor(t => t.EmailTypeA)
                                            .Name("txthideEmailType")
                                            .HtmlAttributes(new { style = "display:none" }))
                                            </div>
                                        </div>

                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Fax :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.Fax)
                                            .Name("txtFax")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Fax", maxlength = "30", onkeypress = "return isNumberKey(event)" }))
                                                <span id="Email_Del" class="glyphicon glyphicon-trash" style="display:none;cursor:pointer; "></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </li>

                    <li>
                        <a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Additional Infomation</a>
                        <ul class="inner1">
                            <li>
                                <div class="col-md-12">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Currency :</label></div>
                                            <div class="col-md-7">
                                                @(Html.Kendo().TextBoxFor(t => t.PotentialAmount)
                                          .Name("txtPotentialAmt")
.HtmlAttributes(new { style = "width: 100%;text-align:right", placeholder = "0.00", maxlength = "30", onkeypress = "return isNumberKey(event)" }))
                                            </div>
                                            <div class="col-md-1">
                                                @(Html.Kendo().TextBox()
                                         .Name("txtCurTyp")
                                         .Enable(false)
                                         .Value("INR")
                                         .HtmlAttributes(new { style = "width: 100%;background-color:lightgray;text-align:center" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Territory :</label></div>
                                            <div class="col-md-8">
                                                <span class="k-textbox k-space-right" style="width:100%">
                                                    @(Html.Kendo().DropDownListFor(t=> t.TerritoryId)
                                                .Name("ddlTeritory")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                                .DataTextField("TerritoryName")
                                                .DataValueField("TerritoryId")
                                                //.AutoBind(false)
                                                .DataSource(ds =>
                                                {
                                                    ds.Read("TeritoryBind", "Create");
                                                })
                                               .HtmlAttributes(new { style = "width: 100%" })
                                                    )
                                                    <a id="LeadTerritoryAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
                                                </span>
                                            </div>
                                            <div style="display:none;">
                                                @(Html.Kendo().Window().Name("popupLeadterritory")
                                        .Title("Create Territory")
                                        .Visible(false)
                                        .Modal(true)
                                        .Content
                                            (@<text>
                                                @Html.Partial("PRV_Campaign")
                                            </text>)
                                                                    .Draggable()
                                                                    .Width(750)
                                                                    .Height(300)
                                                                    .Actions(actions => actions.Pin().Minimize().Maximize().Close())
                                                                    .Events(ev => ev.Close("onClose1"))
                                                )
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Estimate Closing Date :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DatePickerFor(t => t.EstimatedCloseDate)
                                          .Name("editdtpEstClgDt")
                                          .HtmlAttributes(new { style = "width: 100%", placeholder = "dd/mm/yyyy" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Source Campaign :</label></div>
                                            <div class="col-md-8">
                                                <span class="k-textbox k-space-right" style="width:100%">
                                                    @(Html.Kendo().DropDownListFor(t => t.CampaignId)
                                                .Name("ddlCampaign")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                                .DataTextField("CampaignName")
                                                .DataValueField("CampaignId")
                                                //.AutoBind(false)
                                                .DataSource(ds =>
                                                {
                                                    ds.Read("FillCampaign", "LeadDetails");
                                                })
                                             .HtmlAttributes(new { style = "width: 100%" })
                                                    )
                                                    <a id="LeadcampaignAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
                                                </span>
                                            </div>
                                            <div style="display:none;">
                                                @(Html.Kendo().Window().Name("popupLeadcampaign")
                                        .Title("Create Campaign")
                                        .Visible(false)
                                        .Modal(true)
                                        .Content
                                            (@<text>
                                                @Html.Partial("PRV_Campaign")
                                            </text>)
                                                                .Draggable()
                                                                .Width(750)
                                                                .Height(300)
                                                                .Actions(actions => actions.Pin().Minimize().Maximize().Close())
                                                                .Events(ev => ev.Close("onClose1"))
                                                )
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </li>

                    <li>
                        <a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Business Infomation</a>
                        <ul class="inner1">
                            <li>
                                <div class="col-md-12">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>No of Employee :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.NoOfEmployee)
                                          .Name("txtNoOfEmp")
.HtmlAttributes(new { style = "width: 100%", placeholder = "No of Employee", onkeypress = "return isNumberKey(event)", maxlength = "30" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Industry :</label></div>
                                            <div class="col-md-8">
                                                <span class="k-textbox k-space-right" style="width:100%">
                                                    @(Html.Kendo().DropDownListFor(t => t.IndustryId)
                                            .Name("ddlIndustry")
                                            .Filter("startswith")
                                            .OptionLabel("Select Industry")
                                            .DataTextField("IndustryName")
                                            .DataValueField("IndustryId")
                                            //.AutoBind(false)
                                            .DataSource(ds =>
                                            {
                                                ds.Read("IndustryBind", "Create");
                                            })
                                            .HtmlAttributes(new { style = "width: 100%" })
                                                    )
                                                    <a id="LeadindustryAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
                                                </span>
                                            </div>
                                            <div style="display:none;">
                                                @(Html.Kendo().Window().Name("popupLeadindustry")
                                        .Title("Create Industry")
                                        .Visible(false)
                                        .Modal(true)
                                        .Content
                                            (@<text>
                                                @Html.Partial("PRV_Campaign")
                                            </text>)
                                                                .Draggable()
                                                                .Width(750)
                                                                .Height(300)
                                                                .Actions(actions => actions.Pin().Minimize().Maximize().Close())
                                                                .Events(ev => ev.Close("onClose1"))
                                                )
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Company :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.Company)
                                          .Name("txtCompany")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Company", maxlength = "30", required = "required", validationmessage = "Enter Company Name", }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Annual Revenue :</label></div>
                                            <div class="col-md-7">
                                                @(Html.Kendo().TextBoxFor(t => t.AnnualRevenue)
                                          .Name("txtAnnualRev")
                                          .HtmlAttributes(new { style = "width: 100%;text-align:right", placeholder = "0.00",onkeypress = "return isNumberKey(event)", maxlength = "30" }))
                                            </div>
                                            <div class="col-md-1">
                                                @(Html.Kendo().TextBox()
                                         .Name("txtInr")
                                         .Enable(false)
                                         .Value("INR")
                                         .HtmlAttributes(new { style = "width: 100%;background-color:lightgray;text-align:center" }))
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </li>

                    <li>
                        <a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Address Infomation</a>
                        <ul class="inner1">
                            <li>
                                <div class="col-md-12" id="add_panel1">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Address Type :</label></div>
                                            <div class="col-md-8">

                                                @(Html.Kendo().DropDownListFor(t=> t.AddressTypeId)
                                                .Name("ddlAddressType")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                                .DataTextField("AdressName")
                                                .DataValueField("AddressTypeId")
                                                //.AutoBind(false)
                                                .HtmlAttributes(new { style = "width: 100%;" })
                                                .DataSource(ds =>
                                                {
                                                    ds.Read("FillAddressType", "LeadDetails");
                                                })
                                                )

                                            </div>

                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>

                                        <div class="form-group">
                                            <div class="col-md-4"><label>Country :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.CountryId)
                                        .Name("ddlCountryName")
                                        .Filter("startswith")
                                        .OptionLabel("Select One")
                                        .DataTextField("CountryName")
                                        .DataValueField("CountryId")
                                        //.AutoBind(false)
                                        .Events(e => e.Change("leadcategoriesChange"))
                                        .HtmlAttributes(new { style = "width: 100%;" })
                                        .DataSource(ds =>
                                        {
                                            ds.Read("FillCountry", "LeadDetails");
                                        })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>City :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.CityId)
                                                  .Name("txtCity")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "30" }))
                                            </div>
                                        </div>


                                        <script>
                                        function leadcategoriesChange() {
                                            debugger
                                            var value = this.value(),
                                             ddl = $("#ddlStateName").data("kendoDropDownList");
                                            if (value) {
                                                ddl.dataSource.filter({ field: "CountryId", operator: "eq", value: parseInt(value) });
                                            } else {
                                                ddl.dataSource.filter({});
                                            }
                                        }
                                        function leadcategoriesChange1() {
                                            var value = this.value(),
                                             ddl1 = $("#ddlDistName").data("kendoDropDownList");
                                            if (value) {
                                                ddl1.dataSource.filter({ field: "StateId", operator: "eq", value: parseInt(value) });
                                            } else {
                                                ddl1.dataSource.filter({});
                                            }
                                        }
                                        </script>

                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Address Line :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.AddressLine1)
                                                  .Name("txtAddressLine1")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "50" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>State :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.StateId)
                                        .Name("ddlStateName")
                                        .Filter("startswith")
                                        .OptionLabel("Select One")
                                        .DataTextField("StateName")
                                        .DataValueField("StateId")
            //.Enable(false)
                                        .CascadeFrom("CountryName")
                                        //.AutoBind(false)
                                        .Events(e => e.Change("leadcategoriesChange1"))
                                        .HtmlAttributes(new { style = "width: 100%;" })
                                        .DataSource(ds =>
                                        {
                                            ds.Read("FillState", "LeadDetails");
                                            //ds.ServerFiltering(true);
                                        })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Zipcode :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.ZipCode)
                                                  .Name("txtZipCode")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "Zipcode", onkeypress = "return isNumberKey(event)", @maxlength = "6" }))
                                            </div>
                                        </div>
                                    </div>
                                    @*<div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12">
                                        <div class="col-md-2"><label>Delivery Instruction :</label></div>
                                        <div class="col-md-10">
                                            @Html.TextArea("Textarea", new { id = "txtDelInstn", style = "height:80px;width:100%;border-color: #cccccc;border-radius:3px " })
                                        </div>*@
                                    @*</div>*@
                                    <div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12" align="right">
                                        <button type="button" class="btn btn-default btn-sm" id="addbtnPlus1">
                                            <span class="glyphicon glyphicon-plus"></span>
                                        </button>
                                        <button type="button" class="btn btn-default btn-sm" id="addbtnDel1">
                                            <span class="glyphicon glyphicon-trash"></span>
                                        </button>
                                    </div>
                                </div>
                                <div class="col-md-12" id="add_panel2">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Address Type :</label></div>
                                            <div class="col-md-8">

                                                @(Html.Kendo().DropDownListFor(t => t.AddressTypeId2)
                                                .Name("ddlAddressType2")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                                .DataTextField("AdressName")
                                                .DataValueField("AddressTypeId")
                                                //.AutoBind(false)
                                                .HtmlAttributes(new { style = "width: 100%;" })
                                                .DataSource(ds =>
                                                {
                                                    ds.Read("FillAddressType", "LeadDetails");
                                                })
                                                )

                                            </div>

                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>

                                        <div class="form-group">
                                            <div class="col-md-4"><label>Country :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.CountryId2)
                                        .Name("ddlCountryName2")
                                        .Filter("startswith")
                                        .OptionLabel("Select One")
                                        .DataTextField("CountryName")
                                        .DataValueField("CountryId")
                                        //.AutoBind(false)
                                        .Events(e => e.Change("leadcategoriesChange"))
                                        .HtmlAttributes(new { style = "width: 100%;" })
                                        .DataSource(ds =>
                                        {
                                            ds.Read("FillCountry", "LeadDetails");
                                        })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>City :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.CityId2)
                                                  .Name("txtCity2")
.HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "30" }))
                                            </div>
                                        </div>


                                        <script>
                                        function leadcategoriesChange() {
                                            debugger
                                            var value = this.value(),
                                             ddl = $("#ddlStateName2").data("kendoDropDownList");
                                            if (value) {
                                                ddl.dataSource.filter({ field: "CountryId", operator: "eq", value: parseInt(value) });
                                            } else {
                                                ddl.dataSource.filter({});
                                            }
                                        }
                                        function leadcategoriesChange1() {
                                            var value = this.value(),
                                             ddl1 = $("#ddlDistName2").data("kendoDropDownList");
                                            if (value) {
                                                ddl1.dataSource.filter({ field: "StateId", operator: "eq", value: parseInt(value) });
                                            } else {
                                                ddl1.dataSource.filter({});
                                            }
                                        }
                                        </script>

                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Address Line :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.AddressLine12)
                                                  .Name("txtAddressLine12")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "30" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>State :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.StateId2)
                                        .Name("ddlStateName2")
                                        .Filter("startswith")
                                        .OptionLabel("Select One")
                                        .DataTextField("StateName")
                                        .DataValueField("StateId")
            //.Enable(false)
                                        .CascadeFrom("CountryName")
                                        //.AutoBind(false)
                                        .Events(e => e.Change("leadcategoriesChange1"))
                                        .HtmlAttributes(new { style = "width: 100%;" })
                                        .DataSource(ds =>
                                        {
                                            ds.Read("FillState", "LeadDetails");
                                            //ds.ServerFiltering(true);
                                        })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Zipcode :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.ZipCode2)
                                                  .Name("txtZipCode2")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "Zipcode", onkeypress = "return isNumberKey(event)", @maxlength = "6" }))
                                            </div>
                                        </div>
                                    </div>
                                    @*<div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12">
                                        <div class="col-md-2"><label>Delivery Instruction :</label></div>
                                        <div class="col-md-10">
                                            @Html.TextArea("Textarea", new { id = "txtDelInstn2", style = "height:80px;width:100%;border-color: #cccccc;border-radius:3px " })
                                        </div>
                                    </div>*@
                                    <div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12" align="right">
                                        <button type="button" class="btn btn-default btn-sm" id="addbtnPlus2">
                                            <span class="glyphicon glyphicon-plus"></span>
                                        </button>
                                        <button type="button" class="btn btn-default btn-sm" id="addbtnDel2">
                                            <span class="glyphicon glyphicon-trash"></span>
                                        </button>
                                    </div>
                                </div>
                                <div class="col-md-12" id="add_panel3">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Address Type :</label></div>
                                            <div class="col-md-8">

                                                @(Html.Kendo().DropDownListFor(t => t.AddressTypeId3)
                                                .Name("ddlAddressType3")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                                .DataTextField("AdressName")
                                                .DataValueField("AddressTypeId")
                                                //.AutoBind(false)
                                                .HtmlAttributes(new { style = "width: 100%;" })
                                                .DataSource(ds =>
                                                {
                                                    ds.Read("FillAddressType", "LeadDetails");
                                                })
                                                )

                                            </div>

                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>

                                        <div class="form-group">
                                            <div class="col-md-4"><label>Country :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.CountryId3)
                                        .Name("ddlCountryName3")
                                        .Filter("startswith")
                                        .OptionLabel("Select One")
                                        .DataTextField("CountryName")
                                        .DataValueField("CountryId")
                                       // .AutoBind(false)
                                        .Events(e => e.Change("leadcategoriesChange"))
                                        .HtmlAttributes(new { style = "width: 100%;" })
                                        .DataSource(ds =>
                                        {
                                            ds.Read("FillCountry", "LeadDetails");
                                        })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>City :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.CityId3)
                                                  .Name("txtCity3")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "30" }))
                                            </div>
                                        </div>


                                        <script>
                                        function leadcategoriesChange() {
                                            debugger
                                            var value = this.value(),
                                             ddl = $("#ddlStateName3").data("kendoDropDownList");
                                            if (value) {
                                                ddl.dataSource.filter({ field: "CountryId", operator: "eq", value: parseInt(value) });
                                            } else {
                                                ddl.dataSource.filter({});
                                            }
                                        }
                                        function leadcategoriesChange1() {
                                            var value = this.value(),
                                             ddl1 = $("#ddlDistName3").data("kendoDropDownList");
                                            if (value) {
                                                ddl1.dataSource.filter({ field: "StateId", operator: "eq", value: parseInt(value) });
                                            } else {
                                                ddl1.dataSource.filter({});
                                            }
                                        }
                                        </script>

                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Address Line :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.AddressLine13)
                                                  .Name("txtAddressLine13")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "50" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>State :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.StateId3)
                                        .Name("ddlStateName3")
                                        .Filter("startswith")
                                        .OptionLabel("Select One")
                                        .DataTextField("StateName")
                                        .DataValueField("StateId")
            //.Enable(false)
                                        .CascadeFrom("CountryName")
                                        //.AutoBind(false)
                                        .Events(e => e.Change("leadcategoriesChange1"))
                                        .HtmlAttributes(new { style = "width: 100%;" })
                                        .DataSource(ds =>
                                        {
                                            ds.Read("FillState", "LeadDetails");
                                            //ds.ServerFiltering(true);
                                        })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Zipcode :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.ZipCode3)
                                                  .Name("txtZipCode3")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "Zipcode", onkeypress = "return isNumberKey(event)", @maxlength = "6" }))
                                            </div>
                                        </div>
                                    </div>
                                    @*<div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12">
                                        <div class="col-md-2"><label>Delivery Instruction :</label></div>
                                        <div class="col-md-10">
                                            @Html.TextArea("Textarea", new { id = "txtDelInstn3", style = "height:80px;width:100%;border-color: #cccccc;border-radius:3px " })
                                        </div>
                                    </div>*@
                                    <div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12" align="right">
                                        <button type="button" class="btn btn-default btn-sm" id="addbtnPlus3">
                                            <span class="glyphicon glyphicon-plus"></span>
                                        </button>
                                        <button type="button" class="btn btn-default btn-sm" id="addbtnDel3">
                                            <span class="glyphicon glyphicon-trash"></span>
                                        </button>
                                    </div>
                                </div>
                                <div class="col-md-12" id="add_panel4">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Address Type :</label></div>
                                            <div class="col-md-8">

                                                @(Html.Kendo().DropDownListFor(t => t.AddressTypeId4)
                                                .Name("ddlAddressType4")
                                                .Filter("startswith")
                                                .OptionLabel("Select One")
                                                .DataTextField("AdressName")
                                                .DataValueField("AddressTypeId")
                                                //.AutoBind(false)
                                                .HtmlAttributes(new { style = "width: 100%;" })
                                                .DataSource(ds =>
                                                {
                                                    ds.Read("FillAddressType", "LeadDetails");
                                                })
                                                )

                                            </div>

                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>

                                        <div class="form-group">
                                            <div class="col-md-4"><label>Country :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.CountryId4)
                                        .Name("ddlCountryName4")
                                        .Filter("startswith")
                                        .OptionLabel("Select One")
                                        .DataTextField("CountryName")
                                        .DataValueField("CountryId")
                                        //.AutoBind(false)
                                        .Events(e => e.Change("leadcategoriesChange"))
                                        .HtmlAttributes(new { style = "width: 100%;" })
                                        .DataSource(ds =>
                                        {
                                            ds.Read("FillCountry", "LeadDetails");
                                        })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>City :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.CityId4)
                                                  .Name("txtCity4")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "30" }))
                                            </div>
                                        </div>


                                        <script>
                                        function leadcategoriesChange() {
                                            debugger
                                            var value = this.value(),
                                             ddl = $("#ddlStateName4").data("kendoDropDownList");
                                            if (value) {
                                                ddl.dataSource.filter({ field: "CountryId", operator: "eq", value: parseInt(value) });
                                            } else {
                                                ddl.dataSource.filter({});
                                            }
                                        }
                                        function leadcategoriesChange1() {
                                            var value = this.value(),
                                             ddl1 = $("#ddlDistName4").data("kendoDropDownList");
                                            if (value) {
                                                ddl1.dataSource.filter({ field: "StateId", operator: "eq", value: parseInt(value) });
                                            } else {
                                                ddl1.dataSource.filter({});
                                            }
                                        }
                                        </script>

                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Address Line :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.AddressLine14)
                                                  .Name("txtAddressLine14")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "30" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>State :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().DropDownListFor(t => t.StateId4)
                                        .Name("ddlStateName4")
                                        .Filter("startswith")
                                        .OptionLabel("Select One")
                                        .DataTextField("StateName")
                                        .DataValueField("StateId")
            //.Enable(false)
                                        .CascadeFrom("CountryName")
                                        //.AutoBind(false)
                                        .Events(e => e.Change("leadcategoriesChange1"))
                                        .HtmlAttributes(new { style = "width: 100%;" })
                                        .DataSource(ds =>
                                        {
                                            ds.Read("FillState", "LeadDetails");
                                            //ds.ServerFiltering(true);
                                        })
                                                )
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Zipcode :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.ZipCode4)
                                                  .Name("txtZipCode4")
                       .HtmlAttributes(new { style = "width: 100%", placeholder = "Zipcode", onkeypress = "return isNumberKey(event)", @maxlength = "6" }))
                                            </div>
                                        </div>
                                    </div>
                                    @*<div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12">
                                        <div class="col-md-2"><label>Delivery Instruction :</label></div>
                                        <div class="col-md-10">
                                            @Html.TextArea("Textarea", new { id = "txtDelInstn4", style = "height:80px;width:100%;border-color: #cccccc;border-radius:3px " })
                                        </div>
                                    </div>*@
                                    <div class="clearfix" style="margin-bottom:1%"></div>
                                    <div class="col-md-12" align="right">
                                        <button type="button" class="btn btn-default btn-sm" id="addbtnPlus4">
                                            <span class="glyphicon glyphicon-plus"></span>
                                        </button>
                                        <button type="button" class="btn btn-default btn-sm" id="addbtnDel4">
                                            <span class="glyphicon glyphicon-trash"></span>
                                        </button>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </li>

                    <li>
                        <a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Social Infomation</a>
                        <ul class="inner1">
                            <li>
                                <div class="col-md-12">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Facebook :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t=> t.Facebook)
                                                  .Name("txtFacebook")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "Facebook", maxlength = "30" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>LinkedIn :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.LinkedIn)
                                                   .Name("txtLinkedin")
               .HtmlAttributes(new { style = "width: 100%", placeholder = "LinkIn", maxlength = "30" }))
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Twitter :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.Twitter)
                                                  .Name("txtTwitter")
              .HtmlAttributes(new { style = "width: 100%", placeholder = "Twitter", maxlength = "30" }))
                                            </div>
                                        </div>
                                        <div class="clearfix" style="margin-bottom:2%"></div>
                                        <div class="form-group">
                                            <div class="col-md-4"><label>Website :</label></div>
                                            <div class="col-md-8">
                                                @(Html.Kendo().TextBoxFor(t => t.WebSite)
                                                  .Name("txtWebsite")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Website", maxlength = "30" }))
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </li>
                </div>
            </ul>

</div>


            }
            <div class="clearfix" style="margin-bottom:2%"></div>

            <script src="~/accordian/js/expandcollapse.js"></script>

</body>

</html>