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
close icon

Synchfusion grid filter position need to change dynamically for ASP.NET Web Forms.

Hello Team,


Currently when we open the synchfuson grid filter its open on the right side but many time because of less space on the right-hand side of the grid filter popup is not visible to the user properly.

Is it possible to set dynamically position of the filter on the left-hand side or right-hand side?

I am sharing the image with you for your better understanding.

If there is no proper space can I set the popup alight left and right dynamically is it possible?


Screenshot 2022-10-11 133303.png

Thanks

Thayaparan


3 Replies

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team October 12, 2022 03:30 PM UTC

Hi Thayaparan,


We will check for the feasibility of this requirement and provide you further details by on or before 14th October 2022. Until then we appreciate your patience.


Regards,

Farveen sulthana T



TK Thayaparan Kumarakuru October 14, 2022 12:25 PM UTC

Hello Farveen,


Thank you for your reply. I am still waiting for your solution please give me a solution ASAP.


Regards

Thayaparan



PS Pon Selva Jeganathan Syncfusion Team October 14, 2022 02:04 PM UTC

Hi Thayaparan,


Thanks for your patience.


Query: Is it possible to set dynamically position of the filter on the left-hand side or right-hand side? If there is no proper space can I set the popup alight left and right dynamically is it possible?


From your query we understand that you need to change the position where the excel filter dialog opens up. We achieved your requirement by changing the position (X and Y) of the dialog before it opens (i.e in the "beforeOpen" event of dialog) inside the create event of grid. 


Please refer to the below code snippet,


<ej:Grid ID="OrdersGrid" ClientIDMode="Static" runat="server" AllowPaging="true" AllowFiltering="true"   >

     

      <ClientSideEvents Create="create" />

      <FilterSettings FilterType="Excel" />

       <Columns>                                  

 

….       

 

       </Columns>

..

   </ej:Grid>

 

   

    <script type="text/javascript">

       

        function create(args) {

            $("#" + this._id + "_" + "stringDlg").ejDialog({

                beforeOpen: function (args) {

                    args.model.position.X = 200;

                    args.model.position.y = 70

                }

 

            })

        }

 

     

 

      


Please check the below help documentations,

https://help.syncfusion.com/api/js/ejdialog#events:beforeopen

https://help.syncfusion.com/api/js/ejdialog#members:position

https://help.syncfusion.com/api/js/ejgrid#events:create


Please refer to the below sample,

https://www.syncfusion.com/downloads/support/directtrac/general/ze/webform_-sample1087794052


In the sample , we have changed left and right position of dialog widget in the dialog's "beforeOpen" event inside grid's create event. Similarly, you can change the position as per your wish by changing X and Y value.


Kindly get back to us for further assistance.


Regards,
Pon selva


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.








Loader.
Live Chat Icon For mobile
Up arrow icon