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

show alert when the horizontal scroll hit the left side

Good morning.

I would like to show an alert every time the horizontal scroll hit the left side, as you can see in the below image. Is it possible?



I will be waiting for your reply, thank you in advance.
Regards, Luis Carlos Díaz.

3 Replies

VN Vignesh Natarajan Syncfusion Team April 26, 2019 12:26 PM UTC

Hi Luis, 

Thanks for contacting Syncfusion support. We are happy to assist you. 

Query: I would like to show an alert every time the horizontal scroll hit the left side, as you can see in the below image. Is it possible? 
 
We have achieved your requirement by using thumbEnd and wheelStop event of ejScroller. In that event based on scrollLeft value we have displayed the alert window. 
 Please refer the below code example, 

<script type="text/javascript"> 
        $(function () { 
            $("#Grid").ejGrid({ 
………………………………………… 
                             dataBound:"ondatabound", 
                columns: [ 
                             ……………………… 
               ] 
            }); 
        }); 
               
              function ondatabound(){ 
                  this.getScrollObject().setModel({ 
                             thumbEnd: "scroll", 
                             wheelStop: "scroll" 
                      }) 
        } 
               
              var flag = true; 
               
              function scroll(){ 
                 if(this.model.scrollLeft == 0 && flag){ 
                          alert("Hit"); 
                          flag = false; 
                      } 
                      setTimeout(function () { 
                          flag = true; 
                      },0) 
              } 
 
    </script> 

For your convenience we have prepared a sample which can be referred below   


Please get back to us, if you need further assistance. 

Regards, 
Vignesh Natarajan. 
 



LC Luis Carlos April 29, 2019 11:11 AM UTC

Good evening.


Thank you for your information, it was very useful.

Now, I have another problem, when I click on the vertical blue line between the frozen columns and movable columns, this error appears.


I will be waiting for your reply. Thank you again for your help.
Regards Luis Carlos.


VN Vignesh Natarajan Syncfusion Team April 30, 2019 10:51 AM UTC

Hi Luis,  
 
Thanks for the update.  
 
Query: “Now, I have another problem, when I click on the vertical blue line between the frozen columns and movable columns, this error appears. 
 
From your query  we understand that you are facing issue while clicking the blue border (separator for frozen and movable columns). We have analyzed the shared the screenshot and it is thrown from gantt control. Can you please share the following details to validate the issue further.  
 
  1. Are you facing issue while rendering the both Grid and Gantt control in same page.
  2. Have you used Gantt control in your page.
  3. Share the Grid and Gantt Render code example.
  4. Share the video demonstration for the reported issue along with replication procedure.    
  5. Are you facing the issue after applying the solution provided in previous update.  
 
Requested details will be helpful for us to validate the reported issue at our end. 
 
Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon