Grid Efficiency

10 posts, 0 answers
  1. Maher
    Maher avatar
    19 posts
    Member since:
    Jul 2015

    Posted 21 Jul 2015 Link to this post

    hi Telerik

    this is my first post

    I'm evaluating your last release for my company for choosing a third party controls

    i have multiple issues

    I'm building a page with a grid with invoices when selecting invoice and click edit (Custom button not the grid command ) it open that invoice in another page (invoiceDetail.aspx?ID=..) in a Rad window so the user can edit the items in the invoice and add more or edit

    normally i had item search in the detail page that should open the item list to choose item s

    1- about the efficiency i read on your forum that to increase the the speed of the grid load time i should use this method

    http://www.asp.net/web-forms/overview/data-access/paging-and-sorting/efficiently-paging-through-large-amounts-of-data-cs

    but this does not work with filtering ??? is there any thing to include filtering with this technique

    2-when you read my situation you will know that i need to open radwindow within another radwindow (open search page within the invoice detail page)

    this some thing i can't do

    the first window opens perfect

        function ShowEditForm(id, rowIndex) {
                        var grid = $find("<%= RadGrid1.ClientID %>");
                    var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                    grid.get_masterTableView().selectItem(rowControl, true);
                    window.radopen("trans.aspx?Serial=" + id, "UserListDialog", 1000, 800,30,30);
                    return false;
                }​

     <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                <Windows>
                    <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Height="320px"
                        Width="310px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                        Modal="true">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>

    this code run on the first page but not the second

    should i put another window manager with another window on the second page

    https://pnamburi.wordpress.com/2010/03/31/open-radwindow-from-within-a-radwindow/

    no thing on this page worked with me

    the manager always null even window.radopen(url) give error TypeError: d is undefined window.radopen​

    3- the item search page (i open it now via normal JavaScript ) just a page with grid of items if the parent row is edit mode(Change the item) and return the selected item instead of the old item

    if the parent row is new allow multiselect in this case i need to add these items to the grid

     

    thank you

  2. Maher
    Maher avatar
    19 posts
    Member since:
    Jul 2015

    Posted 21 Jul 2015 in reply to Maher Link to this post

    i managed to solve Q2

    http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

    Q3 Changed

    i opened the search page with radwindow 

    this code to get a datatable with the selected rows(dtTable is grid datasource)

      dtResult = dtTable.Clone();
                foreach (GridDataItem item in RadGrid1.SelectedItems)
                {
                    dtResult.ImportRow (dtTable.Select("F_ACCOUNTNO=" + item["F_ACCOUNTNO"].Text.ToString())[0]);
                }​

    3-a :how to send this datatable dtResult  to Parent?

    3-b: if it is edit mode(in place edit) i need to put the result of the search in the  F_ACCOUNTNO edit text

        if new create new rows and keep them in edit mode

  3. Maher
    Maher avatar
    19 posts
    Member since:
    Jul 2015

    Posted 23 Jul 2015 in reply to Maher Link to this post

    Hi two days and no answer ???

    3-A: i will but the datatable in session but what server event will fire when radwindow close

  4. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 24 Jul 2015 Link to this post

    Hello,

    Useful tips for improving RadGrid performance are available in the article below:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/performance/grid-performance-optimizations

    Please give them a try and let us know if you need additional assistance.

    Regarding your third question:
    The only way to catch a RadWindow's event on the server is to manually trigger the postback (full or partial). The control is entirely client-side and this is why it has no server events. You can refer to the forum post below where the same subject is discussed:
    http://www.telerik.com/forums/catching-close-event-server-side

    About question 3-b - I am not sure what exactly you are trying to achieve. Could you elaborate a bit more in the details.

    Regards,
    Pavlina
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Maher
    Maher avatar
    19 posts
    Member since:
    Jul 2015

    Posted 24 Jul 2015 in reply to Pavlina Link to this post

    Thank you for repay

    3-b: if it is edit mode(in place edit) i need to put the result of the search in the  F_ACCOUNTNO edit text
        if new create new rows and keep them in edit mode

    what do i mean

    if it is existing row -   grid edit mode in place - with the first field is Account No  - i put a search button to Search for Account

    i need to take the selected value from the search form(Opened in rad window) and put that value in the Account Field and replace the old Value

    if it is New Row the user can select Multiple Accounts now i should create  Multiple  grid rows put each account in a row

    and keep the rows on edit mode to complete the row data 

     

  6. Maher
    Maher avatar
    19 posts
    Member since:
    Jul 2015

    Posted 24 Jul 2015 Link to this post

    Regarding catching close event of Radwindow

    the situation is similar to that demo

    http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx​

    main page open radwindow that it self open another radwindow

    now your solution i guess will be in main page where the RadAjaxManager isbut i need to catch it from the first Radwindow

    (the opener ) as the search result (Datatable)

  7. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 29 Jul 2015 Link to this post

    Hello,

    Below you can find a code that shows how you can locate the control that contains the cell's value and, depending on the type of the column editor, cast it to the appropriate type, and access the value:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
           GridEditableItem editableItem = e.Item as GridEditableItem;
           TextBox textBox = editableItem["AccountColumnUniqueName"].Controls[0] as TextBox;
           // replace the old value based on your requirements
        }
    }

    Once you have the old value you can replace it with the one you wish based on your scenario.

    Regards,
    Pavlina
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 29 Jul 2015 Link to this post


    Hello,

    Regarding your question related to RadWindow control - using the javascript code below you should be able to get reference to the opened window:
    function openWin2() {
                   var parentPage = GetRadWindow().BrowserWindow;
                   var parentRadWindowManager = parentPage.GetRadWindowManager();
                   window.setTimeout(function () {
                   var window2 = parentRadWindowManager.open("Dialog2.aspx", "RadWindow2");
                   }, 0);
               }


    Then you should be able to add a function that will be called when a RadWindow is closed using add_close method. Thus you will be able to execute your custom logic that will change the content of the first window when the second one is closed:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/window/client-side-programming/radwindow-object#methods-for-modifying-client-side-event-handlers-dynamically
    window2.add_close(some_handler);

    Regards,
    Pavlina
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  9. Maher
    Maher avatar
    19 posts
    Member since:
    Jul 2015

    Posted 30 Jul 2015 in reply to Pavlina Link to this post

    thank you for response

    but your solution is client side (add_close)

    how can i send Datatable(Selected items from grid)though that

    the situation send selected rows from grid in radwindow to the other radwindow

    i managed to put selected rows on datatable now i need to pass them (session , variable ,object ,etc)

  10. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 04 Aug 2015 Link to this post

    Hi,

    You can refer to the article below for more information how to access selected items client-side:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/gridtableview-object/properties/get_selecteditems%28%29

    Regards,
    Pavlina
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top