خرید بک لینک

Vote count: 0

can you help me to fix my problem, I made gridview, and I use combobox to filter data in gridview and get gridview performcallback after filter, but gridview not callback after filter. how can I do ? Help me Please? this is some code : controller gridview filter :

        [HttpPost]
        public ActionResult FilterTypePro(String typePro)
        {
            //Session["typePro"] = typePro;
            var model = Model._ProposalObject.ListDataProposal();

            if (typePro != null && typePro != string.Empty)
            {
                model = Model._ProposalObject.ListDataProposal(typePro);
            }

            retu PartialView("_gvPartialViewProposals", model);
        }

and this is code to get value filter combobox :

    function OnClickFilter(type) {
        type = cbTypeProposal.GetValue();     
        $.ajax({
            type: "POST",
            cache: false,
            async: false,
            url: '@Url.Action("FilterTypePro", "App")',
            data: { 'typePro': type },
            success: function (data) {
                /*gvPartialViewProposals.AdjustControl();
                try {
                    gvPartialViewProposals.PerformCallback();
                }
                catch(er){
                }*/
                gvPartialViewProposals.Refresh(data);
            }
        });
    }

and this is code to view cshtml :

groupItem.Items.Add(item =>
            {
                    item.Caption = "Type Of Proposal";
                    item.Width = 400;
                    item.SetNestedContent(() =>
                    {
                        ViewContext.Writer.Write("<table><tr><td>");
                        Html.DevExpress().ComboBox(cmbSettings =>
                        {
                            cmbSettings.Name = "cbTypeProposal";
                            cmbSettings.Width = 100;
                            cmbSettings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                            cmbSettings.ShowModelErrors = true;
                            cmbSettings.Properties.Items.Add("ATL", "ATL");
                            cmbSettings.Properties.Items.Add("BTL", "BTL");
                            cmbSettings.Properties.ClientSideEvents.SelectedIndexChanged = "function(s, e) { OnClickFilter();}";
                        }).Render();
                        ViewContext.Writer.Write("</td></tr></table>");
                    });
                }); ;
        }).GetHtml();

I hope you can help me.

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 13 فروردين 1395 ساعت: 9:48

صفحه بندی