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

Problem in hierarchical editable Radgrid

3 Answers 47 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Gajanan asked on 14 Oct 2010, 06:10 AM
hi All,
i am using hierarchical radgrid in my Application It is displaying proper records in hierarchical , in that grid i allow user to update Parent And Details(child) it is updating the my Parent Records well, but my problem is with details view when i click on update it is Updating that record , but it is showing that record in Edit mode even my edit command is successfully executed. i have attached my Problem jpeg file .
and i am using the following code to do this implementation

protected void RadGrid_AssignPlanner_UpdateCommand(object source, GridCommandEventArgs e)
       GridEditableItem editedItem = e.Item as GridEditableItem;
            //Update Order By OpprtunityID
            RadComboBox rcbEmployee = editedItem.FindControl("rcbEmployee") as RadComboBox;
            Label lbl_OpportunityID = editedItem.FindControl("lbl_OpportunityID") as Label;
            if (rcbEmployee!=null)
                if (UIHelper.IsNumeric(rcbEmployee.SelectedValue))
                    EmployeeID = int.Parse(rcbEmployee.SelectedValue);
            if (lbl_OpportunityID!=null)
                if (UIHelper.IsNumeric(lbl_OpportunityID.Text))
                    OpprtunityID = int.Parse(lbl_OpportunityID.Text);
            if(EmployeeID>0 && OpprtunityID>0)
                UpdateOrderByOpprtunityID(OpprtunityID, EmployeeID);
            //Update Order By OrderID
            RadComboBox rcbOrderEmployee = editedItem.FindControl("rcbOrderEmployee") as RadComboBox;
            Label lbl_OrderID = editedItem.FindControl("lbl_OrderID") as Label;
            if (rcbOrderEmployee != null)
                if (UIHelper.IsNumeric(rcbOrderEmployee.SelectedValue))
                    EmployeeID = int.Parse(rcbOrderEmployee.SelectedValue);
            if (lbl_OrderID != null)
                if (UIHelper.IsNumeric(lbl_OrderID.Text))
                    OrderID = int.Parse(lbl_OrderID.Text);
            if (EmployeeID > 0 && OrderID > 0)
                UpdateOrderByOrderID(OrderID, EmployeeID);

the ASPX file code is

<telerik:RadGrid  ID="RadGrid_AssignPlanner" runat="server"
                        AllowSorting="true" AllowAutomaticUpdates="true"
                        AllowPaging="true" PageSize="30"
            <MasterTableView DataKeyNames="OpportunityID" EditMode="inplace">
                <Columns>My Parent table columns </Columns>

            <telerik:GridTableView DataKeyNames="OrderId"  
                    ExpandCollapseColumn-ButtonType="PushButton" EditMode="InPlace" >
                    <telerik:GridRelationFields DetailKeyField="OpportunityID"
                            MasterKeyField="OpportunityID" />
                <Columns> Child table Column </Columns>

plz tell solution

3 Answers, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 14 Oct 2010, 07:38 AM
Hello Gajanan,

Since you are performing the update operation in code behind(manually), set the AllowAutomaticUpdates to false to close the update form after updation .

Top achievements
Rank 2
answered on 14 Oct 2010, 08:39 AM
i tried AllowAutomaticUpdates= false but it is not working still i am face same problem
Iana Tsolova
Telerik team
answered on 14 Oct 2010, 10:11 AM
Hi Gajanan,

What about removing this line of code as well:


Note that the Radgrid is implicitly rebound on update command as you can see from here.

All the best,
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 2
Answers by
Top achievements
Rank 1
Top achievements
Rank 2
Iana Tsolova
Telerik team
Share this question