This is a migrated thread and some comments may be shown as answers.

Bind columns to different tables in a dataset

1 Answer 163 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Karthik
Top achievements
Rank 1
Karthik asked on 18 May 2007, 02:49 PM
Hi,

Great tool.

I have a dataset that contains multiple tables. I want to display the data in the grid view with each column possibly referring to data in different table in the dataset. Appreciate if you let me know how I can do this?

I have the xml representation of the dataset below. I would like to display the grid view with eachrow as follows

WinServNo, ServiceName, CultureID, DisplayName, Description, Created Date, Startuptype


<?xml version="1.0" standalone="yes"?>  
<root> 
  <ws> 
    <WinServNo>3</WinServNo> 
    <ServiceName>aec</ServiceName> 
    <wst> 
      <CultureId>1033</CultureId> 
      <DisplayName>Microsoft Kernel Acoustic Echo Canceller</DisplayName> 
      <Description /> 
      <dws> 
        <DeviceNo>22</DeviceNo> 
        <StartupType>3</StartupType> 
        <CreateDate>2007-04-27T04:21:00</CreateDate> 
      </dws> 
    </wst> 
  </ws> 
  <ws> 
    <WinServNo>4</WinServNo> 
    <ServiceName>AeLookupSvc</ServiceName> 
    <wst> 
      <CultureId>1033</CultureId> 
      <DisplayName>Application Experience Lookup Service</DisplayName> 
      <Description>Processes application compatibility lookup requests for applications as they are launched.</Description> 
      <dws> 
        <DeviceNo>22</DeviceNo> 
        <StartupType>2</StartupType> 
        <CreateDate>2007-04-27T04:21:00</CreateDate> 
      </dws> 
    </wst> 
  </ws> 
  </root> 

Thanks,
Karthik

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 18 May 2007, 03:56 PM
Hello Karthik,

First you should create a DataTable with the needed columns (WinServNo, ServiceName, CultureID, DisplayName, Description, Created Date, Startuptype) and populate it with data from your dataset. After that set the DataSource property to reference the created table.
I hope this helps.

 
Sincerely yours,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Karthik
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or