iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
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.
Hello Glenn,
I guess there's no way to use the data key field and still be able to track the same children who may have separate parents? I guess we'll have to use the solution we're using to make sure our IDs are unique. Thanks.
I wanted to post an update. We were able to find a workaround. We basically had to force, in our result set data, two new columns that contain the unique ID at every level. Below is a short example of what the new data set looks like. We really should not have to do this since the grid should be "smart enough" to use the data key field for uniqueness. I hope you can provide a fix for this soon to help us and others lower the cost of delivering more data. Thank you.
New data set format
rowKey uniqueParentID uniqueContactID parentID contactID contactLastFirstName --------------------------------------- --------------------------- --------------------------------- ----------- ----------- -------------------- 46740,0,0,0,0,0,0,0,0 0 0,46740 0 46740 Masked Name 46741,0,0,0,0,0,0,0,0 0 0,46741 0 46741 Masked Name 51863,0,0,0,0,0,0,0,0 0 0,51863 0 51863 Masked Name 53880,0,0,0,0,0,0,0,0 0 0,53880 0 53880 Masked Name 53880,438,0,0,0,0,0,0,0 0,53880 0,53880,438 53880 438 Masked Name 46740,6515,0,0,0,0,0,0,0 0,46740 0,46740,6515 46740 6515 Masked Name 51863,51879,0,0,0,0,0,0,0 0,51863 0,51863,51879 51863 51879 Masked Name 51863,51924,0,0,0,0,0,0,0 0,51863 0,51863,51924 51863 51924 Masked Name 46740,52291,0,0,0,0,0,0,0 0,46740 0,46740,52291 46740 52291 Masked Name 53880,52778,0,0,0,0,0,0,0 0,53880 0,53880,52778 53880 52778 Masked Name 46741,55709,0,0,0,0,0,0,0 0,46741 0,46741,55709 46741 55709 Masked Name 46740,6515,6320,0,0,0,0,0,0 0,46740,6515 0,46740,6515,6320 6515 6320 Masked Name 46740,6515,6508,0,0,0,0,0,0 0,46740,6515 0,46740,6515,6508 6515 6508 Masked Name 46740,52291,6516,0,0,0,0,0,0 0,46740,52291 0,46740,52291,6516 52291 6516 Masked Name 46740,52291,47202,0,0,0,0,0,0 0,46740,52291 0,46740,52291,47202 52291 47202 Masked Name 46741,55709,47499,0,0,0,0,0,0 0,46741,55709 0,46741,55709,47499 55709 47499 Masked Name 46741,55709,47508,0,0,0,0,0,0 0,46741,55709 0,46741,55709,47508 55709 47508 Masked Name 46740,52291,49120,0,0,0,0,0,0 0,46740,52291 0,46740,52291,49120 52291 49120 Masked Name 46741,55709,49234,0,0,0,0,0,0 0,46741,55709 0,46741,55709,49234 55709 49234 Masked Name 53880,438,50102,0,0,0,0,0,0 0,53880,438 0,53880,438,50102 438 50102 Masked Name 46740,52291,50147,0,0,0,0,0,0 0,46740,52291 0,46740,52291,50147 52291 50147 Masked Name 46740,52291,50169,0,0,0,0,0,0 0,46740,52291 0,46740,52291,50169 52291 50169 Masked Name 51863,51879,51874,0,0,0,0,0,0 0,51863,51879 0,51863,51879,51874 51879 51874 Masked Name 51863,51879,51890,0,0,0,0,0,0 0,51863,51879 0,51863,51879,51890 51879 51890 Masked Name 51863,51924,51909,0,0,0,0,0,0 0,51863,51924 0,51863,51924,51909 51924 51909 Masked Name
I've also attached the new format data set, as well as the original one, for convenience if you'd like to use it for testing.
I have discussed this issue with the developer and as you have discovered, WebGrid will require the parentdatamember field in self reference setting to have a unique value.
WebGrid will not accept and resulted in an error if the parentdatamember field value in the self reference setting is not unique.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname