Hi all,
I tried to bind data in onDataNeed function of a radgrid with IEnumerable as the code below. Remember DisplayComponent is just a temporary class, not a table that I created to store the results. The ExecuteQuery runs without any trouble. However, I cannot bind the to the radgrid. Anyone knows why?
I tried to bind data in onDataNeed function of a radgrid with IEnumerable as the code below. Remember DisplayComponent is just a temporary class, not a table that I created to store the results. The ExecuteQuery runs without any trouble. However, I cannot bind the to the radgrid. Anyone knows why?
| protected void viewBookings_OnNeedDataSource(...) |
| { |
| string s_query = "select distinct bk.Start, fi.FacilityName, bk.Username " + |
| "from Booking_Form as bk, " + |
| "Facility_Item as fi " + |
| "where bk.FacilityID = fi.ID"; |
| IEnumerable<DisplayComponent> results = data.ExecuteQuery<DisplayComponent>(s_query); |
| viewBookingsGrid.DataSource = results.ToList(); |
| } |
| public class DisplayComponent |
| { |
| public string FacilityName, Username; |
| DateTime Start; |
| public DisplayComponent() |
| { |
| } |
| } |
