![]() ![]() ![]() The sequence of actions you will have to undertake in order to change the source structure may vary because this depends strictly on the underlying data source and its data model. Subscribing to this event allows you to reorder the items in the source grid or remove them and append these rows to a destination grid instance. On the server there is a single event (named OnRowDrop). This event cannot be cancelled and have the same set of arguments as the OnRowDropping client event. The OnRowDropped event can be handled if you would like to execute some extra code logic prior to the server-side OnRowDrop event rising. Again, the syntax of the event handler follows the general client-side event signature of RadGrid for ASP.NET AJAX. Additionally, to determine the destination element or set it explicitly use the get_destinationHtmlElement() and set_destinationHtmlElement() properties that can be accessed through the args argument in the handler. If this element does not meet your criteria for acceptable target, cancel the operation by setting t_cancel(true) where args is the second argument passed to the OnRowDropping handler. The OnRowDropping event should be attached to identify the target element on which the dragged grid record is dropped. The row which is about to be dragged can be accessed through the get_gridDataItem() property of the second argument passed in the OnRowDragStarted handler. ![]() The syntax of the event handler follows the general client-side event signature of RadGrid for ASP.NET AJAX. The OnRowDragStarted event can be intercepted if you want to perform some conditional check and determine whether to cancel the drag operation or not. There are three client grid events exposed to handle drag/drop action: OnRowDragStarted (cancelable), OnRowDropping (cancelable) and OnRowDropped. The information below explains what you can do in each phase. The first is the client-side action in the browser, and if that is not cancelled by the developer, a postback is made so the server can be notified of the data change (e.g., so you can update your data sources). There are two phases when the user drags and drops rows. The event-driven model which allows you to process and complete the drag and drop operation can be separated into two phases: client-side and server-side phase. This is meaningful only when you reorder rows within the same RadGrid or from one RadGrid to another. For a live demo, please refer to the RadGrid Items Drag-and-Drop live example.įurthermore, depending on the position you drag an item (above or below other record) it will be placed respectively above or below the corresponding grid item. This will make your grid items draggable only when grabbed by the drag handle in the GridDragDropColumn. Additionally, you can define a GridDragDropColumn in your GridTableView's Columns collection. This will make the grid data rows draggable and the end user will be able to relocate them if needed. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |