Search Unity

Table Pro: When Your Data isn't a Game

Discussion in 'Assets and Asset Store' started by slumtrimpet, Aug 15, 2015.

  1. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Very sorry for the delayed response here... the sorting is based 100% on the order in which you populate the Datum 'list' object. The rows will be displayed in the same order.
     
  2. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Very sorry for the delayed response here... I tried to duplicate this behavior in the "Simple" sample screen included with the project. It seems to work ok for me with just one row and the 100% width setting. I don't see that you are doing anything wrong or different but I of course can't see everything. Can you look at the "Simple" sample scene and check for anything you are doing differently?
     
  3. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Are you using TMPRO text or Unity? I'd recommend using TMPRO and make sure you aren't manipulating the font properties anywhere else in your project. It sounds like a shared asset issue.
     
  4. skytow2003

    skytow2003

    Joined:
    Feb 9, 2014
    Posts:
    30
    I am using TMPRO Ugui. I had some problems with using same font with both unity text and tmpro. Will check into that. Thanks
     
  5. capgunmatt

    capgunmatt

    Joined:
    Feb 29, 2020
    Posts:
    8
    I've implemented sorting by editing the datastructure I give to the table.data, so I will implement filtering the same way, but I wonder if
    1) sorting is done in the asset already, but I can't see it in this forum or the docs, and again
    2) whether filtering will be added to the asset, or if the assumption is that we handle our own data structures being passed to the table?

    Thanks
     
  6. capgunmatt

    capgunmatt

    Joined:
    Feb 29, 2020
    Posts:
    8
    That reply was 6 years ago, so I thought I'd ask again. Is resizeable columns going to be supported?

    Cheers
     
  7. SocialFreak

    SocialFreak

    Joined:
    Dec 12, 2015
    Posts:
    37
    I'm sure this is listed somewhere here but I just can't find it!

    When I click on a row, regardless of the column, I want to be able to get the data in the first cell of the selected row. How can I go about accomplishing this?

    Thanks!
     
  8. SpyGuy

    SpyGuy

    Joined:
    Apr 12, 2015
    Posts:
    6
    Hello i want to give size according to my wish to each column. and if size of all columns is greater than parent container slider should appear. can you please help me out.
     
  9. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372

    If you initialize your table with:

    Code (CSharp):
    1.       this.table.Initialize(this.OnTableSelected);
    Then the OnTableSelected handler could be something like the following to accomplish your goal:

    Code (CSharp):
    1.     private void OnTableSelected(Datum datum) {
    2.       if(datum != null)
    3.         print("You Clicked: " + datum.uid + " First Cell: " + datum.elements[0].value);
    4.       else
    5.         print("Selection Cleared!");
    6.     }
     
  10. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Initialize your columns with the optional minWidth argument:

    Code (CSharp):
    1.       this.table.ResetTable();
    2.  
    3.       this.table.AddTextColumn("Column1", minWidth:400);
    4.       this.table.AddTextColumn("Column2", minWidth:400);
    5.       this.table.AddTextColumn("Column3", minWidth:400);
    6.  
    7.       this.table.Initialize(this.OnTableSelected);
    Then in the table editor, under "General Settings", check the "Force 100% Width Min" option.
     
  11. ProgrammingWhileSleeping

    ProgrammingWhileSleeping

    Joined:
    Nov 10, 2017
    Posts:
    17
    Hi, @slumtrimpet I'm having trouble with our tables. We have 2 tables for user banning and un-banning. We sometimes get an unnecessary horizontal scrollbar at the bottom. How it happens is, if I first open user banning, when I open un-banning, the scrollbar appears there. This happens as well if I open the un-banning menu and then open the banning menu so the banning menu gets the scrollbar. Any suggestions or is this a currently known bug? Thanks!
     
  12. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Is this anything you could PM me a test project that reproduces the issue? I've not seen this behaviour.
     
  13. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I'm currently looking for a decent table renderer ... and this looks super-promising. A few quick questions (I'm primarily a software-engineer, so if I need to do some coding to achieve what I want, that's fine):
    1. Can I add selection ranges, i.e. select rows 3-8? I'd probably have two modes, one where players select one row, and if they select another one, that replaces the selection; and one where players can drag-select (replacing the drag-scroll feature), and then, clicking on the first or last selected row would unselect, and clicking on the first unselected row next to the selection would expand the selection; clicking on a row that is not connected to the selection would create a new selection. I think I only need row-selections ... maybe also column selections ... and selecting individual cells.
    2. Can I have non-uniform rows? In particular, what I need are different line-widths for the rows, like first a stronger line, then three thin lines, then a medium line, another three thin lines, and so forth.
     
  14. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Regarding #1, yeah we support multi-select on entire rows or cells/rows. Its selectable from within the widget editor when you drop a table in your scene.

    For #2... the rows are adaptive to the height of their content so it is possible to have them be different heights but you can't just explicitly say "row 2 == 200 height" and "row 3 == 100 height" as it's all controlled by magic under the covers. This one is a tough call on if we'd be able to fill the need you have here or not.
     
    jashan likes this.
  15. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Cool, thank you for the quick reply. Regarding #2, I was actually thinking of the lines between the rows. We actually need the row-height to be uniform but I believe that should automatically be the case when we control the contents of each row.

    I guess the question is basically: Can we control the width of the lines between the rows somehow? If this means I have to hack in some logic into your line-rendering code, that's not problem as long as the code doesn't heavily rely on all lines being the same width (which may very well be).

    Basically, what I'm trying to achieve is something like this:

    upload_2020-10-16_18-21-6.png
     
  16. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    I'd love to give you a different answer, but I'd say it's probably going to be problematic. It's definitely not something that's supported in the base lib and I spent a bit of time thinking through a hack to implement what you describe and I'm afraid it probably won't be a good solution.
     
    jashan likes this.
  17. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Ok, thank you anyways, for thinking it through, I really appreciate that. It turns out that I'm probably best off rolling my own solution for this. Like, I realized that one thing I need is also being able to have elements "off-grid", i.e. a little above or below a given cell. Plus, I don't need any of the usual input-handling of tables ... but I certainly have your package bookmarked for when I need a more classic table solution ;-)
     
    slumtrimpet likes this.
  18. drew55

    drew55

    Joined:
    Dec 13, 2017
    Posts:
    44
    Hi @slumtrimpet -- I'm trying to figure out why a table that get Datum updates when it's disables (I verify the data going in) doesn't refresh when the table is enabled. Is there an explicit call to trigger an update?
    Thanks,
    Drew
     
  19. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    There is some magic in coroutines that takes care of the table update stuff. If you disable/reenable a table you need to at least call
    Code (CSharp):
    1. table.StartRenderEngine();
    .

    Depending on the exact usage in your application, you might want to go through the full initialization flow on re-enable:

    Code (CSharp):
    1.  
    2.       this.table.ResetTable();
    3.  
    4.       this.table.AddTextColumn("Column1", minWidth:400);
    5.       this.table.AddTextColumn("Column2", minWidth:400);
    6.       this.table.AddTextColumn("Column3", minWidth:400);
    7.  
    8.       this.table.Initialize(this.OnTableSelected);
    9.  
    10.        //  add data
    11.    
    12.       this.table.StartRenderEngine();
    13.  
     
  20. drew55

    drew55

    Joined:
    Dec 13, 2017
    Posts:
    44
    Wonderful, thanks for the quick reply.
     
  21. dc-Trevellyon

    dc-Trevellyon

    Joined:
    Feb 9, 2021
    Posts:
    4
    whats the best way to get a LEFT shift select of rows highlighted with a list of rows
    i know you have multirow select as you have mentioned that
    we are currently doing something similar to
    Code (CSharp):
    1. private void OnTableSelected(Datum datum, Column column)
    2.         {
    3.             if (Input.GetKey(KeyCode.LeftShift))
    4.             {
    5.                 Debug.Log("Left Shift key is being pressed");
    6.                 if (!leftClickStarted)
    7.                 {
    8.                     leftClickStarted = true;
    9.                     datatableRowStartIndex = int.Parse(datum.uid);
    10.                 }
    11.                 else
    12.                 {
    13.                     datatableRowFinishIndex = int.Parse(datum.uid);
    14.                 }
    15.             }
    16.             else
    17.             {
    18.                 if (leftClickStarted)
    19.                 {
    20.                                    getfinish row
    21.                                     do stuff with these rows
    22.                                  }
    23.                 }
    24. }
    25.  
    its a bit ugly i was wondering how to utlise the multi select or if possible the left shift click stat and finish..
     
  22. dc-Trevellyon

    dc-Trevellyon

    Joined:
    Feb 9, 2021
    Posts:
    4
    Found the solution its simple set the Table Selection UI Mode to MultiRow and the MultiSelect Key to Control
    then call this simple function
    Code (CSharp):
    1.  
    2. List<Datum> dds = table.GetSelectedDatumList();
    3. foreach (Datum dd in dds)
    4. {
    5.     string ThirdCellvalue = table.data[int.Parse(dd.uid)].elements[3].value;
    6.      // do some more code  here
    7. }
    8.  
    actually quite simple although this was not mentioned in teh documentation that i could find but managed to find it in the intillisense and had a play..
     
    Last edited: Feb 10, 2021
  23. airpass

    airpass

    Joined:
    Sep 7, 2020
    Posts:
    1
    Hi, thanks for good asset. How can I resize table by rows,colums?
    I tried Adding Component 'Content Size Fitter' but nothing changed.
     
  24. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    How would I customize the header or create an additional header row that can display game objects? I would also like to set up pagination, is that possible. Thank you.
     
  25. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    We don't support arbitrary headers.

    For paging, TablePro just shows the data you give it, so we've implemented paging in an external UI widget and just hand the 'current page' of data to TablePro as needed. It's not something included in the table asset itself.
     
  26. NikosPetr

    NikosPetr

    Joined:
    Nov 15, 2016
    Posts:
    4
    As @topofsteel mentioned, I want to make header an input field. is there an easy way to accomplice that or should i go deep into source code? right now
    dataGrid.AddInputColumn()
    makes only rows as input field.
    Also is there a discord server?
     
  27. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    There is not an easy way to accomplish that. You would need to either dive deep into the source or walk the created GameObject tree and insert it externally.
     
  28. Eatton

    Eatton

    Joined:
    Jan 16, 2019
    Posts:
    8
    Hi

    Is it possible to show multiple images in the same cell? The images would all be the exact same size, but rendered one on top of the other.

    I ask because I want to display a face which is made up of separate images, all with transparent backgrounds. Eg head.png, eyes.png, lips.png etc. When viewed it appears as one image of a face when in fact it is multiple images.
     
  29. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    You could drill down into the GameObjects and insert that yourself while just using the asset to create the single 'placeholder'.
     
  30. Eatton

    Eatton

    Joined:
    Jan 16, 2019
    Posts:
    8
    Thanks for the quick response.

    I will play about with this and let you know if I need any help.
     
    Last edited: Jun 19, 2021
  31. LinQuestSMSA

    LinQuestSMSA

    Joined:
    Apr 19, 2014
    Posts:
    8
    Hi There. I think Table Pro is an excellent product. I do have a question about refresh. If I populate my worldspace table, then update a single cell, it looks like the whole row flashes as it refreshes. I'm using Table Pro to show real-time telemetry from hundreds of sensors per second and the flashing is very distracting. Is there any way to just display the updated cell data without the row flashing?
    I'm using 2021.1, Win10, and HDRP.
     
  32. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Sure thing. Make this badboy 0.

    upload_2021-7-27_15-21-52.png
     
  33. LinQuestSMSA

    LinQuestSMSA

    Joined:
    Apr 19, 2014
    Posts:
    8
    A Thing of Beauty! Thanks so much for the timely info. It works and now looks very pro. Appreciate the help..
     
  34. sugumaran980

    sugumaran980

    Joined:
    Sep 8, 2021
    Posts:
    1
    Hi, Will User be able to expand the column width by dragging column border
     
  35. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    The columns auto-size to their content, but no, we don't support user interactivity to manually resize the columns via pointer drag.
     
  36. geonolis

    geonolis

    Joined:
    Jul 6, 2021
    Posts:
    5
    Good evening,
    Indeed a powerfull asset.
    I have a Table as a part of my canvas. In the same scene and canvas, outside of the Table object, I have a button and an input field but they never seem to get focus and their events never start.
    Is it the Table Pro script that prevents it? Am I missing something?
    Thank you.
     
    Last edited: Sep 13, 2022
  37. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372

    Hrmm... I guess I'm not entirely sure how to help on this one without all your code (and I don't want that ;) ).

    I can for sure say that we've used TablePro on UIs that have many other external elements that do remain functional. There should be nothing inherently in TablePro preventing what you are attempting there.

    Let me know if you can provide any other clues that perhaps might jump-start my memory so we can help you.
     
  38. geonolis

    geonolis

    Joined:
    Jul 6, 2021
    Posts:
    5
    I need to read the data from SQL Server, using a PHP script. So I instantiate the class that draws the table in a callback method of a coroutine.
    This may be the cause...

    UPDATE:
    I do not know what i was. I removed and added again the external elements and now they are all functional.
    Thank you.
     
    Last edited: Sep 14, 2022
    slumtrimpet likes this.
  39. davidharutyunyan97

    davidharutyunyan97

    Joined:
    Mar 27, 2019
    Posts:
    1
    Hi, I want to buy this tool. TablePro is an amazing product. But before buying, I have a few questions that I would like to get answers to.
    1. What is the result of the stress test, how much data can I show in the table maximum?
    2. Is there dynamic scroll view feature?
    3. Copy to clipboard feature?
     
  40. coolco

    coolco

    Joined:
    Oct 5, 2020
    Posts:
    2
    Is there a way to hide a column and then see what is in the cell of the hidden column on click? Or a way to store data in the table.data that is not displayed so that it can be used later on click?
     
  41. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    The table data is just populated from a standard C# list and we support various click events on cells and whatnot. A function like this would be implemented by you by handling a cell click and displaying whatever data you wish for the row.
     
  42. Muhammad_Fathulloh

    Muhammad_Fathulloh

    Joined:
    Feb 13, 2021
    Posts:
    11
    Hi
    I want to create a medal table for a game with many levels.
    There is a dropdown next to the table. I want to sort the table by All, Gold, Silver and Bronze medals.
    Initially, the table is set to All.
    If I select Gold, the rows with Bronze and Silver medals will disappear.
    When I select All again I need to get the previous table.
    My problem is that some of the data in the table is entered by random.
    How can I save a table before editing it?
    Thank you for your help.
     

    Attached Files:

  43. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    The table just shows the contents of the C# list as you populate each row. If you are seeing random results, trying to completely reinitialize the table from your List as seen in several of the examples.
     
  44. Muhammad_Fathulloh

    Muhammad_Fathulloh

    Joined:
    Feb 13, 2021
    Posts:
    11
    Hi
    I made several tables.
    I need to make my tables SetActive(false) and SetActive(true). In my tables, when SetActive(false) and then setActive(true), a white rectangle appears on the right side of the Header.
    Before setActive(false)
    View attachment 1196485
    After setActive(false)
    upload_2023-2-12_17-24-28.png
     

    Attached Files:

  45. visualjump3d

    visualjump3d

    Joined:
    Jun 6, 2014
    Posts:
    14
    Hi ! ( and sorry for my bad english ) ,
    Your TablePro con have "inputfield" ?
    Thankyou !
     
  46. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    No, TablePro doesn't support input fields. You can get a reference to your cell and row gameobjects and maybe hack something in, but it would be a hack.
     
  47. visualjump3d

    visualjump3d

    Joined:
    Jun 6, 2014
    Posts:
    14
    Thanks for the quick response !

    For a fee, could you modify TablePro so that it can contain InputFields and ComboBoxes?
     
  48. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    372
    Perhaps... I sent you a private message.
     
  49. Muhammad_Fathulloh

    Muhammad_Fathulloh

    Joined:
    Feb 13, 2021
    Posts:
    11
    Hi
    I want to create several tables.
    The number of tables is dynamic.
    Can I add the <Table> script to the gameObject and use it as a prefab?
    Will there be any problem with the table when I use the prefab?
     
  50. Muhammad_Fathulloh

    Muhammad_Fathulloh

    Joined:
    Feb 13, 2021
    Posts:
    11
    I have a second problem.
    I have tables with 10, 25 and 30 rows.
    When I look at the Hierarchy panel, the Sizer gameobject of the table with 30 rows only has 12 children.
    The rest of the tables have the same problem.
    4 other tables in this same scene have extra rows.
    upload_2023-4-8_17-36-17.png