I’ve spent a fair bit of time searching on here for some kind of instructional and the closest I found was from 2009 - and doesn’t look like the customization tools dialog looks the same.
I have data in a UD table that I would like to link to Part table and display on an Ultragrid - showing all rows that match the part number. Essentially, each part number we make can be setup to be ran with a variety of different input parameters. We have a table that defines all the combinations associated with each part number. I’d like to link UD39 to Part table using PartNum. Even if someone had a brief step by step I could probably search out the details of each.
Have you looked at the Add User Defined Table As Child wizard? You could use that to link UD39 to the part data view by part number. Once you have it linked you could then bind UD39 to a grid.
It will return all of the entries tied to the parent record. So if you have part ABC and 4 records in UD39 for part ABC, it will pull the 4 records. Then if you change the parent part the data will change to match the new parent record.
Thanks guys. I’m getting there. Will I need to invoke some method in order to display the rows from the table? I would’ve expected them to show by default when I click into the tab with my grid but there are no rows in my grid.
I saw that as an option. I clicked it. It didn’t make any new rows in my table, though. Since my table is pre-populated I was really hoping it would show existing rows in UD39 provided the Key matches my PartNum.
Did you manage to resolve this Dan as I am experiencing the same issue with getting the data to display in the grid and am a little unsure where I am going wrong.
@dr_dan, did you EpiBind your UD39View (when customizing the form with the UltraGrid in focus)? How did you populate your UD39 table? What keys did you use when you used the customization wizard to link the child table?
OK So I have feedback and encouragement. After months of letting this sit, I am back at it.
I was able to get the grid to display the child rows based on the key I am matching to parent table. I even got it to let me edit those rows in the grid and it saved them in the UD table. However, I can’t seem to get it to add a new row from there, even though there’s a button for it. It lets me hit Enter on the grid and it creates a new blank row, but it will not save that.
@KirsJone - I believe I can help you get the table to show results if you’re still having issues. I found that it will not display unless it is finding “unique” rows based on all 5 keys. My data set that I imported did not have “uniqueness” from the 5 keys. Another thing I read somewhere else: Keys 1-4 are user definable to match up. But Key 5 is an auto-key that the wizard writes a script to increment based on keys 1-4. So in my case, I am only using Key 1. I had to edit my table in Excel to make Key 5 = to the count of Key 1. So if I have 4 rows with the same Key 1, I had to add a Key 5 value of 0, 1, 2, 3 to each row respectively. Excel makes this very easy. I did a =countif($B$2:$B2, $B2) - 1 and copied this all the way down my table. This essentially did the counting of each row.
One thing that wasn’t mentioned is that when you setup that customization wizard to link the UD table, you have to save/close and then re-launch to see that View in your bindings. Then, after you select the new UD View in your bindings for the Ultragrid, you have to save/close and re-launch to get the column collection to display the columns from the UD table. After this, you can edit which columns display and the captions of each.
I do remember when going through the wizards where I link them I clicked next so I could enable the create new then click back to then enter the link. Not sure if this makes a difference.