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. Image for the cookie policy date

Edit Record with UseTemplateForm

Hi everyone,

I'm validating Syncfusion GridgroupingControl for upcoming use in a future WebApplication (asp.net).

My actual problem is to edit a row of the grid with a customized form. I found some related topics here but none of them was really matching my use case.

The form template should be filled dynamicly with input fields (not static in Page Markup) and also assigned dynamicly.
Is there any designer template or automatism for creating such templates.
Is there a way to automatically map input field names and values?
To which field of the grid or tabledescriptor must the template be assigned to?

The way I've tried is not working (see appended file). IInstaniateIn is being called but the form is empty.


Thanks

Torsten





Template1.aspx.cs_974a0a76.zip

3 Replies

TH Torsten Haussig June 28, 2010 07:46 PM UTC

Here's an update of the way i try to solve the described use case.
It's still not working.
I'm creating the Template dynamically and assign it to FormModeTemplate.
The created controls are not shown at all.
My question: which Template property of grid or descriptor is used to instantiate the user form?
Is there any error in the concept?

Thanks.



Template1.aspx.cs_24dbc7a3.zip


TH Torsten Haussig June 29, 2010 05:41 AM UTC

Sorry, I posted the wrong files. Here the right ones.



Tech3Syncfusion_4044116b.zip


BM Bharath M Syncfusion Team July 2, 2010 06:07 AM UTC

Hi Torsten,

We regret for the delay in getting back to you.

After analysing the sample provided, we found that you are creating and binding the “FormModeTemplate” only on “SelectedRecordsChanged event”. To resolve this issue, we suggest you to set the “FormModeTemplate” on “PageLoad” event for every postback. The code snippet to explain this is as follows:

protected void Page_Load(object sender, EventArgs e)
{
this.Tech3Grid.TableDescriptor.FormModeTemplate = GetControl();
}

Let me know if you have any concerns.

Regards,
Bharath M

Loader.
Live Chat Icon For mobile
Up arrow icon