We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hierarcy Grid with Unobtrusive support

Thread ID:

Created:

Updated:

Platform:

Replies:

117905 Jan 7,2015 02:04 PM UTC Jan 12,2015 11:55 AM UTC ASP.NET MVC 6
loading
Tags: Grid
Andrea Perazzolo
Asked On January 7, 2015 02:04 PM UTC

Hi,
like the the Thread 117825 where I had the same problem with the TreeGrid, I am trying to load a Hierarchy Grid with Local DataSource, instead the Remote as specified on all the Examples.
If I disable the Unobtrusive Support the data loads correctly, but when I try to enable the Unobtrusive mode, the grid fills with many empty rows like teh TreeGrid, and when I try to expand one there is a Javascript error on Querying the Data.
I tried the same workaround you have given me in the other post, changing the object from TreeGrid to Grid, But it doesn't work.

I am not able to enable or disable the unobtrusive support only for a single page, but It works only if set in the Web.Config file.
There is another way? Maybe on some pages I could get rid of that behavior if I don't need the Ajax page load.

    Thanks in advance

    Andrea Perazzolo

Alan Sangeeth S [Syncfusion]
Replied On January 8, 2015 05:24 AM UTC

Hi Andrea,

We considered this requirement “Heirarchy Grid with unobtrusive support” as bug and a support incident 133747 has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Regards,
Alan Sangeeth S

Andrea Perazzolo
Replied On January 8, 2015 08:04 AM UTC

Hi,
Could you please provide a workaround for the issue?
For now I can use the unobtrusive support set to false for developing this particular page, but other pages won't work anymore (in particular one with Ajax Load of a TreeView).
On other hand, there is a way to enable unobtrusive support only on some pages setting the default to false?
I tried settin the Flag on a page level

as this
Html.EnableUnobtrusiveJavaScript(true);

but the page does not render correctly.

Another this I am experiencing in the Grid  is this:
On a grid Like this:
@(Html.EJ().Grid<ProjectMacroAreaViewModel>("MacroAreas")
      .Datasource((IEnumerable<object>)Model.MacroAreas)
      .AllowPaging()
      .EditSettings(es => es.AllowEditing(true))
      .Columns(col =>
          {
              col.Field("IdProjectMacroArea").IsPrimaryKey(true).HeaderText("Macro Area").Visible(false).Add();
              col.Field("MacroAreaName").HeaderText("Macro Area").Add();
          }
 
         )
         .ChildGrid(child =>
         {
             child.Datasource((IEnumerable<object>) Model.Tasks)
                 .QueryString("IdProjectMacroArea")
                 .AllowPaging()
                 .EditSettings(edit => { edit.AllowDeleting().AllowEditing(); })
                 .ToolbarSettings(ts => ts.ShowToolbar().ToolbarItems(ti =>
                 {
                     ti.AddTool(ToolBarItems.Edit);
                     ti.AddTool(ToolBarItems.Delete);
                     ti.AddTool(ToolBarItems.Update);
                     ti.AddTool(ToolBarItems.Cancel);
                 }))
                 .Columns(col =>
                 {
                     col.Field("IdProjectTask").Visible(false).IsPrimaryKey(true).Add();
                     col.Field("IdProjectMacroArea").Visible(false).Add();
                     col.Field("TaskName").Width("200px").Add();
                     col.Field("Units").HeaderText("Units").Width("80px").TextAlign(TextAlign.Center).Add();
                     col.Field("TaskCode").Width("80px").Add();
                     col.Field("StartDate").HeaderText("Start Date").Format("{0:dd/MM/yyyy}").Width("90px").Add();
                     col.Field("EndDate").HeaderText("End Date").Format("{0:dd/MM/yyyy}").Width("90px").Add();
                 })
             .ChildGrid(fte =>
             {
                 fte.Datasource((IEnumerable<object>)Model.Ftes)
                     .QueryString("IdProjectTask")
                     .Columns(col =>
                     {
                         col.Field("IdProjectTaskFte").Visible(false).Add();
                         col.Field("Country").HeaderText("Country").Add();
                         col.Field("Role").HeaderText("Role").Add();
                         col.Field("Hours").HeaderText("Hours x Unit").Add();
                     });
             });
 
         })
)
when I double click on the first level there is a javascript error:

Riga: 10
Errore: Impossibile recuperare la proprietà 'field' di un riferimento nullo o non definito

and on the other levels:
Riga: 10
Errore: Impossibile impostare la proprietà 'colSpan' di un riferimento nullo o non definito

This error is given even when I push the edit button on the toolbar.
It seems to work on the second level only on the first set of records

After some tries I noticed that the second error is present when the AllowEditing is set to false on one level for example the third.
The error on the first level I am not able to resolve.

    Thanks in advance

    Andrea Perazzolo



Andrea Perazzolo
Replied On January 8, 2015 08:30 AM UTC

Hi, I use this thread for another problem without opening a new one.
On the first and second level of the Grid, when I start Edit Mode on a Record, the Edit controls are not alignedwith the columns of the Sub Grids.
The Shift seems to be of the Size of the Expander column that is present  on the first two levels.

    Thanks in advance

    Andrea Perazzolo

Alan Sangeeth S [Syncfusion]
Replied On January 9, 2015 11:02 AM UTC

Hi Andrea,

Query 1: “workaround for the issue

We would like to let you know that it is not feasible to provide workaround for this issue and we could not disable “UnObtrusive Javascript” for our Grid Control alone since in our current implementation the “UnObtrusiveJavascriptEnabled” in appSettings of Web.config file enables/disables UnObtrusive mode in all JS controls in the throughout application.

Query 2: “Script error throws and misalignment occurs while editing records”

We are able to reproduce this issue and we have logged defect report for this issue. We have provided defect information in the incident: 133747 and please follow up with incident for defect details.

Please let us know if you have any queries.

Regards,
Alan Sangeeth S



Andrea Perazzolo
Replied On January 9, 2015 11:13 AM UTC

Hi Andrea,

Query 1: “workaround for the issue

We would like to let you know that it is not feasible to provide workaround for this issue and we could not disable “UnObtrusive Javascript” for our Grid Control alone since in our current implementation the “UnObtrusiveJavascriptEnabled” in appSettings of Web.config file enables/disables UnObtrusive mode in all JS controls in the throughout application.

Query 2: “Script error throws and misalignment occurs while editing records”

We are able to reproduce this issue and we have logged defect report for this issue. We have provided defect information in the incident: 133747 and please follow up with incident for defect details.

Please let us know if you have any queries.

Regards,
Alan Sangeeth S



Hi,
Is it feasible to have a patch before that date?
I am in strict time in developing the application, otherwise I need to follow another way without the Hierarchy grid.
I have a page that works only with Unobtrusive Enabled and one only without.
For the same issue in the TreeGrid You have provided me a script that changed the prototype ofr working with unobtrusive data.

    Thanks in advance

   Andrea Perazzolo

Alan Sangeeth S [Syncfusion]
Replied On January 12, 2015 11:55 AM UTC

Hi Andrea,

Thanks for the update.

Please follow-up with the incident: 133747 for details regarding patch for issue “Heirarchy Grid with unobtrusive support

Regards,
Alan Sangeeth S



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;