What’s new in Google DataTable .NET Wrapper v3.1.0

You may also like...

  • G’day Zoran, this .Net wrapper is awesome. Do you have any C# code examples of the use of the Role column in adding it to a DataTable? I want to implement the alternative tooltips that google offer, but they require the ‘role’ column. If I extract a third colmn of data from my database with the column name ‘tooltip’, how to I link it to the role column in your latest revisions of the wrapper?

    • Hi Fendavo,
      1) Documentation about Google DataTable roles: https://developers.google.com/chart/interactive/docs/roles
      2) In order to use a “role”, you can set it up as follows

      var column1 = new Column(ColumnType.String, “Tiers”);
      var column2 = new Column(ColumnType.Number, “Apps”);
      //here you set the role. ColumnRole is an enum that contains predefined roles.
      column2.Role = ColumnRole.Annotation;

      I hope it helps .

      • Thanks Zoran,
        I read the google notes on roles and I finally solved it on the .aspx side by adding the following line in my JavaScript to set the third column (0,1,2) to have the role of tooltip

        data8.setColumnProperty(2, ‘role’, ‘tooltip’);

        If you are interested I can post the C# code and the datatables and my JavaScript if it helps others.

        I wanted to use your ColumnRole, but I wasn’t sure where to put it, because I am retrieving data using a stored procedure into a C# DataTable then using your wrapper to convert it to json. I was retrieving three columns and the third column contained the tooltip. Everything was falling over until I added the setColumnProperty to tell the json that the third column was the role of tooltip.

        I love your .Net Wrapper!

        Thanks again

        • Hi Fendavo,
          I am glad that you sorted out your problem.
          On codeplex where the code for the .Net wrapper is hosted I have a test project, so It would be good updating it with your code, as to be honest I only covered the simplest examples there.
          So, yes, please send me the code you think is useful and I will integrate it to the test project.

          Best Regards,

  • Do you have any code examples in c# showing how you implement the ‘role’ column and add it to the data table. I want to use the alternative tooltips tha Google discuss.

    • Oops sorry for double up. IPad too slow!

  • informative blog

gilchrest@mailxu.com bonmariko@mailxu.com