I have an interesting problem that I have never had before. I have a radgrid that has it's datasource created in the NeedDataSource method.
What happens is that if I put in the full url (http://localhost:5100/test/default.aspx) then everything works as expected. However if I go to (http://localhost:5100/test/) then it throws an error. Has anyone seen this behavior before.
protected void CompletedLineProductionGoalGrid_NeedDataSource(object sender, EventArgs e)
{
GetDataSource();
List<
LineProductionGoal
> myCompletedGoals = new List<
LineProductionGoal
>();
myCompletedGoals.AddRange(listOfGoals.Where(i => i.StatusID == 5));
CompletedLineProductionGoalGrid.DataSource = myCompletedGoals.OrderBy(i => i.LineName);
}
private void GetDataSource()
{
if (listOfGoals == null)
{
listOfGoals = new LineProductionGoal().SelectAllLineProductionGoalsByUserIDNotDeleted(((User)Session["User"]).UserID);
}
}
<
telerik:RadGrid
ID
=
"CompletedLineProductionGoalGrid"
runat
=
"server"
>
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"LineName"
HeaderText
=
"Line"
UniqueName
=
"LineName"
/>
<
telerik:GridBoundColumn
DataField
=
"TargetUnitCount"
HeaderText
=
"Target"
UniqueName
=
"TargetUnitCount"
/>
<
telerik:GridBoundColumn
DataField
=
"ActualUnitCount"
HeaderText
=
"Actual"
UniqueName
=
"ActualUnitCount"
/>
<
telerik:GridBoundColumn
DataField
=
"SubmittedByName"
HeaderText
=
"Submitter"
UniqueName
=
"SubmittedByName"
/>
<
telerik:GridBoundColumn
DataField
=
"ApprovedByName"
HeaderText
=
"Approver"
UniqueName
=
"ApprovedByName"
/>
<
telerik:GridBoundColumn
DataField
=
"StatusType"
HeaderText
=
"Status"
UniqueName
=
"LineStatusType"
/>
<
telerik:GridDateTimeColumn
DataField
=
"StartDate"
DataFormatString
=
"{0:MM/dd/yyyy}"
HeaderText
=
"Start"
UniqueName
=
"StartDate"
/>
<
telerik:GridDateTimeColumn
DataField
=
"EndDate"
DataFormatString
=
"{0:MM/dd/yyyy}"
HeaderText
=
"End"
UniqueName
=
"EndDate"
/>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
What happens is that if I put in the full url (http://localhost:5100/test/default.aspx) then everything works as expected. However if I go to (http://localhost:5100/test/) then it throws an error. Has anyone seen this behavior before.
8 Answers, 1 is accepted
0
Dave
Top achievements
Rank 1
answered on 28 May 2014, 04:52 PM
any help would be appreciated on this.
0
Hello Joshua,
I am afraid that based on the provided information it would be hard to determine what is causing the issue.
Would you elaborate more on the issue you are experiencing? What is the exact error that you are seeing? Is it observed after you remove the RadGrid control from the page?
Also would you try and set the page as Start Page and see if the behavior would change?
Regards,
Viktor Tachev
Telerik
I am afraid that based on the provided information it would be hard to determine what is causing the issue.
Would you elaborate more on the issue you are experiencing? What is the exact error that you are seeing? Is it observed after you remove the RadGrid control from the page?
Also would you try and set the page as Start Page and see if the behavior would change?
Regards,
Viktor Tachev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Dave
Top achievements
Rank 1
answered on 30 May 2014, 02:06 PM
actually I just mean I literally put a radgrid on a empty page. The example I posted is using a master page but I have also put the grid in the page as a stand alone. I have nothing more than you see. A grid on a page, the datasource bound in the need data source method. If I set IIS7.5 with the default document of default.aspx. Then place the grid on the default.aspx page if I go to the relative path (http://localhost:2200/) and try to go past the first page of the grid then I get an error. however if I go to the absolute path (http://localhost:2200/default.aspx) then it works perfectly. Attached are a couple of screen shots
0
Accepted
Hi Josh,
I tried replicating the behavior you describe, however I was unable to. I made a short video as reference. Using both paths produced the same result on my end and no error was observed.
Would you take a look at the video and let me know if I am missing something?
Regards,
Viktor Tachev
Telerik
I tried replicating the behavior you describe, however I was unable to. I made a short video as reference. Using both paths produced the same result on my end and no error was observed.
Would you take a look at the video and let me know if I am missing something?
Regards,
Viktor Tachev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Dave
Top achievements
Rank 1
answered on 17 Jun 2014, 04:25 PM
Thanks,
You've verified it's on my end now I just need to figure out why it has this behavior.
You've verified it's on my end now I just need to figure out why it has this behavior.
0
Hello Josh,
In order to try and find the cause for the issue would you try couple of things? Please try to disable the compression for the IIS and see if the behavior would change.
Also would you put a regular ASP GridView control on the page and see if the behavior would be observed again?
Regards,
Viktor Tachev
Telerik
In order to try and find the cause for the issue would you try couple of things? Please try to disable the compression for the IIS and see if the behavior would change.
Also would you put a regular ASP GridView control on the page and see if the behavior would be observed again?
Regards,
Viktor Tachev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Dave
Top achievements
Rank 1
answered on 02 Jan 2015, 05:49 PM
The issue has to do with .NET 4 and IIS in integrated mode for the app pool. This clears the default postback page even though this is set in IIS. So best fix is either to switch to Classic mode or to fully qualify pages that are used.
0
Hi Joshua,
Thank you for sharing your experience and the solution with the community.
Regards,
Viktor Tachev
Telerik
Thank you for sharing your experience and the solution with the community.
Regards,
Viktor Tachev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.