Self Reference Grid Breaks Even Though Key Field Is Unique

3 replies. Last post: June 30, 2010 8:16 AM by A Yousif
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
A YousifMember

We have a self referencing grid that may contain the same user in multiple places in the hierarchy but at times we get a page error like "child row has multiple parents" even though the key field is unique.

Does the grid not use the row key field along with the child and parent ids to correctly render its contents?  Also, in some cases depending on the data, rather than getting a page error, the grid just blows up with multiple JavaScript errors and does not render correctly.

Below is data (from a SQL stored procedure) that causes the grid to fail with errors on the page.  The grid was fine until I added the bolded/red items below.  The blue items are the same user at a different level so you can see the rowKey is unique.

rowKey                                    parentID   contactID contactLastFirstName
---------------------------------------- --------- ----------- --------------------
46740,0,0,0,0,0,0,0,0                            0       46740 Masked Name
46741,0,0,0,0,0,0,0,0                            0       46741 Masked Name
48713,0,0,0,0,0,0,0,0                            0       48713 Masked Name
51863,0,0,0,0,0,0,0,0                            0       51863 Masked Name
53880,0,0,0,0,0,0,0,0                            0       53880 Masked Name
53880,438,0,0,0,0,0,0,0                      53880         438 Masked Name
46740,6515,0,0,0,0,0,0,0                     46740        6515 Masked Name
48713,47202,0,0,0,0,0,0,0                    48713       47202 Masked Name
51863,51879,0,0,0,0,0,0,0                    51863       51879 Masked Name
51863,51924,0,0,0,0,0,0,0                    51863       51924 Masked Name
46740,52291,0,0,0,0,0,0,0                    46740       52291 Masked Name
53880,52778,0,0,0,0,0,0,0                    53880       52778 Masked Name
46741,55709,0,0,0,0,0,0,0                    46741       55709 Masked Name
46740,6515,6320,0,0,0,0,0,0                   6515        6320 Masked Name
46740,6515,6508,0,0,0,0,0,0                   6515        6508 Masked Name
46740,52291,6516,0,0,0,0,0,0                 52291        6516 Masked Name
46740,52291,47202,0,0,0,0,0,0                52291       47202 Masked Name
46741,55709,47499,0,0,0,0,0,0                55709       47499 Masked Name
46741,55709,47508,0,0,0,0,0,0                55709       47508 Masked Name
46740,52291,49120,0,0,0,0,0,0                52291       49120 Masked Name
46741,55709,49234,0,0,0,0,0,0                55709       49234 Masked Name
46740,52291,50147,0,0,0,0,0,0                52291       50147 Masked Name
46740,52291,50169,0,0,0,0,0,0                52291       50169 Masked Name
51863,51879,51874,0,0,0,0,0,0                51879       51874 Masked Name
51863,51879,51890,0,0,0,0,0,0                51879       51890 Masked Name
51863,51924,51909,0,0,0,0,0,0                51924       51909 Masked Name
51863,51924,51932,0,0,0,0,0,0                51924       51932 Masked Name
46741,55709,54516,0,0,0,0,0,0                55709       54516 Masked Name
46740,6515,55154,0,0,0,0,0,0                  6515       55154 Masked Name
46741,55709,56206,0,0,0,0,0,0                55709       56206 Masked Name
46741,55709,58298,0,0,0,0,0,0                55709       58298 Masked Name
46741,55709,58310,0,0,0,0,0,0                55709       58310 Masked Name
46740,6515,6320,6228,0,0,0,0,0                6320        6228 Masked Name
46740,52291,49120,6256,0,0,0,0,0             49120        6256 Masked Name
46740,52291,50169,6336,0,0,0,0,0             50169        6336 Masked Name
46740,52291,49120,6346,0,0,0,0,0             49120        6346 Masked Name
46740,6515,6508,44868,0,0,0,0,0               6508       44868 Masked Name
46740,52291,50169,47204,0,0,0,0,0            50169       47204 Masked Name
46741,55709,56206,47482,0,0,0,0,0            56206       47482 Masked Name
46741,55709,47499,47483,0,0,0,0,0            47499       47483 Masked Name
46741,55709,47508,47500,0,0,0,0,0            47508       47500 Masked Name
46741,55709,47499,47509,0,0,0,0,0            47499       47509 Masked Name
46741,55709,54516,47527,0,0,0,0,0            54516       47527 Masked Name
46741,55709,56206,47549,0,0,0,0,0            56206       47549 Masked Name
46741,55709,54516,47564,0,0,0,0,0            54516       47564 Masked Name
46740,52291,49120,48174,0,0,0,0,0            49120       48174 Masked Name
46740,52291,47202,48594,0,0,0,0,0            47202       48594 Masked Name
46741,55709,47508,48870,0,0,0,0,0            47508       48870 Masked Name
46740,52291,49120,49222,0,0,0,0,0            49120       49222 Masked Name
46740,52291,47202,49474,0,0,0,0,0            47202       49474 Masked Name
46740,52291,47202,49519,0,0,0,0,0            47202       49519 Masked Name
46740,52291,47202,49522,0,0,0,0,0            47202       49522 Masked Name
46740,52291,50169,49810,0,0,0,0,0            50169       49810 Masked Name
46740,52291,50147,50148,0,0,0,0,0            50147       50148 Masked Name
46740,52291,50147,50168,0,0,0,0,0            50147       50168 Masked Name
46740,52291,50169,50170,0,0,0,0,0            50169       50170 Masked Name
46740,52291,50169,50171,0,0,0,0,0            50169       50171 Masked Name
46740,52291,50169,50174,0,0,0,0,0            50169       50174 Masked Name
46740,52291,50169,50185,0,0,0,0,0            50169       50185 Masked Name
46740,52291,49120,50206,0,0,0,0,0            49120       50206 Masked Name
46740,52291,50169,52778,0,0,0,0,0            50169       52778 Masked Name
46741,55709,58298,52803,0,0,0,0,0            58298       52803 Masked Name
46740,52291,6516,53007,0,0,0,0,0              6516       53007 Masked Name
46741,55709,47499,53025,0,0,0,0,0            47499       53025 Masked Name
46741,55709,54516,53027,0,0,0,0,0            54516       53027 Masked Name
46740,52291,49120,53901,0,0,0,0,0            49120       53901 Masked Name
46741,55709,47508,54154,0,0,0,0,0            47508       54154 Masked Name
46741,55709,56206,54820,0,0,0,0,0            56206       54820 Masked Name
46741,55709,58310,54844,0,0,0,0,0            58310       54844 Masked Name
46740,6515,55154,55163,0,0,0,0,0             55154       55163 Masked Name
46740,52291,50147,57106,0,0,0,0,0            50147       57106 Masked Name
46740,52291,49120,57412,0,0,0,0,0            49120       57412 Masked Name
46740,52291,49120,57564,0,0,0,0,0            49120       57564 Masked Name
46740,52291,47202,58104,0,0,0,0,0            47202       58104 Masked Name
46741,55709,47508,59693,0,0,0,0,0            47508       59693 Masked Name
46740,52291,49120,6346,6129,0,0,0,0           6346        6129 Masked Name
46740,52291,49120,6256,6139,0,0,0,0           6256        6139 Masked Name
46740,52291,49120,57564,6146,0,0,0,0         57564        6146 Masked Name
46740,52291,49120,49222,6201,0,0,0,0         49222        6201 Masked Name
46740,52291,49120,57564,6223,0,0,0,0         57564        6223 Masked Name
46740,52291,49120,57564,6225,0,0,0,0         57564        6225 Masked Name
46740,52291,49120,53901,6234,0,0,0,0         53901        6234 Masked Name
46740,52291,49120,49222,6241,0,0,0,0         49222        6241 Masked Name
46740,52291,49120,6346,6242,0,0,0,0           6346        6242 Masked Name
46740,52291,49120,6346,6354,0,0,0,0           6346        6354 Masked Name
46740,52291,49120,57564,6463,0,0,0,0         57564        6463 Masked Name
46740,52291,49120,49222,6472,0,0,0,0         49222        6472 Masked Name
46740,52291,49120,49222,44868,0,0,0,0        49222       44868 Masked Name
46740,52291,49120,53901,45560,0,0,0,0        53901       45560 Masked Name
46741,55709,47499,53025,47503,0,0,0,0        53025       47503 Masked Name
46740,52291,49120,49222,48265,0,0,0,0        49222       48265 Masked Name
46740,52291,49120,50206,49523,0,0,0,0        50206       49523 Masked Name
46740,52291,50147,50148,50160,0,0,0,0        50148       50160 Masked Name
46740,52291,50169,50185,50186,0,0,0,0        50185       50186 Masked Name
46740,52291,49120,50206,50220,0,0,0,0        50206       50220 Masked Name
46740,52291,49120,50206,50226,0,0,0,0        50206       50226 Masked Name
46740,52291,50169,50170,51785,0,0,0,0        50170       51785 Masked Name
46740,52291,50169,47204,51788,0,0,0,0        47204       51788 Masked Name
46740,52291,49120,57564,51789,0,0,0,0        57564       51789 Masked Name
46740,52291,50169,50185,51790,0,0,0,0        50185       51790 Masked Name
46740,52291,50147,57106,51795,0,0,0,0        57106       51795 Masked Name
46740,52291,50169,6336,51797,0,0,0,0          6336       51797 Masked Name
46740,52291,49120,6346,52342,0,0,0,0          6346       52342 Masked Name
46740,52291,49120,6346,52448,0,0,0,0          6346       52448 Masked Name
46740,52291,49120,6256,52778,0,0,0,0          6256       52778 Masked Name
46740,52291,50169,50185,57108,0,0,0,0        50185       57108 Masked Name
46740,52291,50147,50148,57577,0,0,0,0        50148       57577 Masked Name
46740,52291,49120,57564,57633,0,0,0,0        57564       57633 Masked Name
46740,52291,49120,49222,58412,0,0,0,0        49222       58412 Masked Name
46740,52291,50147,57106,58615,0,0,0,0        57106       58615 Masked Name
46740,52291,49120,57412,60592,0,0,0,0        57412       60592 Masked Name

Here's how the grid's self ref settings are set up per the data above:

<RootTable DataKeyField="rowKey">
   <SelfReferencingSettings ApplyChildSorting="true"
      LoadOnDemand="false" FitColumnOnExpand="false" Enabled="true"
      ParentDataMember="contactID" ChildDataMember="parentID" />
</RootTable>

You should be able to easily duplicate with your own data in a smaller set just using similar layout in the items I've highlighted.

 

All times are GMT -5. The time now is 12:00 PM.
Previous Next