Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Hierarchy Grids with Object Datasource Binding Issue
22/11/2009
03:57
Avatar
Akeel Ahmed
Guest
Guests

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));

22/11/2009
04:23
Avatar
Akeel Ahmed
Guest
Guests

Hi Guys

Ignore this post I realised that there was an issue in the server side code I had for the biding - I was completingly ignoring the fact that I had an obejct data source!!!!  Sorry.

Cheers

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information