This is a migrated thread and some comments may be shown as answers.

RadGrid control issue

1 Answer 57 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Davide
Top achievements
Rank 1
Davide asked on 06 Jul 2012, 07:35 AM
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.

1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 10 Jul 2012, 05:37 AM
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.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Davide
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or