Naming conventions problem ? can this be modified

Naming conventions problem ? can this be modified

sunildonsunildon Posts: 40Questions: 7Answers: 0

Hi

I am making a AJax call using sAjaxsource to controller . In there i have some code which is related to DATATABLE which understands . When i tried to modify it i am unable to move on .

My code :

           //Used if particulare columns are filtered 
            var nameFilter = Convert.ToString(Request["sSearch_1"]); //when i change i get null sadly
            var addressFilter = Convert.ToString(Request["sSearch_2"]);

            //Optionally check whether the columns are searchable at all 
            var isNameSearchable = Convert.ToBoolean(Request["bSearchable_1"]);
            var isAddressSearchable = Convert.ToBoolean(Request["bSearchable_2"]);

            var isNameSortable = Convert.ToBoolean(Request["bSortable_1"]);
           var isAddressSortable = Convert.ToBoolean(Request["bSortable_2"]);
           var sortColumnIndex = Convert.ToInt32(Request["iSortCol_0"]);  //I DIDNT GET WHATS THE USE OF IT EXACTLY 

I want the names like sSearch1 as nameSeacrh ,bSearchable_1 as NameSearchable and finally bSortable_1 as Namesortable ..
Keeping 1 2 3 .. looks odd . Any work around is appreciated

Regards

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,055 Site admin

    You'd need to use ajax.data (or fnServerParams in 1.9-) to modify the parameter names to suit your needs.

    Allan

This discussion has been closed.