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

Add popup taking more time to close in cancel mode in radgrid

2 Answers 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Guru
Top achievements
Rank 1
Guru asked on 04 Jun 2012, 05:22 PM
I am getting more time to close the add/edit popup, while cancel the popup in radgrid.For all grids getting same problem and getting timeout while binding more than 5000 records in radgrid from the database.Please some one give me the solution.I am using Telerik 2011.3 version.

2 Answers, 1 is accepted

Sort by
0
Elliott
Top achievements
Rank 2
answered on 04 Jun 2012, 06:00 PM
make sure you are not refreshing the grid after a cancel
if you populate the grid through a NeedDataSource event on the server then the grid should not refresh when the popup closes
0
Guru
Top achievements
Rank 1
answered on 05 Jun 2012, 08:31 AM

Thank you for your responce, included the NeedDataSource event for the grid.Whenever the popup closes,then it is taking more time to close.If in insert mode closing fast.

Please can you give me the solution.

protected void rgCareTeamMembers_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
rgCareTeamMembers.DataSource = NeedCareMemberDataSource();
}

protected void rgCareTeam_InsertCommand(object source, GridCommandEventArgs e)
    {
        string strOperatorValue = "0";
        string strMessage = string.Empty;
        GridEditFormItem InsertItem = e.Item as GridEditFormItem;
        if (CCMUtility.GetCurrentUserSession == null)
        {
            return;
        }
        int intAction = 1;
        objMCareTeam.CreatedByUserId = CCMUtility.GetCurrentUserSession.UserID;
        objMCareTeam.CareTeamName = (InsertItem.FindControl("txtTeamName") as RadTextBox).Text;
        objMCareTeam.Description = (InsertItem.FindControl("txtDescription") as RadTextBox).Text;
        RadComboBox ddlDisease = (InsertItem.FindControl("ddlDisease") as RadComboBox);
        RadioButton rbActive = (InsertItem.FindControl("rbActive") as RadioButton);
        objMCareTeam.StatusCode = rbActive.Checked == true ? CCMConstants.STRSTATUSACTIVE : CCMConstants.STRSTATUSINACTIVE;
        if (ddlDisease.SelectedItem.Value == strOperatorValue)
        {
            objMCareTeam.DiseaseID = 0;
        }
        else
        {
            objMCareTeam.DiseaseID = Convert.ToInt32(ddlDisease.SelectedItem.Value);
        }
        int intResult = BDataAdministration.BTransactionDataAdministration<CareTeam>(objMCareTeam, intAction);
        if (intResult == -1)
        {
            DisplayMessage("MsgCtInsert1", out strMessage, CCMConstants.DisplayStatus.Success);
            rgCareTeam.MasterTableView.Caption = strMessage;
        }
        else if (intResult == Convert.ToInt32(CCMConstants.DATA_EXISTS))
        {
            DisplayMessage("MsgCtExists1", out strMessage, CCMConstants.DisplayStatus.Fail);
            rgCareTeam.MasterTableView.Caption = strMessage;
        }
        e.Item.Edit = false;
        e.Canceled = true;
        rgCareTeam.MasterTableView.Rebind();
        rgCareTeam.Rebind();
    }

 

Tags
Grid
Asked by
Guru
Top achievements
Rank 1
Answers by
Elliott
Top achievements
Rank 2
Guru
Top achievements
Rank 1
Share this question
or