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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Client-side Row/Column selection prevention

Thread ID:

Created:

Updated:

Platform:

Replies:

101098 Sep 26,2011 07:37 PM UTC Sep 27,2011 01:41 PM UTC ASP.NET MVC (Classic) 2
loading
Tags: Grid
Jason Beal
Asked On September 26, 2011 07:37 PM UTC

Hi folks,

Is there any way to prevent selection of columns/rows of the grid on the client side. I want to perform some custom client side validation and prevent users from interacting with the grid until any discrepancies have been resolved.

I saw the AllowSelection(bool) property, but is this invokable from the client side?


Jason Beal
Replied On September 26, 2011 07:39 PM UTC

I guess I would also need to restrain any grid interaction such as paging, grouping / sorting.

I basically want to render the entire grid non-interactive, but still preserve any groups, filters, paging as well as selected grid items.


Eswari S [Syncfusion]
Replied On September 27, 2011 01:41 PM UTC

Hi Jason,

Thank you for your interest in Syncfusion products.

Query #1 : selection prevention

AllowSelection property is invokable form client side. We can prevent selection of rows using AllowSelection property in Onload event. Please refer to the following code snippets :

[Aspx]

<%=Html.Syncfusion().Grid("OrdersGrid")
. . .
. . .

.ClientSideEvents(eve=>{
eve.OnLoad("Onload");
})
%>



Query #2 : Preserve any groups, filters, paging

We can prevent the actions like paging ,sorting using properties AllowPaging ,AllowSorting .Please refer to the following code snippets :

[Aspx]

<%=Html.Syncfusion().Grid("OrdersGrid")

// AllowPaging , AllowSorting can be set false to disable the paging and sorting .

.PageSettings(page =>
{
page.AllowPaging(false);
})
.SortSettings(sort=>{
sort.AllowSorting(false);
})
.Grouping(group=>{
group.AllowGrouping(false); // to disable grouping
})
.Filtering(filter=>{
filter.AllowFiltering(false); // to disable filtering

})
%>


Also , we can done through client script in Onload event.





For your convenience ,we have prepared the sample and the same can be downloaded from the following link :

Sample-1683864767.zip

Please try this and let us know if you need any further assistance.

Regards,
Eswari.S




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;