Forum
Topic RSS
03:57
Hi
I am current evaluating this grid and so far impressed with its capabilities. I have come across an issue whihch I am sure is developer related and not an actual bug.
I need to use th ehierarchy function and have the following defined:
Two data sources - one for the master and one for the detail. Two grids with the hierarchy mode set correctly. When I run the application I get the first grid displayed correctly, I then click the + option and I am expecting to see the second grid appear which it does but it has no data. I have debugged this and have found that the OnDataRequesting call is made to the code behind which is excellent since I can get to the right key to correctly bind my second grid. However what I am finding is that a second call is being made to the service that I have defined in my datasource Tests and this is passing up a value of 0 in the parameters which then negates the binding. I have put my code in below, I searched to see if I was doing something wrong in the datasource and both appear to be correctly configured.
Any help would be appreciated.
Code
<
asp:ObjectDataSource ID="Scenario" runat="server" SelectMethod="ListScenarios"
TypeName
="ServiceDeliveryTestManager.Services.ScenarioService">
</asp:ObjectDataSource
>
<asp:ObjectDataSource ID="Tests" runat="server" SelectMethod="ListTests"
TypeName
="ServiceDeliveryTestManager.Services.ScenarioService">
<SelectParameters
>
<asp:Parameter Name="Id" Type="Int64"
/>
</SelectParameters
>
</asp:ObjectDataSource
>
<cc1:JQGrid ID="JQGrid1" runat="server" DataSourceID="Scenario" Width="100%" Height
="75%">
<DeleteDialogSettings SubmitText="Submit"></DeleteDialogSettings
>
<Columns
>
<cc1:JQGridColumn DataField
="ExecutionDetail">
</cc1:JQGridColumn
>
<cc1:JQGridColumn DataField
="Comment">
</cc1:JQGridColumn
>
<cc1:JQGridColumn DataField
="Priority">
</cc1:JQGridColumn
>
<cc1:JQGridColumn DataField="Id" PrimaryKey
="true">
</cc1:JQGridColumn
>
</Columns
>
<HierarchySettings HierarchyMode="Parent" />
<ClientSideEvents SubGridRowExpanded="showSubGrid2"
/>
</cc1:JQGrid
>
<cc1:JQGrid ID="JQGrid2" runat="server" DataSourceID="Tests" OnDataRequesting
="JQGrid2_DataRequesting">
<Columns
>
<cc1:JQGridColumn DataField="Id" PrimaryKey
="true">
</cc1:JQGridColumn
>
<cc1:JQGridColumn DataField
="ExpectedResult">
</cc1:JQGridColumn>
</Columns
>
<HierarchySettings HierarchyMode="Child"/>
</cc1:JQGrid
>
The code on the ASPX page is as follows
public void JQGrid2_DataRequesting(object sender, JQGridDataRequestEventArgs
e)
{
ScenarioService service=new ScenarioService
();
service.ListTests(
Convert
.ToInt64(e.ParentRowKey));
Most Users Ever Online: 994
Currently Online:
56 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home