Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

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:
    278
    TextMeshPro should automatically set a Scripting Define Symbol of "TMP_PRESENT" when it's... present. That's all we key off of in our asset to automatically switch all the text to TMP test instead of vanilla Unity. Let me know if you are having any problem with that.



    For the coloring, iterate over each "Element" in the "Datum.elements" you want to color and set their color or backgroundColor as desired.
     
  2. Kirch21

    Kirch21

    Joined:
    Sep 28, 2017
    Posts:
    8
    And that is just under the player settings correct? Yea mine is blank, ill just type it in manually. Thanks!
     
  3. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Correct :)
     
  4. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Hi,

    I just had a new requirement come up, and they want more headers in the table... Is this something possible in table pro? At the moment I am just thinking of a dirty hack and making a row LOOK like a header, change its colour, and then leave some cells blank if they are not needed...Is there a way to change the height of the whole row or even better if I could have additional headers that would nice.
     
  5. PridefulDad

    PridefulDad

    Joined:
    Oct 9, 2017
    Posts:
    3
    Thanks for the code :) I assume this code is free for commercial use? o_O
     
  6. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Rows will auto-size their height to their content... we don't have ability to set a UI height arbitrarily for a given row though. We don't support multiple headers.
     
  7. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    What?
     
  8. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Thanks, not a big issue I got around that. I am getting a strange font issue though since I purchased this, basically the font will go lighter than normal, I have to render the table again for it to appear normal and bold. Also, how do I use text mesh pro with this?
     
  9. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Can you post or send me a picture of what's going on? Are you using Unity's text or TMPro?
     
  10. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    I'm using Unity Text.

    All other interface text is fine. It's just the table text. I uploaded a screenshot.

    Maybe it will work better if I switch to TMPro? How can I do that?
     

    Attached Files:

  11. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278

    Very odd... I've never seen it behave like that before. Almost like there's an alpha being applied to the text... but there shouldn't be. I think we've got three options:
    1. I could PM you the latest TablePro code to drop in and see if it by chance fixes things. We did find one item with headers alphas that has been fixed.
    2. You could PM me a repro project so I can poke at it and fix it on my end.
    3. You could TRY to switch to TextMeshPro... which I do highly recommend because it just looks better than Unity text, but I'm doubtful that it'll impact this.
    Let me know what you'd prefer.

    PS.. if you switch to TextMeshPro, make sure it either automatically defines the TMP_PRESENT flag here of you do it manually. There was a bug in TMP that was not defining that in some recent builds and I'm not sure it's been fixed.

     
  12. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87

    I've noticed that it doesn't always happen.. Sometimes it shows okay so its rather strange. How do I switch to TMP? If that doesn't work I will get back to you. Thanks
     
  13. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Just download and install the TMPRO asset and make sure it creates the TMP_PRESENT scripting define symbol and TablePro will automatically use it to render it's text.
     
  14. kaplica

    kaplica

    Joined:
    Feb 20, 2014
    Posts:
    87
    Yeah.. That didn't help :( What would be the best option now? Could you pm me the latest one?
     
  15. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    It appears perhaps you don't have private conversations enabled for your forum user? Please send me a PM.
     
  16. alex_ago_it

    alex_ago_it

    Joined:
    Jun 28, 2016
    Posts:
    3
    I'm using Table Pro v1.21 on Unity 2017.2.0f3 with Unity Text. I have a random flickering on the table even when there is no scrolling. I tried setting Row Animation Duration to 0 but it makes no difference. Is this a known behaviour ? Can I do anything to avoid the artifact ?
     
  17. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Nope, not a none issue. Do the included sample scenes flicker for you?
     
  18. alex_ago_it

    alex_ago_it

    Joined:
    Jun 28, 2016
    Posts:
    3
    With the DataTable example I see some rare flickering
     
  19. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Perfect.. ok, testing. I'll report back (hopefully) soon.
     
  20. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Can you describe what you are doing to see the flickering? I spent 10 minutes playing with the DataTables scene and I'm not seeing any issues. You are seeing it flicker when it's just sitting still (no scrolling)?
     
  21. alex_ago_it

    alex_ago_it

    Joined:
    Jun 28, 2016
    Posts:
    3
    Yes, on my configuration I see a little rare flickering just sitting still. If you haven't the same than it's my configuration fault, I will try on a different PC with different unity version
     
  22. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Ok. Sorry about this and thanks for being willing to work with us here.
    Definitely let us know if you see the issue persist across systems as I'm happy to support this however I can.
     
  23. unity_E6C76QCz9SVV2w

    unity_E6C76QCz9SVV2w

    Joined:
    Nov 6, 2017
    Posts:
    13
    Hy, I am new to Your sls Table so for now I am using Your Simple Table for training and have a question:
    how do I color the selected column The same way as selected row gets colored but with a different color, but at the same time. I need both the selected row and selected column to be colored, but with different colors.
     
    Last edited: Nov 6, 2017
  24. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    We don't technically support column-mode selection like you are describing... BUT... you can hack it to achieve the effect you want with something like this:

    Code (csharp):
    1.  
    2.     private void OnTableSelected(Datum datum, Column column) {
    3.       string cidx = "N/A";
    4.       if(column != null) {
    5.         cidx = column.idx.ToString();
    6.         for (int i = 0; i < this.table.data.Count; i++) {
    7.           for (int j = 0; j < this.table.columns.Count; j++) {
    8.             if (j == column.idx)
    9.               this.table.data[i].elements[j].backgroundColor = Color.green;
    10.             else
    11.               this.table.data[i].elements[j].backgroundColor = null;
    12.           }
    13.         }
    14.       }
    15.       if(datum != null)
    16.         print("You Clicked: " + datum.uid + " Column: " + cidx);
    17.       else
    18.         print("Selection Cleared!");
    19.     }
    20.  
     
  25. Karthik_Muthiah

    Karthik_Muthiah

    Joined:
    Sep 18, 2016
    Posts:
    6
    @slumtrimpet: I have the similar issue. I just got the Table Pro 1.22. The demo scene works fine. The scene I had created it shows my data but the whole table keeps blinking. I already reported this issue in your website. Please help me asap as I am fighting against time.
     
  26. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Can you PM me a project with a reproducible case? Happy to look at this ASAP but we've never been able to reproduce this on our side.
     
  27. Karthik_Muthiah

    Karthik_Muthiah

    Joined:
    Sep 18, 2016
    Posts:
    6
    @slumtrimpet Thank you for the response. When I tried to create the Unity package to send it to you, I actually find the solution. I used StartCoroutine to collect the web data. Then create the data list and then pass it to table. When I called the web data directly without StartCoroutine, the blinking issue disappeared. I am not sure this was the real issue. It may be some thing todo with Unity rather than Table Pro. I really appreciate your support and Table Pro works great. You guys are awesome.
     
  28. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Excellent! Thanks for seeing that through and good luck to you!
     
  29. mar108

    mar108

    Joined:
    Feb 18, 2016
    Posts:
    2
    Hi @slumtrimpet , we're looking at Table Pro for an app of ours but need to check off a few requirements first to see if they're supported or if you know of ways that we could achieve the below ourselves using the code base.

    - From reading above, resizing of widths/heights by user is not currently available. Is it planned to be?
    - From using the demo, there is a fixed header. Can we also have a fixed column? Both at the same time?
    - Is it possible to fix multiple columns or rows (e.g. first two headers or first two columns)?
    - Is it possible for the user to rearrange columns? (i.e. click and hold on a header and drag it from one position to another)
    - In one table, we'll get a data with numerous headers (i.e. 50+ column headers). We want to let the user right-click to display a popup with the lists of columns, letting them check a box to show or hide a column. We will obviously build that popup but would the table support a way to do this?

    Thank you for the help!
     
  30. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Well... I wish I had better news, but the only thing we officially support is your last request about the popup trigger (and probably the option to re-arrange columns but that would be leveraging the same trigger logic to instead flow into your own logic that emulates that effect and then re-draws the table).

    Looking over your list there, we unfortunately aren't a good fit for your requirements.
     
  31. mar108

    mar108

    Joined:
    Feb 18, 2016
    Posts:
    2
    Thank you for the quick response and help!
     
  32. Kirch21

    Kirch21

    Joined:
    Sep 28, 2017
    Posts:
    8
    Hello! I have Table Selection UI Mode set to multi-row, but I was wonder how you actually select multiple rows? Couldn't find any info in the documentation. Also, it would be awesome if each row could have a checkbox in it for selection. Any hints how I could modify the code to do that? Thanks for the great asset.
     
  33. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    It's just ctrl+click to select multiples. The rows themselves will highlight to show the selection state, but you could also setup an image column (look at the "kitchensink.cs' example for that) and have a checked and non-checked image that you update in and out of a cell to show the state. It would be a bit of a hack, but the results would be pretty solid.

    Thanks for trying TablePro! :)
     
  34. Kirch21

    Kirch21

    Joined:
    Sep 28, 2017
    Posts:
    8
    Thats a great idea for the check box thanks! Also, ctrl+click was the first think I tried and it still seems like its in single row selection mode, any ideas what else may be causing this?
     
  35. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Poop... you are right. Sorry about that. It's SHIFT + click to multi-select.

    I don't really like that much though since that's non-standard... I just submitted a patch build to Unity that will make the multi-select key configurable in our editor so you can pick CTRL if you want to. (It will take a few days for Unity to accept the update so stay tuned)

    Sorry for the mixup there.
     
  36. Kirch21

    Kirch21

    Joined:
    Sep 28, 2017
    Posts:
    8
    That works! I swear I tried that I think I am going crazy. Thanks for the quick responses I appreciate it.
     
  37. ISM3DVS

    ISM3DVS

    Joined:
    Feb 5, 2014
    Posts:
    10
    Hello slumtrimpet,

    I am working on a project where we are using the Table Pro asset, and a CurvedUI asset. I'm loading the data properly, however the table does not curve to the CurvedUI's canvas. Do you have any idea as to why it doesn't curve with it?

    Thanks!
     
  38. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Hello, thanks for using TablePro. No.... unfortunately we have no experience with CurvedUI canvas. Are you using a 3rd party asset, yes?
     
  39. ISM3DVS

    ISM3DVS

    Joined:
    Feb 5, 2014
    Posts:
    10
    Yes,

    This is the asset here: https://assetstore.unity.com/packag...ready-solution-to-bend-warp-your-canvas-53258

    I am placing the Table script onto the curved UI asset. It curves all base UI objects perfectly such as scroll views. So I figured that Table Pro would just render to the canvas just fine, however it just renders in world space flat. If you click on the CurvedUI object the table will snap onto the curved surface but is not rendered properly.

    Any help you could provide would be very much appreciated. This is sort of a must have for this project.

    Thanks!
     
  40. AshleyBates

    AshleyBates

    Joined:
    Feb 24, 2017
    Posts:
    15
    Hi,

    I am looking for a way to restrict the input field to a content type (in this case Decimal Numbers) is there any easy way built in to do this?

    Thank You.
     
  41. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    We don't have access to that asset, sorry not much we can do on this one.
     
  42. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    The table.inputCell.inputField object will be a normal instance of either a TextMeshPro InputField or a vanilla Unity UI InputField. You can setup event handlers and advanced controls on that however you wish. Only complication there is that this UI element is reused for all columns where you have input cells so you'd also need to overload the column selection functionality to setup the focused input cell's attributes on a column by column basis.

    So long story short... it's definitely possible, but it's not supported 'out of the box' really.
     
  43. gududexiaohai

    gududexiaohai

    Joined:
    Dec 27, 2016
    Posts:
    10
    Hello, I am the user of TablePro. Can I select data as columns, like as rows?

    Thank you very much.
     
  44. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Cell and row selection is supported. Column headers can also be clicked to fire an event. We don't support a UI effect to 'select' a column in that way, but otherwise, yes you can easily detect when a column is selected (by capturing the cell or header click).
     
  45. gududexiaohai

    gududexiaohai

    Joined:
    Dec 27, 2016
    Posts:
    10
    Does this asset support highlight the selected data as columns? What should I do to make it?
    Thank you very much.
     
  46. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    No, it does not support highlighting the column.
     
  47. Lemon_Trui

    Lemon_Trui

    Joined:
    Nov 15, 2017
    Posts:
    1
    Hi,
    I am a user of Table Pro,
    I find that if the height of table containner ui gameobject, like a panel, is more than the height of all of table data rows height, the last row`s height turn out to be more than the others. I want they to be the height.
    Another question, I find row border line setting and header border line setting, but no table border line setting. Is this porperty setting build in? Or I should do it myself, like use backgroud image.
    Thank you.
    And sorry for my English.
     
  48. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    Regarding your first question, so you've got a tablepro table and not enough rows to fill the RectTransform that contains it? The focus of tablepro is allowing you to scroll and interact with large numbers of rows of data, we don't support dynamically 'stretching' a minimal set of rows to fill a single screen (if you think about that... it doesn't make a lot of sense... what would we do in that case when there is just one row?). You could calculate the number or rows divided by the height of your containing rect and set that to tablepro row height attribute BEFORE you call the startup methods on tablepro however. That would give you the same net result but we won't code for that in the product itself as there isn't a generic solution there that would be desirable for everyone.

    Regarding table border, yes the intention is that your containing borders is designed/controlled by your containing UI so wrap the tablepro rect in whatever border image you wish.
     
  49. ISM3DVS

    ISM3DVS

    Joined:
    Feb 5, 2014
    Posts:
    10
    The issue seems to be with the Table Pro asset though. Curved UI is working properly with all other UI elements in Unity. So any help would be greatly appreciated. I tried to have the table reset and re-render after the curve is applied but it doesn't really help. If you could give insight into how you are rendering the information to the UI element maybe it would give a better idea of a solution.

    Thanks.
     
  50. slumtrimpet

    slumtrimpet

    Joined:
    Mar 18, 2014
    Posts:
    278
    You've got full source code. I'm not really sure what you are looking for me to answer here. Our asset isn't working with a third party asset that we don't have access to. I'm not sure how we can support that. PM me your invoice number if you'd just like a refund, this is outside of the scope of anything we have cycles to support.