Treeview populated with undefined values when AutoGenerateColums is false

4 posts, 0 answers
  1. Tomislav
    Tomislav avatar
    10 posts
    Member since:
    Jan 2014

    Posted 03 Dec 2014 Link to this post


    i have undefined values when i try to define my own columns, when AutoGenerateColumns = "true" it works fine.

    <telerik:RadGantt ID="RadGantt1" runat="server" SelectedView="MonthView" Skin="Silk"  ReadOnly="true" AutoGenerateColumns="false" ListWidth="351px" DataSourceID="TaskSource" DependenciesDataSourceID="DependenciesSource" >
                <YearView UserSelectable="true" />
                <DayView UserSelectable="false" />
                    <telerik:GanttBoundColumn DataField="Naziv" DataType="String" Width="120px" AllowEdit="true"></telerik:GanttBoundColumn>
                    <telerik:GanttBoundColumn DataField="DatumOd" DataType="DateTime"  Width="40px" ></telerik:GanttBoundColumn>
                    <telerik:GanttBoundColumn DataField="DatumDo" DataType="DateTime"  Width="40px" ></telerik:GanttBoundColumn>
                        StartField="DatumOd" EndField="DatumDo"
                        ParentIdField="Dependence" SummaryField="Summary"
                        PercentCompleteField="PercentComplete"  />
                        TypeField="Type" />
                <Localization HeaderMonth="<%$ GetString: 24_Py_Mjesec %>" HeaderWeek="<%$ GetString: 00_Pub_Week %>" />

        <asp:SqlDataSource runat="server" ID="TaskSource" ConnectionString="<%$ ConnectionStrings: HrNet.Core.SqlServer %>" SelectCommandType="StoredProcedure" SelectCommand="gorGanttPregled" ProviderName="System.Data.SqlClient">

        <asp:SqlDataSource runat="server" ID="DependenciesSource" ConnectionString="<%$ ConnectionStrings: HrNet.Core.SqlServer %>" SelectCommandType="StoredProcedure" SelectCommand="gorGanttDependanciesPregled" ProviderName="System.Data.SqlClient">
  2. Bozhidar
    Bozhidar avatar
    1102 posts

    Posted 05 Dec 2014 Link to this post


    I've attached a small sample page demonstrating the Manually defined columns working accordingly. You can test it on your end to verify the functionality. 

    I also noticed that in your sample you are using a stored procedure to load the tasks and dependencies. If this is the source of the issue, could you modify the sample so that it uses a stored procedure similar to yours and send it back to us, so that we can test it locally?

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sypher
    Sypher avatar
    79 posts
    Member since:
    Aug 2006

    Posted 06 Aug 2015 Link to this post

    I'm seeing the same issue, also using a stored procedure. Using 2014.2.274.45 in Visual Studio 2015. If I use AutoGenerateColumns="true", the columns populate. If I set that to false and choose columns to show just like Tomislav did, the columns just show "undefined" as the value. Attached is a screenshot of the gantt chart pulling in data from our database via a stored procedure. I tried editing the sample project from Bozhidar, but I couldn't get the sample database file to connect with the SqlDataSource after I upgraded it to work in VS 2015.

  5. Sypher
    Sypher avatar
    79 posts
    Member since:
    Aug 2006

    Posted 06 Aug 2015 in reply to Sypher Link to this post

    After upgrading to the latest version (2015.2.729.45) , I noticed a few changes:

    • The columns no longer show "undefined". They just show blanks.
    • Turning AutoGenerateColumns="true" now shows both the generated columns and the declared columns.
    • Changing my DataFields to use the gantt chart's field names instead of my column names fixes the issue!

    So, for the DataField="Naziv" in Tomislav's example, it should instead be DataField="Title"!

    That makes no sense to me, as I would expect the DataField names to come from my data source just like they do in every other ASP.NET AJAX control, but now that I know what's going on, I can work around it.

Back to Top