We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Working with AJAX mode enabled

Hello,

I'm using the GridGroupingControl Version 11.4400.0.26.
I always enable the AJAX mode with Action=Server, because it Looks more professional to me.
Since I started up with this control and AJAX enabled, I always struggle with problems, that don't exist, when AJAX mode is disabled for example: ShowRowHeader=false doesn't work, selection of records could only be handled with JavaScript, setting a record selected is not possible for me at the Moment and many other things.

What is, in General the way to work with the GridGroupingControl in AJAX mode. Is it always better to handle things with JavaScript? and if so, where can I get examples or the JavaScript Object Reference for the GridGroupingControl?

Thanks a lot for good advice!

5 Replies

KN Kavitha Narayanan Syncfusion Team November 2, 2015 04:10 PM UTC

Hi Dirk,

Thank you for using Syncfusion products.

We have used CSS display property to hide RowHeader in the GridGroupingControl with AJAX mode.

Please refer to the below code and sample.

[style]

       .RowHeader {

            display:none;

        }

        .SelectedRowHeaderCell {

            display:none;
        }
[Script]

$(document).ready(function () {

            $($('.GridHeader col')[0]).css("width", "0px");

            $($('.GridContent col')[1]).css("width", "20px")

            $($('.GridContent col')[2]).css("width", "1px")
        });

Sample: http://www.syncfusion.com/downloads/support/forum/120977/ze/sample-960334821.zip
 
Query: selection of records could only be handled with JavaScript,

Please refer to the online link.

Online Link: http://help.syncfusion.com/aspnet-classic/grid/how-to/get-the-selected-rows-in-the-grid

Regards,
Kavitha N.




DH Dirk Hoffmann November 3, 2015 08:14 AM UTC

Thank you for the samples, but your answer did not match the sence of my question.

You write that you use css or jquery to hide the rowheader, but why? There are properties in the syncfusion classes that one could use, but dont work with AJAX mode enabled.
Is css in general that way to get most display issues done when AJAX mode is enabled? When do I have to use css or jQuery and when can I use the properties of the Syncfusion classes?
I don't want to contact the Support each time. 
Can you give me an advice for the general use of AJAX enabled GridGroupingControl? When do which properties and classes work?

The sample for row selecting is not satisfying, because only the code for a loop through the selectedrecords collection doesn't do the Job.

And my next problem, that is not solved until now is selection of records by code behind. If I set a record with the SetCurrent() Method, the record is not selected, when the browser Shows the page.-

Please, I need help!


KN Kavitha Narayanan Syncfusion Team November 4, 2015 12:04 PM UTC

Hi Dirk,


We considered this “ShowRowHeader property as false is not work with AJAX mode” as an issue and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.


https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents


Regards,

Kavitha N.



DH Dirk Hoffmann November 10, 2015 10:37 AM UTC

Hello,

the sence of my question is still not answered but I slowly get the Option that learning jQuery would help me.

I'm still not able to select a record in the GirdGroupingControl.

You said that the selection of records could be handled with JavaScript an you refered to an onlinelink but the sample under that link has nothing to do with JavaScript and doesn't work in VB.net either.

Come on, I think you can do better...

 


SK Sarath Kumar P Syncfusion Team November 11, 2015 11:37 AM UTC

Hi Dirk,

We suggest you to use selectRow client side method to select a record in the GridGroupingControl. Please refer to the following code example,


[Aspx]

<input type="text" id="textBx" runat="server" value="0" />                                                    //Textbox to select record in GridGroupingControl  by its value.                                                              

 

<input type="button" id="Button1" value="Select Record" onclick="update();" runat="server" />              


<syncfusion:GridGroupingControl ID="GridGroupingControl1" runat="server" AjaxAutoformat="Office2007Blue"

EnableCallbacks="false" ShowGroupDropArea="true" EnableAjaxMode="true" DataSourceCachingMode="ViewState"
AllowMultiSorting="true" EnableAjaxPaging="true">                                                             // GridGroupingControl with Ajax mode.


[Script]


function update() {

var gridObj = $find("MainContent_GridGroupingControl1");  // Get GridGroupingControl object by its ID(MainContent_GridGroupingControl1)

if (gridObj != null) {

gridObj.selectRow($("#MainContent_textBx").val());        //selectRow” client side method to select a record in the GridGroupingControl based on the value in textbox(MainContent_textBx).

}

return false;
}

Please refer to the sample.

Sample: 
  http://www.syncfusion.com/downloads/support/forum/120977/ze/AjaxGrid-RecordSelect1476082840


Regards,

Sarath Kumar P.


Loader.
Live Chat Icon For mobile
Up arrow icon