Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
237 views
We have a simple RadGrid on a page (static column widths) which is inside a div defined with a min-width of 1000px.  If a user opens their browser and the window is less than 1000px and then resizes the window, the grid will be fixed width and won't resize.  If the window is bigger than 1000px, the grid resizes with the window.

The problem exists in both IE and FF.  Looking at the source with IE, the style on the grid says width:100%.  If I look at it with FireFox, the RadGrid shows a fixed width (style="width:1067px").  If its bigger than 1000px, it shows as dynamic (style="width:100%").  What property controls this?  What is the proper way to fix it?
Pavlina
Telerik team
 answered on 12 Aug 2011
1 answer
161 views
Hi

In our product we are using jQuery ajax to load the aspx pages asynchronously.  When we try to load the page which contains Rad Editor thinks are not going correct as it need to be.

Let me explain in detail what exactly is happening. We have a Editor.aspx page which contain Rad Editor our goal is to call this page using jQuery Ajax and by using Editor Client-side API we will read html contain from Editor and populate html contain to Editor. When we load the Editor.aspx page Editor render properly in UI but none of the functionality is working at all.

Here I am able to simulate the scenario using an sample ASP.Net 4.0 Web Project

In Editor.aspx page

<form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
        <telerik:RadEditor runat = "server" ></telerik:RadEditor>
    </div>
</form>

The page from where we are calling the Editor.aspx page

<script type="text/javascript">
 
        $(document).ready(function () {
           
            $("#success").load("Editor.aspx", function (response, status, xhr) {
                if (status == "error") {
                    var msg = "Sorry but there was an error: ";
                    $("#error").html(msg + xhr.status + " " + xhr.statusText);
                }
            });
 
        });
         
  </script>

due to Attachment restriction i am unable to provide the sample project. If the sample project needed, please let me know so i can able to send it by mail.

Waiting for your replay :) thanks,

Prabhudatta
BrandSystems



Rumen
Telerik team
 answered on 12 Aug 2011
3 answers
66 views

Hello,

We have certain problem by RadGrid filter. We need to bind data using DataTable class. We have prepared data for RadGrid by combination of data from database with computed data. Therefore,the SqlDataSource is not useful for us. We have found example regarding mentioned scenario in your forum. The example uses ItemCreated event, but it doesn’t work. Data is binding correctly, however the filtering doesn’t work.

We consider the solution based on DataTable (stored in a session) shared by controls inherited from a GridTemplateColumn. However, this approach seems to be complicated for described aim which appears to be trivial.

So, is there any way to accomplish the DataTable binding as a data source for the RadGrid without harm the filtering?


Thank yout very much for your advice.

<telerik:RadGrid ID="RadGridData" runat="server" Width="100%" AutoGenerateColumns="false"

    AllowPaging="true" PageSize="10" ShowGroupPanel="false" ShowFooter="true" AllowFilteringByColumn="true"

    OnPreRender="RadGridData_PreRender" AllowSorting="true" AllowMultiRowSelection="false"

    GridLines="None" EnableAjaxSkinRendering="true" EnableAJAX="true"

    onneeddatasource="RadGridData_NeedDataSource" OnItemCreated="RadGridData_ItemCreated" ViewStateMode="Disabled">

    <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" />

    <MasterTableView AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True"

        ShowFooter="True" TableLayout="Auto" DataKeyNames="Id" CommandItemDisplay="Top">

        <CommandItemSettings ShowRefreshButton="false" ShowAddNewRecordButton="false" ShowExportToWordButton="true" ShowExportToExcelButton="true"

                ShowExportToCsvButton="true" />

        <Columns>

            <telerik:GridBoundColumn UniqueName="Caption" DataField="Caption" HeaderText="Caption"

                AllowFiltering="true" DataType="System.String">

                <HeaderStyle Width="25%" />

                <FilterTemplate>

                    <telerik:RadComboBox ID="RadComboBoxCaption" DataTextField="Caption" DataValueField="Caption" Height="200px" AppendDataBoundItems="true"

                        SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Caption").CurrentFilterValue %>'

                        runat="server" OnClientSelectedIndexChanged="CaptionChanged">

                        <Items>

                            <telerik:RadComboBoxItem Text="All" />

                        </Items>

                    </telerik:RadComboBox>

                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

                        <script type="text/javascript">

                            function CaptionChanged(sender, args) {

                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");

                                tableView.filter("Caption", args.get_item().get_value(), "EqualTo");

                            }

                        </script>

                    </telerik:RadScriptBlock>

                </FilterTemplate>

            </telerik:GridBoundColumn>

            <telerik:GridDateTimeColumn DataField="DateTime" HeaderText="RTU Date and time" SortExpression="DateTime"

                UniqueName="DateTime" PickerType="DateTimePicker" AllowFiltering="false">

                <HeaderStyle Width="25%" />

            </telerik:GridDateTimeColumn>

            <telerik:GridBoundColumn UniqueName="FormatedValue" DataField="FormatedValue" HeaderText="Value"

                AllowFiltering="true" DataType="System.String">

                <HeaderStyle Width="25%" />

            </telerik:GridBoundColumn>

            <telerik:GridBoundColumn UniqueName="State" DataField="State" HeaderText="State"

                AllowFiltering="true" DataType="System.String">

                <HeaderStyle Width="25%" />

            </telerik:GridBoundColumn>

        </Columns>

        <PagerStyle Mode="NextPrevAndNumeric" />

    </MasterTableView>

</telerik:RadGrid>

    protected void RadGridData_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)

        {

            if (e.Item is GridFilteringItem)

            {

                GridFilteringItem filterItem = (GridFilteringItem)e.Item;

                RadComboBox combo = (RadComboBox)filterItem["Caption"].FindControl("RadComboBoxCaption");

                combo.DataSource = dataTable; // this datatable is also used for binding data for table

                combo.DataBind();

                combo.AutoPostBack = true;

            }

        }

Pavlina
Telerik team
 answered on 12 Aug 2011
2 answers
457 views
I have Master grid when i selected row based on selcted row i have display more than two rad grids based on selected row for these rad grid i have add ,edit delete when i click add link it is oen rad window addd adding record and page reload but i dont want to reload page i want refresh which grid is i added recoed for that i have use following code

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
            </telerik:AjaxSetting>
      <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdFiles">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdFiles" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdResource">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdResource" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdMessages">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdMessages" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="grdTasks">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdTasks" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

in code behind i wrote like this 

 protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        if (e.Argument == "Rebind")
        {
           
            RadGrid1.MasterTableView.SortExpressions.Clear();
            RadGrid1.MasterTableView.GroupByExpressions.Clear();
            RadGrid1.Rebind();
           grdFiles.MasterTableView.SortExpressions.Clear();
            grdFiles.MasterTableView.GroupByExpressions.Clear();
           grdFiles.Rebind();


            grdResource.MasterTableView.SortExpressions.Clear();
            grdResource.MasterTableView.GroupByExpressions.Clear();
            grdResource.Rebind();


            grdMessages.MasterTableView.SortExpressions.Clear();
            grdMessages.MasterTableView.GroupByExpressions.Clear();
            //grdMessages.Rebind();
           
        }
        else if (e.Argument == "RebindAndNavigate")
        {
                RadGrid1.MasterTableView.SortExpressions.Clear();
            RadGrid1.MasterTableView.GroupByExpressions.Clear();
            RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1;
            RadGrid1.Rebind();
            grdFiles.MasterTableView.SortExpressions.Clear();
            grdFiles.MasterTableView.GroupByExpressions.Clear();
            grdFiles.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1;
            grdFiles.Rebind();
       
     
        }
    }

Please help me how to reslove this issue
Maria Ilieva
Telerik team
 answered on 12 Aug 2011
3 answers
188 views
Hello,
I have a template column which contains combobox with treeview inside, as described here. But, as it's all in grid TemplateColumn, I don't want those trees to load their content on initial page load, because this will make page too heavy. So I populate it from web service when user opens a dropdown box. Here is my javascript code:

var refCbTree;
var refCb;
function ReferenceComboBoxOpeningHandler(sender, args) {
    refCb = sender;
    refCbTree = $find(sender.get_attributes().getAttribute("treeID"));
    service.LoadReferenceRoot(sender.get_attributes().getAttribute("refID"), onRequestNodesSuccess);  
}
 
function onRequestNodesSuccess(result) {
    if (!refCbTree) return;
    refCb.trackChanges();
    refCbTree.trackChanges();
    for (i = 0; i < result.length; i++) {
        var node = new Telerik.Web.UI.RadTreeNode();
        node.set_text(result[i].Text);
        node.set_value(result[i].Value);
        refCbTree.get_nodes().add(node);
    }
    refCbTree.commitChanges();
    refCb.commitChanges();
}

So when service returns nodes, all nodes seem to be populated in tree, but tree won't resize and so with combobox. Attached is screenshot of what I see.
Is that possible to resize both controls to reveal their contents after loading nodes?
Thank you.
Dimitar Terziev
Telerik team
 answered on 12 Aug 2011
2 answers
102 views
Hello ... I built following simple chart binding to a sql datasource (stored procedure / pivot table)

<telerik:RadChart
                    ID="RC_Line1" runat="server"
                    DataSourceID="SDS_Chart_Line1"
                    DefaultType="Line"
                    Skin="Office2007"
                    AutoLayout="True"
                    SeriesPalette="Pal1"
                    Height="600px"
                    Width="800px"
                    IntelligentLabelsEnabled="True">
                    <CustomPalettes>
                        <telerik:Palette Name="Pal1">
                            <Items>
                                <telerik:PaletteItem MainColor="Yellow" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="Blue" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="Red" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="Orange" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="Green" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="Cyan" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="Magenta" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="Gray" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="FloralWhite" SecondColor="Black"></telerik:PaletteItem>
                                <telerik:PaletteItem MainColor="Turquoise" SecondColor="Black"></telerik:PaletteItem>
                            </Items>
                        </telerik:Palette>
                    </CustomPalettes>
                    <Appearance Border-Visible="False"></Appearance>
                    <ChartTitle>
                        <Appearance>
                            <FillStyle MainColor=""></FillStyle>
                        </Appearance>
                        <TextBlock Text="Pappas AUT">
                            <Appearance TextProperties-Font="Arial, 18px" TextProperties-Color="Black"></Appearance>
                        </TextBlock>
                    </ChartTitle>
                    <Legend>
                        <Appearance Position-AlignedPosition="Right">
                            <ItemTextAppearance TextProperties-Color="Black"></ItemTextAppearance>
                            <ItemMarkerAppearance Figure="Square"></ItemMarkerAppearance>
                            <Border Visible="False" />
                        </Appearance>
                    </Legend>
                    <PlotArea>
                        <XAxis DataLabelsColumn="Year" LayoutMode="Normal"></XAxis>
                        <YAxis><Appearance MinorGridLines-Visible="False"></Appearance></YAxis>
                    </PlotArea>
                </telerik:RadChart>


My problem is, that column "year" is displaying on the yaxis (values 2005, 2006 ...) ... if I change the sql statement to
"SELECT 'Y' + CONVERT(VARCHAR(4),YEAR) as Year" the issue is gone.

Thank you...
Oliver
Top achievements
Rank 1
 answered on 12 Aug 2011
32 answers
653 views
Hello people,

I have a RadGrid that allow multiple selection...What i need is after the user select a few rows and after click on a button("DONE") I want to change that rows color for example to red and allow the reverse action...

For final I need to count  in real time, How many rows are Red(DONE) and how many aren't and show a dialog to inform it.

this is my RadGrid on aspx page:

div>
        <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True"
            AllowSorting="True" AutoGenerateColumns="False" ViewStateMode="Disabled" Width="97%"
            enableajax="True" CssClass="productsGrid" CellSpacing="0" AllowFilteringByColumn="True"
            ShowFooter="True" Skin="Black" AllowMultiRowSelection="True" OnItemCommand="RadGrid1_ItemCommand"
            OnGridExporting="RadGrid1_GridExporting" OnNeedDataSource="RadGrid1_NeedDataSource">
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
            <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView GridLines="None" Width="100%" ViewStateMode="Disabled" CommandItemSettings-ShowExportToCsvButton="True"
                CommandItemSettings-ShowAddNewRecordButton="false" CommandItemDisplay="Top">
                <Columns>
                    <telerik:GridBoundColumn DataField="SequencialNumber" HeaderText="SequencialNumber"
                        UniqueName="SequencialNumber" SortExpression="SequencialNumber">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Priorities.Priority" HeaderText="Priority" UniqueName="Priority"
                        FilterControlAltText="Filter Priority column" SortExpression="Priority" DataType="System.Int32">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Staging.Process" HeaderText="Staging" UniqueName="Process"
                        SortExpression="Process" FilterControlAltText="Filter Process column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SupplierCode" HeaderText="SupplierCode" UniqueName="SupplierCode"
                        SortExpression="SupplierCode" FilterControlAltText="Filter SupplierCode column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="MessageStatus" HeaderText="MessageStatus" UniqueName="MessageStatus"
                        SortExpression="MessageStatus" FilterControlAltText="Filter MessageStatus column">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="DocumentType" HeaderText="DocumentType" UniqueName="DocumentType"
                        FilterControlAltText="Filter DocumentType column" SortExpression="DocumentType">
                    </telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn UniqueName="InvoiceCreationDate" DataField="InvoiceCreationDate"
                        HeaderText="InvoiceCreationDate" FilterControlAltText="Filter InvoiceCreationDate column"
                        SortExpression="InvoiceCreationDate">
                        <FilterTemplate>
                            <telerik:RadDatePicker ID="RadDatePicker1" runat="server">
                            </telerik:RadDatePicker>
                        </FilterTemplate>
                    </telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn DataField="SupplierVatNumber" FilterControlAltText="Filter SupplierVatNumber column"
                        HeaderText="SupplierVatNumber" SortExpression="SupplierVatNumber" UniqueName="SupplierVatNumber">
                    </telerik:GridBoundColumn>
                </Columns>
                <ExpandCollapseColumn Visible="False">
                    <HeaderStyle Width="19px"></HeaderStyle>
                </ExpandCollapseColumn>
                <RowIndicatorColumn Visible="False">
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
        </telerik:RadGrid>

this is my code behind:
public partial class InvoicesScalingDefault : Microsoft.Practices.CompositeWeb.Web.UI.Page, IInvoicesScale
    {
        private InvoicesScalePresenter _presenter;
  
  
        public System.Collections.Generic.IList<Data.SapDocuments> SapDocuments
        {
            get;
            set;
        }
  
  
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this._presenter.OnViewInitialized();
            }
            this._presenter.OnViewLoaded();
  
  
                        //string userLogin = Page.User.Identity.Name;
  
        }
  
        [CreateNew]
        public InvoicesScalePresenter Presenter
        {
            set
            {
                this._presenter = value;
                this._presenter.View = this;
            }
        }
  
        private void LoadData()
        {
            //Popular dados na Radlist
  
            SapDocumentsBO sapDocs = new SapDocumentsBO();
  
            string user = Page.User.Identity.Name.Substring(Page.User.Identity.Name.IndexOf("\\") + 1);
  
            if ((user == "xxx") || (user == "xxx"))
            {
                this.SapDocuments = sapDocs.GetSapDocuments();
                RadGrid1.DataSource = this.SapDocuments;
            }
            else
            {
                this.SapDocuments = sapDocs.GetSapDocumentsByUser(user);
                RadGrid1.DataSource = this.SapDocuments;
            }
  
        }
  
        protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            LoadData();
        }
  
  
        /// <summary>
        /// Export de todos os SequencialNumber da tabela para .csv
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToCsvCommandName)
            {
                RadGrid1.MasterTableView.Columns.FindByUniqueName("SequencialNumber").Visible = true;
                RadGrid1.ExportSettings.IgnorePaging = true;
  
                int count = 0;
                foreach (GridColumn column in RadGrid1.Columns)
                {
                    if (column.Visible)
                    {
                        if (count > 0)
                            column.Visible = false;
                        else
                            count++;
                    }
                }
  
            }
        }
  
        /// <summary>
        /// Método para formatar o sequencialNumber
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void RadGrid1_GridExporting(object sender, GridExportingArgs e)
        {
            e.ExportOutput = e.ExportOutput.Replace("\"\r\n\"", "\"\r\n\"'");
        }
  
    }
}
Ricardo
Top achievements
Rank 1
 answered on 12 Aug 2011
3 answers
105 views
Hi!

I use grouping and paging in my grid. Sometimes a group will continue on the next page(s).

I wonder if anyone knows of a simple way to analyze a GridGroupHeaderItem to find out if the group either continues from the previous page or continues on the following page.

I know that I can analyze the DataCell.Text attribute but since my grid can be translated into several languages it might be a bit tricky.

Thanks
/Mats
Tsvetina
Telerik team
 answered on 12 Aug 2011
2 answers
81 views
Hello.

I have a problem with grid layouts.I use Webblue skin in my project.In most of pages,grids appear like normal but some of them just disrupting.Look at skin and pagings.Using same grid skin css all of them.

Please help me to solve this problem.
Pronic
Top achievements
Rank 1
 answered on 12 Aug 2011
1 answer
194 views
Hi Developer,
first I apologize for my english (it's not very good).  I'am a beginner with telerik, and I have some doubts with the RadGrid.

Actually I develop a WebApplication that uses Telerik Asp.Net ajax controls, exactly a I develop with the RadGridControl.
I like to read from a table (from database) and use a radgrid to show results from "query" (after I'll improve the example app to include "buttons" to do action like detail view, master/detail, etc).
Note: The table to read will have more record (actually has about 10.000)

I am trying to scenarios

a) RadGrid with SqlDatasource (and filtering)

In this case, I define a radgrid (radGrid1) which uses a SqlDatasource (sqlDatasource) only with SelectCommand ("select * from mytable")

In this case, I define a SqlDatasource, with a SelectCommand "select * from mytable"

# MyTableViewScenarioA.aspx

...
<!-- RadGrid  -->
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"
    AllowSorting="True" CellSpacing="0" DataSourceID="SqlDataSource1"
    GridLines="None" PageSize="30">
...

<!-- SqlDatasource -->
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
    ConnectionString="connectionstring"
    
        SelectCommand="SELECT * from MyTable"></asp:SqlDataSource>

# MyTableViewScenarioA.aspx.cs


b) RadGrid with ObjectDatasource (and filtering)

In this case, I define a RadGrid (radGrid1) without datasource. And before I use the NeedDatasource method to set the radgrid1's datasource with a list. The list is get from a method of a service class that query database (this method creates a select query and return a list of a type object)

# MyTableService.cs
public class MyTableService
{
    public List<MyTable> Find(Dicctionary<string, object> parameters)
    {
        // List<MyTable> = "select * from mytable where ..."
    }

   .....
}

# MyTableViewScenarioB.aspx

...
<telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True"
        AllowSorting="True" PageSize="15"
        AutoGenerateColumns="False" CellSpacing="0" GridLines="None"
        onneeddatasource="RadGrid2_NeedDataSource" Skin="Windows7">

...

# MyTableViewScenarioB.aspx.cs

....
protected void RadGrid2_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {

            MyTableService service = new MyTableService();

            Dictionary<string, object> parameters= new Dictionary<string, object>(5);

            DateTime datetimeTo = DateTime.Now;
            //DateTime datetimeFrom= datetimeTo .AddDays(-7);
            DateTime datetimeFrom= datetimeTo .AddDays(-45);

            parameters.Add("datetimeFrom", datetimeFrom);
            parameters.Add("datetimeTo ", datetimeTo );

            List<MyTable> myTableList = service .Find(parameters);

            this.RadGrid1.DataSource = myTableList ;
            //this.RadGrid1.DataBind();            
        }        
    }

...

I debug the application and I have some questions about radgrid

Q1) ¿Select is execute everty time when I click a "next page" ?
Note: In scenario B the answer is yes

Q2) If Q1 answer if yes considering scenario a). How I can optimize this?
If every time radgrid execute a select, the database return a big number of rows, but the grid limit the result considering page size.

Q3) If Q1 answer if no (considering scenario b). ¿Where is save the datasource?

Q4) In scenarioB. How I can use the values of the filter, in NeedDatasource, to create the dicctionary parametres use in Find method?
Note: asume that table "myTable" has four columns: column1 (int), column2 (string), colum3(number), colum4 (datetime)

Q5) How works radgrid filtering? When is applied the filter?
I like to know how works filterir, and when is applied.  In scenarioa is launch select command and before is aplied the filter or first is aplied the filter (to select query) and second is launch the query.
In first aproach, the select return all rows from database and after, dataset is filter. In second aproach, the database return the "correct" rows that match with the filter.

Q6) When I change a filter, radgrid reload the page. It's possible to avoid this feature?
I like to use a command button "Apply filters" similar to a tipical search form. The idea is to avoid reload the grid every time that a filter change (and avoid to query the database everty time)

Q7) There is a event to inform me that a filter have been change?
Note: this is importan if i use scenarioB. The idea is recalculate de parameters, every time a user change a filter.

Q8) If I use scenarioB, it's possible to save the list in the view state?
The idea, is use the save list every time that the user click on a specific page (in this case, this is no query in database). If the user change a filter, then, the list (datasource) should be recalculated.

Q7) Which of two scenarios is better to use ASP Net Ajax controls?
ScenarioA is the typical of the telerik examples. ScenarioB is  typical of a orm application (entity framework, nhibernate, etc) where the develop use bussines object indepent of database (and is desgined to use, for exampe with a mvc application. In this case, the search view constains a model that consist in a list<MyTable>)

Thank you so much for your help. Sorry for my english.
Regards.
Mira
Telerik team
 answered on 12 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?