Binding Resources to SQL DataTable

Originally Posted 8 May 2017, 5:39 pm EST

  • Originally Posted 8 May 2017, 5:39 pm EST

    I have a SQL datatable named RTable from the following SQL statement:
    "Select EmployeeID,EmployeeName,HourlyBillRate from dbo.EmployeeMaster" How do I bind this data table to the GanttView control so the users see these employees when adding a resource under Task information. I tried:

    C1GantView1.DataStorage.ResourceStorage.Datasource = RTable
    C1GantView1.DataStorage.ResourceStorage.Mappings.ResourceID.MappingName = "EmployeeID"
    C1GantView1.DataStorage.ResourceStorage.Mappings.Name.Mappingname = "EmployeeName"
    C1GantView1.DataStorage.ResourceStorage.Mappings.Cost.MappingName = "HourlyBillRate"

    It compiles OK but no employees show up as Resources under Task Information.
  • Marked as Answer

    Reply

    Hi Victor,

    You can refer to the following Blog article where Data Binding for C1GanttView has been implemented using MS Access database:
    http://our.componentone.com/2015/07/20/data-binding-in-ganttview-for-winforms/

    The same approach can be applied for Sql Server. Let me know in case you still face any issues.

    Thanks,
    Pragati
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels