navigation Towards up and down in child bands of ultrawingrid

Answered (Verified) This post has 1 verified answer | 7 Replies | 2 Followers Thread's RSS feed.

vams4u
Points 95
Replied On: Tue, Mar 20 2012 12:32 PM Reply

hi,

i am using a ultrawingrid which is having 2 band.

in child band im having 4 rows

im using a user control for up and down buttons for moving a row up or down

im able to move the parent band rows but not able to move the child band rows.

could anyone help me on this topic. 

  • Post Points: 20

Verified Answer

vams4u
Points 95
Answered (Verified) Replied On: Wed, Mar 28 2012 9:53 AM Reply
Verified by vams4u

hey,

im sorry for for such a late reply,

i have done the issue it can be done iof we take up the individual bands collection.

code written to solve this issues is

Grid.ActiveRow.ParentCollection.move

--

Thanks

Vamsi Manohar Katika

  • Post Points: 40

All Replies

Replied On: Wed, Mar 21 2012 5:26 AM Reply

Hello,

Could you please if possible attach a small sample project with your scenario and the exact requirements, I will be happy to assist you further on that matter.


Best regards,

Boris

Developer Support Supervisor, MCPD
Infragistics, Inc.

How to get answers =>

  • Post Points: 20
vams4u
Points 95
Replied On: Wed, Mar 21 2012 5:45 AM Reply

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SelectedRowsCollection

 

 

 

selectedRows = Grid.Selected.Rows;

 

 

 

int

lastGridIndex = (Grid.ActiveRow.ParentCollection.Count) -1;

 

 

 

if ((selectedRows.Count == 0) && (Grid.ActiveCell != null

))

{

Grid.ActiveCell.Row.Selected =

 

 

true

;

selectedRows = Grid.Selected.Rows;

}

 

 

 

if

(selectedRows.Count > 0)

{

 

 

 

bool locked = false

;

 

 

 

int

priorIndex = -1;

 

 

 

if (direction == GridRowDirection

.MoveRowUp)

{

 

 

 

foreach (UltraGridRow dr in

selectedRows)

{

 

 

 

if

(dr.Index == 0)

{

locked =

 

 

true

;

}

 

 

 

else if

(locked && (dr.Index > priorIndex + 1))

{

locked =

 

 

false

;

}

 

 

 

if

(!locked)

{

Grid.Rows.Move(dr, dr.Index + 1,

 

 

true

);

}

priorIndex = dr.Index;

}

Grid.ActiveRowScrollRegion.ScrollRowIntoView(selectedRows[0]);

}

 

 

 

else

{

 

 

 

int

currentRow = selectedRows.Count - 1;

 

 

 

while

(currentRow >= 0)

{

 

 

 

UltraGridRow

dr = selectedRows[currentRow];

 

 

 

if

(dr.Index == lastGridIndex)

{

locked =

 

 

true

;

}

 

 

 

else if

(locked && (dr.Index < priorIndex - 1))

{

locked =

 

 

false

;

}

 

 

 

if

(!locked)

{

Grid.Rows.Move(dr, dr.ListIndex + 1,

 

 

true

);

--

This is code i'm using to move the rows up and down for parents band and its working fine but its not working for the child bands i dont know why ? 

  • Post Points: 20
Replied On: Fri, Mar 23 2012 7:21 AM Reply

Hello,

I am not able to run the code provided in your last post so could you please wrap up your scenario in a zip file and if possible attach to your next post, I will be happy to take a look at it.


Best regards,

Boris

Developer Support Supervisor, MCPD
Infragistics, Inc.

How to get answers =>

  • Post Points: 5
Replied On: Wed, Mar 28 2012 9:47 AM Reply

Hello,

I am checking about the progress of this issue. Please let me know If you need any further assistance on this.


Best regards,

Boris

Developer Support Supervisor, MCPD
Infragistics, Inc.

How to get answers =>

  • Post Points: 20
vams4u
Points 95
Answered (Verified) Replied On: Wed, Mar 28 2012 9:53 AM Reply
Verified by vams4u

hey,

im sorry for for such a late reply,

i have done the issue it can be done iof we take up the individual bands collection.

code written to solve this issues is

Grid.ActiveRow.ParentCollection.move

--

Thanks

Vamsi Manohar Katika

  • Post Points: 40
Replied On: Wed, Mar 28 2012 10:05 AM Reply

Hello,

Thank you for your feedback, I really appreaciate it since the other community members could benefit from this thread as well.

Please do not hesitate to ask if something comes up.


Best regards,

Boris

Developer Support Supervisor, MCPD
Infragistics, Inc.

How to get answers =>

  • Post Points: 20
vams4u
Points 95
Replied On: Wed, Mar 28 2012 10:20 AM Reply

Sure ..

and thanks for the great support.!

  • Post Points: 5
Page 1 of 1 (8 items) | RSS