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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do i indent/outdent rows in griddatabound hierachy

Thread ID:





99287 May 11,2011 09:02 AM UTC May 24,2011 06:11 PM UTC WinForms 1
Tags: GridControl
Asked On May 11, 2011 09:02 AM UTC


i am using a griddatabound control, for displaying items in hierachial structure and i have requirement to indent/outdent the rows. i,e by clikcing on indent, the child should become the parent and parent to chils.

is it possible using Griddataboundgrid or please suggest an alternative.



Christopher Issac Sunder K [Syncfusion]
Replied On May 24, 2011 06:11 PM UTC

Hi Saumya,

Thank you for your interest in Syncfusion products.

You can use GridGroupingControl for displaying hierarchical levels which will give us better clarifications than GridDataBoundGrid. I have created a sample for GridGroupingControl. You can make use of the below method to swap parents and children. Likewise, you can modify the method as per your application.

static void MoveCollectionItem(IList list, int oldIndex, int newIndex)
var temp = list[oldIndex];

if (newIndex > oldIndex)
for (var i = oldIndex; i < newIndex; ++i)
list[i] = list[i + 1];

if (newIndex < oldIndex)
for (var i = oldIndex; i > newIndex; --i)
list[i] = list[i - 1];

list[newIndex] = temp;

Please refer to the following sample which illustrates the same.


Let me know if you have any other concerns.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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