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

Selected Record trigger an update of Partial View

Can you please provide an example for MVC 4 and .NET 4.5 of how to work with a grid that on the selected row event updates the enable/disable status of some syncfusion buttons that are placed in a partial view.

 

Thank you,

Sorin


1 Reply

AR Ajith R Syncfusion Team June 26, 2013 06:39 AM UTC

Hi Sorin,

 

Thanks for using Syncfusion products.

 

Query: How to work with a grid that on the selected row event updates the enable/disable status of some syncfusion buttons that are placed in a partial view.

 

We suggest to  you by handling ClientSideEvent OnRecordSelectionEvent to achieve your requirement. On selecting  the record which university code is even number then the syncfusion button will be disabled or else, if you select the record which university code is odd number then the syncfusion button will be enabled. Please refer the below code snippet.

 

.ClientSideEvents(eve=>{

        eve.OnRecordSelectionEvent("Selection");           

        })

 

<script type="text/javascript">

    function Selection(sender, args) {

        var select = args.record.UniversityCode;

        if (select % 2 == 0)

            $find('btnNormal').Disable();

        else

            $find('btnNormal').Enable();

    }

</script>

 

Please refer the bellow link to download the sample.

 

Please let us know if you have any concerns.

 

Regards,

 

Ajith R



Sample_81dc8949.zip

Loader.
Live Chat Icon For mobile
Up arrow icon