|
<% @ Control Language="vb" AutoEventWireup="false" CodeBehind="ReportCriteria.ascx.vb" Inherits="xxx.ReportCriteria" %>
<% @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadFilter runat="server" ID="RadFilter1" |
| OnApplyExpressions="RadFilter1_ApplyExpressions"> |
| <FieldEditors> |
| <telerik:RadFilterBooleanFieldEditor FieldName="Some Bool" /> |
| <telerik:RadFilterTextFieldEditor FieldName="Some Text" /> |
| </FieldEditors> |
| </telerik:RadFilter> |
| Imports Telerik.Web.UI |
| Partial Public Class ReportCriteria |
| Inherits System.Web.UI.UserControl |
| Protected Sub RadFilter1_ApplyExpressions(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadFilterApplyExpressionsEventArgs) |
| Dim provider As New RadFilterSqlQueryProvider() |
| provider.ProcessGroup(e.ExpressionRoot) |
| ltlDebug.Text = provider.Result |
| End Sub |
| End Class |
|
| <telerik:GridDropDownColumn DataField="Continent.Id" HeaderText="Continente" DataSourceID="odsContinent" ListTextField="Name" ListValueField="Id" UniqueName="Continent" SortExpression="Continent" /> |
| <asp:ObjectDataSource ID="odsCountry" runat="server" |
| TypeName="Highland.Models.Country" |
| EnablePaging="true" |
| SelectMethod="SlicedFindAll" |
| SelectCountMethod="Count" |
| OldValuesParameterFormatString="{0}" |
| InsertMethod="GridInsert" DeleteMethod="GridDelete" UpdateMethod="GridUpdate" |
| StartRowIndexParameterName="firstResult" |
| MaximumRowsParameterName="maxResults" > |
| <DeleteParameters> |
| <asp:Parameter Name="Id" Type="Int32" /> |
| </DeleteParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="Id" Type="Int32" /> |
| <asp:Parameter Name="Alias" Type="String" /> |
| <asp:Parameter Name="Fullname" Type="String" /> |
| <asp:Parameter Name="Capital" Type="String" /> |
| <asp:Parameter Name="Continent" Type="String" /> |
| <asp:Parameter Name="ThreeDigitCountryCode" Type="Int32" /> |
| <asp:Parameter Name="ThreeLetterCountryCode" Type="String" /> |
| <asp:Parameter Name="TwoLetterCountryCode" Type="String" /> |
| </UpdateParameters> |
| <InsertParameters> |
| <asp:Parameter Name="Id" Type="Int32" /> |
| </InsertParameters> |
| </asp:ObjectDataSource> |
Posted on 13 minutes ago
i have two situations as I listed earlier:| private void ShowDialog() |
| { |
| // define the name and type of the client scripts on the page |
| string csname = "showDialog"; |
| // get a clientscriptmanager reerence from the page class |
| ClientScriptManager cs = Page.ClientScript; |
| // check to see if the startup script is already registered |
| if (!cs.IsStartupScriptRegistered(csname)) |
| { |
| string script = @" |
| <script language='javascript'> |
| function showDialog(){ |
| var oWnd = $find('" + MyDialogRadWindow.ClientID + @"'); |
| oWnd.show(); |
| Sys.Application.remove_load(showDialog); |
| }; |
| Sys.Application.add_load(showDialog); |
| </script>"; |
| cs.RegisterStartupScript(typeof(string), csname, script); |
| } |
| } |
| private void HideDialog() |
| { |
| string csname = "hideDialog"; |
| // get a clientscriptmanager reerence from the page class |
| ClientScriptManager cs = Page.ClientScript; |
| // check to see if the startup script is already registered |
| if (!cs.IsStartupScriptRegistered(csname)) |
| { |
| string script = @" |
| <script language='javascript'> |
| function hideDialog(){ |
| var oWnd = $find('" + MyDialogRadWindow.ClientID + @"'); |
| oWnd.Close(); |
| Sys.Application.remove_load(hideDialog); |
| }; |
| Sys.Application.add_load(hideDialog); |
| </script>"; |
| cs.RegisterStartupScript(typeof(string), csname, script); |
| } |
| } |

<telerik:GridBoundColumn HeaderText="<%$ Resources:Common, Load %>" DataField="LoadNo"
UniqueName="LoadNo" SortExpression="LoadNo" HeaderStyle-Width="30px" />
function
updateMCTGrid(result) {
try {
ShowHideLoadingPanel(
'Hide', MCTransferGrid.ClientID);
MCTransferGrid.get_masterTableView().set_dataSource(result.Data);
MCTransferGrid.get_masterTableView().dataBind();
MCTransferGrid.get_masterTableView().set_virtualItemCount(result.Count);
}
catch (e) {
ShowHideLoadingPanel(
'Hide', MCTransferGrid.ClientID);
}
}
| <telerik:RadGrid ID="GridView1" AllowSorting="true" runat="server" MasterTableView-GroupLoadMode="Client" GridLines="None" AutoGenerateColumns="False" Skin="Office2007" Width=100%> |
| <groupingsettings casesensitive="False" /> |
| <MasterTableView GroupsDefaultExpanded="false"> |
| <GroupByExpressions> |
| <telerik:GridGroupByExpression> |
| <SelectFields> |
| <telerik:GridGroupByField FieldAlias="Category" FieldName="Category" HeaderValueSeparator=" " HeaderText=" <b>Available : </b>" FormatString="" ></telerik:GridGroupByField> |
| </SelectFields> |
| <GroupByFields> |
| <telerik:GridGroupByField FieldAlias="Category" FieldName="Category" FormatString="" SortOrder="None" HeaderText=""></telerik:GridGroupByField> |
| </GroupByFields> |
| </telerik:GridGroupByExpression> |
| </GroupByExpressions> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px" /> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn > |
| <HeaderStyle Width="20px" /> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridTemplateColumn UniqueName="TemplateColumn1" HeaderText="<font color=red> Select</font>"> |
| <ItemTemplate> |
| <asp:CheckBox ID="CheckBox1" AutoPostBack="true" runat="server"/> |
| </ItemTemplate> |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn HeaderText="Product" UniqueName="URL"> |
| <ItemTemplate> |
| <a href=<%# Eval("URL") %> target="_blank" ><%# Eval("Product_Name")%></a> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn EmptyDataText="&nbsp;" HeaderText="Product" UniqueName="Product_Name" DataField="Product_Name" Visible=False > |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn EmptyDataText="&nbsp;" HeaderText="Date" UniqueName="Date" DataField="Date"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Resolution" EmptyDataText="&nbsp;" HeaderText="Resolution" |
| UniqueName="Resolution"> |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Percentage_Coverage" EmptyDataText="&nbsp;" |
| HeaderText="% Coverage" UniqueName="Percentage_Coverage"> |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Price" EmptyDataText="&nbsp;" HeaderText="Price ($)" |
| UniqueName="Total_Price"> |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Area" EmptyDataText="&nbsp;" HeaderText="Area" |
| UniqueName="Price" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn UniqueName="ViewScene"> |
| <ItemTemplate> |
| <a href="javascript:openScenePopup('<%# Eval("SubProduct") %>','<%# Eval("AOI") %>','<%# Eval("View_Scene") %>')"><%# Eval("View_Scene") %></a> |
| </ItemTemplate> |
| <ItemStyle HorizontalAlign="Left" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="SubProduct" EmptyDataText="&nbsp;" HeaderText="SubProduct" |
| UniqueName="SubProduct" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Notes" EmptyDataText="&nbsp;" HeaderText="Notes" |
| UniqueName="Notes" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="Category" EmptyDataText="&nbsp;" HeaderText="Category" |
| UniqueName="Category" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn HeaderText="Recommended" UniqueName="Recommended"> |
| <ItemTemplate> |
| <img src=<%# Eval("Recommended")%> width=18 height=18 alt="Recommendation is based on your total Area"> |
| </ItemTemplate> |
| <ItemStyle HorizontalAlign="Center" /> |
| </telerik:GridTemplateColumn> |
| <telerik:GridBoundColumn DataField="EULA" EmptyDataText="&nbsp;" UniqueName="EULA" Visible="False"> |
| </telerik:GridBoundColumn> |
| </Columns> |
| </MasterTableView> |
| <FilterMenu EnableTheming="True" Skin="WebBlue"> |
| <CollapseAnimation Duration="200" Type="OutQuint" /> |
| </FilterMenu> |
| <GroupPanel Text=""> |
| </GroupPanel> |
| </telerik:RadGrid> |
Hi Support,
I've been using the Radgrid component for some time now and have stumble into a problem I can't resolve.
I have a hierarchical grid which I want paging inside the details table. I've used a simple data binding in the server code:
RadGrid2.DataSource = DataTable1;
RadGrid2.MasterTableView.DetailTables[0].DataSource = DataTable2;
And simple relations in the aspx file:
<ParentTableRelation>
<telerik:GridRelationFields
DetailKeyField="IDPerek"
MasterKeyField="IDPerek" />
</ParentTableRelation>
The problem we are facing is that in the details table it seems that we have paging that is not in relation to a level but to the entire data source – so in each level we have the same number of pages although the number of records is different.
In the example below (see file attached) you can see the problem – the number in brackets show the actual number of records in each level:
Note: the characters are in Hebrew and the grid is right to left aligned.
Any help will be appreciated,
Evgeny