Hello
I am a newbie an try to following this video,
to get a first introduction in the Telerik RadControls: KevinBabcock_29.flv
The table name in the database LJT_BCEX (the same for Linq Object, no pluralization like LJT_BCEXs).
Does this cause problems?
I don't get an Error message in Visual Studio, but no data is shown. Here is my webservice:
| [System.Web.Script.Services.ScriptService] |
| public class BroadcastExchangeData : System.Web.Services.WebService |
| { |
| [WebMethod] |
| public Dictionary<string, object> GetBroadcastExchangeAndCount(int startIndex, int rowCount, |
| string sortExpressions, string filterExpressions) |
| { |
| var db = new LJITDataContext(); |
| var sort = !string.IsNullOrEmpty(sortExpressions); |
| var filter = !string.IsNullOrEmpty(filterExpressions); |
| var broadcastExchanges = (from b in db.LJT_BCEX |
| select b).Where(filter ? filterExpressions : "BXID > 0") |
| .OrderBy(sort ? sortExpressions : "BXID ASC"); |
| var count = filter ? broadcastExchanges.Count() : db.LJT_BCEX.Count(); |
| broadcastExchanges = broadcastExchanges.Skip(startIndex).Take(rowCount); |
| var retObj = new Dictionary<string, object> { { "BroadcastExchange", broadcastExchanges }, { "BroadcastExchangeCount", count } }; |
| return retObj; |
| } |
So the service itself seems to be ok. In debug I can see that it's returning the data properly (server side).
Here's the RadGrid Markup Code :
| <telerik:RadGrid ID="rgridMain" runat="server" AutoGenerateColumns="true" HorizontalAlign="Center" |
| AllowAutomaticDeletes="true" Width="98%" HeaderStyle-HorizontalAlign="Center"> |
| <HeaderStyle HorizontalAlign="Center"></HeaderStyle> |
| <ClientSettings EnableRowHoverStyle="true"> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
| <DataBinding CountPropertyName="BroadcastExchangeCount" DataPropertyName="BroadcastExchange" |
| FilterParameterName="filterExpressions" FilterParameterType="Linq" Location="~/Services/BroadcastExchangeData.asmx" |
| MaximumRowsParameterName="rowCount" SelectMethod="GetBroadcastExchangeAndCount" |
| SortParameterName="sortExpressions" SortParameterType="Linq" StartRowIndexParameterName="startIndex"> |
| </DataBinding> |
| <ClientEvents OnRowDblClick="OnRowDblClick" /> |
| </ClientSettings> |
| <MasterTableView EditMode="PopUp" DataKeyNames="BXID"> |
| <Columns> |
| <telerik:GridEditCommandColumn> |
| </telerik:GridEditCommandColumn> |
| <telerik:GridBoundColumn HeaderText="Status" DataField="BXSTAT" /> |
| <telerik:GridBoundColumn HeaderText="Id" DataField="BXID" /> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
If I use Firefox/Firebug, then I can see, that there occurs a "Circular reference" with LJT_BCEX (that's the original class and table name and the name for the Linq Object).
Do I have to rename my Linq Object like Customer -> Customers?