We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ASP.Net controls inside inline form template of grid grouping control cannot call from server side at

Thread ID:

Created:

Updated:

Platform:

Replies:

119115 May 11,2015 04:10 PM UTC May 12,2015 11:37 AM UTC ASP.NET MVC (Classic) 1
loading
Tags: Grid
Shwe
Asked On May 11, 2015 04:10 PM UTC

Hi,
        I have a syncfusion grid groping control(using inline form template). Inside inline form template, i put some ASP.Net controls(textbox, label, listbox). When I click the row or open the inline form, rowselectionchanged event fired. In this event, I cannot call ASP.Net controls from server side.  I tried to call  this one at rowselectionchanged event    "Record r = this.GridGroupingControl1.FormEditCell.CurrentRecord;"  , but FormEditCell is null.  So can u please advice me how can I calll ASP.Net controls inside inline form template of grid grouping control at rowselectionchanged event from server side?


Thanks and Regards,
Shwe

Kavitha Narayanan [Syncfusion]
Replied On May 12, 2015 11:37 AM UTC

Hi Shwe,

Thank you for using Syncfusion products.

We would like to let you know that, the RecordSelection event is raised when click on row and with record is moved to edit state so the FormEditCell will not be available. You can access the inline form Edit cells by CurrentRecordContextChange event which is achieved with help of EndEditCalled action.

Please refer the below code snippets for EndEditCalled action.

[CS]

void GridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)

{

if (e.Action == CurrentRecordAction.EndEditCalled)

{

Record curRecord = this.GridGroupingControl1.FormEditCell.CurrentRecord;

TextBox tb = this.GridGroupingControl1.FormEditCell.FindControl("CustomerIDTB") as TextBox;

if (tb.Enabled)

curRecord.SetValue("CustomerID", tb.Text);

tb = this.GridGroupingControl1.FormEditCell.FindControl("ContNameTB") as TextBox; // editing controls are accessed here

curRecord.SetValue("ContactName", tb.Text);

tb = this.GridGroupingControl1.FormEditCell.FindControl("CompNameTB") as TextBox;

curRecord.SetValue("CompanyName", tb.Text);

tb = this.GridGroupingControl1.FormEditCell.FindControl("CityTB") as TextBox;

curRecord.SetValue("City", tb.Text);

tb = this.GridGroupingControl1.FormEditCell.FindControl("CountryTB") as TextBox;

curRecord.SetValue("Country", tb.Text);

}

}

We have prepared a simple sample by using inline form template and also please refer the following online sample.

Sample: sample.zip

Online Sample link: http://asp.syncfusion.com/demos/ui/GridGrouping/CRUD%20Operations/EditingModes/cs/EditingModes.aspx

Please let us know if you need any further assistance.

Regards,

Kavitha N


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;