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

Select gantt row

Hou can i fire the event to select a specific gantt row, so that when the page loads a specific gantt row is slected?
thanks.

1 Reply

MK Mahalakshmi Karthikeyan Syncfusion Team October 21, 2015 11:11 AM UTC

Hi Dev,

It is possible to make any task selected at load time using “SelectedRowIndex” property. It is also possible to bind event while select a row using “RowSelected” client side event. Please refer the following code example for details.

<ej:Gantt ID="Gantt" runat="server"

//...

       SelectedRowIndex="5"

       RowSelected="rowSelected">

</ej:Gantt>  

<script type="text/javascript">

     function rowSelected(args) {

          // this part hold the code for row selected event       

     }

</script>

Here we have selected the 5th row at load time.

We have also prepared a sample based on this and you can find the sample under the following location.

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/RowSelected-1595676998

Using the “SelectedRowIndex” property, we can render the Gantt with row selected during initial loading, is this your requirement or you still want to trigger an event to select a row in Gantt, based on a condition during initial loading?.


Regards,

Mahalakshmi K.


Loader.
Up arrow icon