RadGrid control issue

Thread is closed for posting
2 posts, 0 answers
  1. Davide
    Davide avatar
    1 posts
    Member since:
    Jul 2012

    Posted 06 Jul 2012 Link to this post

    Hi,

    I have a RadGrid Control on my WebPage with an editable column.
    After edit this column and postback the request, inside the CSharp event

    protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
    // rg is the RadGrid       
            if (rg != null)
            {
                if (e.Argument == string.Empty)
                {
                    rg.Rebind();
                }

                string[] editedItemIds = e.Argument.Split(':');
                int i;
                for (i = 0; i <= editedItemIds.Length - 2; i++)
                {
                    try
                    {
                        Guid itemId = Guid.Parse(editedItemIds[i]);

    //This is the row that give the problem

                        GridDataItem updatedItem = rg.MasterTableView.FindItemByKeyValue("ArticoloId", itemId);
                       
                        UpdateValues(itemId, updatedItem);
                    }
                    catch
                    {
                    }
                }
                rg.Rebind();
            }
        }


    As told before the rg.MasterTableView.Items collection is empty and so the method "FindItemByKeyValue" does not never return any value.
    I follow your example at
    http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/clienteditbatchupdates/defaultcs.aspx

    Your help will be much appreciated.
    Thanks in advance.

  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 10 Jul 2012 Link to this post

    Hi Davide,

    Your code does not contain enough information to pinpoin the cause for the problem, however, I am sending you a full working example to compare with your implementation.

    Hope it helps.

    All the best,
    Tsvetoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top