Is it possible to use the Drag & Drop framework to move rows around (for sorting, basically) in the child bands of a WHDG? I have it working in the parent grid, but am not sure how to get it going in the children.
Thanks
Hi Nikolay
I want to format columns of child bands in WHG like I want to do as (
field.Header.Text = sHeaderText;field.Width = Unit.Pixel(iWidth);field.CssClass = sCSS;field.Hidden = bVisibility;field.DataType = sDatatype;field.DataFormatString = sFormat;)
Thx
Shyam
Hi cwaldmann,
If you need any further assistance on the matter please do not hesitate to ask.
Hello cwaldmann,
Thank you for sharing your code with the community.
A client-side object model reference guide for Infragistics’ controls can be found at http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=Web_Client_Side_Object_Model_CSOM_Reference_Guide.html. Note that the CSOM for different version of NetAdvantage may differ.
Please let me know if you have any further questions.
Thanks for pointing me in the right direction. I got it solved.
For those interested, here is my final Javascript code to apply the drag/drop to the rows in the child band:
//apply drag drop to questions (parent band)_ddQuestions = new $IG.DragDropBehavior();_ddQuestions.get_events().addDragMoveHandler(moveQuestion);_ddQuestions.get_events().addDropHandler(dropQuestion);
datagrid = $find("<%= whdgQuestions.ClientID %>")
if (datagrid != null) { datagridrows = datagrid.get_gridView().get_rows(); count = datagridrows.get_length();
for (var i = 0; i < count; i++) { var row = datagridrows.get_row(i).get_element(); _ddQuestions.addSourceElement(row); _ddQuestions.addTargetElement(row);
//apply drag/drop to child questions (child band) if (datagridrows.get_row(i).get_rowIslands(0)[0] != null) { _ddChildQuestions[_ddChildQuestions.length] = new $IG.DragDropBehavior(); _ddChildQuestions[_ddChildQuestions.length-1].get_events().addDragMoveHandler(moveChildQuestion); _ddChildQuestions[_ddChildQuestions.length-1].get_events().addDropHandler(dropChildQuestion);
var childBand = datagridrows.get_row(i).get_rowIslands(0)[0].get_rows();
for (var c = 0; c < childBand.get_length(); c++) { var childrow = childBand.get_row(c).get_element();
_ddChildQuestions[_ddChildQuestions.length - 1].addSourceElement(childrow); _ddChildQuestions[_ddChildQuestions.length - 1].addTargetElement(childrow); } } }}
On another note, is there a good resource for the Javascript part of the API? Your online documentation give me class outlines for the server side objects, but the functions for Javascript are obviously somewhat different. I find myself running the debugger just to look at what the objects and their capabilities are,.
Please let me know if you still need assistance on this matter.