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

Re-useable Data Form

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Adam
Top achievements
Rank 1
Adam asked on 11 Feb 2011, 05:02 PM
Hi all,

I am wanting to create a re-useable (popup)form, both for add & edit functionality, but have a couple of questions:

1) How do i pass a value into a Telerik Popup form? (Say an 'id' value fom a edit link in a grid)?
2) Is there a way to change a form title based on the button(link) in the parent page is clicked?
2) How do i manage the two views (add/edit) including the dynamic databinding?

Any samples/ insight apprieciated!

Adam
@{  
        Html.Telerik().Window().Name("Window").Title("Submit feedback").Content(
            @<text>
                    @using (Html.BeginForm("popupform", "window", FormMethod.Post, new { id = "feedback-form" })) 
                    {
                            <p class="note">This is just an example, sent data will <strong>not</strong> be saved.</p>
                            <label for="name">Name:</label>
                            @Html.TextBox("name")
                            <div class="form-actions">
                                <button type="submit" class="t-button t-state-default">Submit feedback!</button>
                            </div>
                       }
                </text>) .Width(400) .Draggable(true).Modal(true).Visible(false).Render();
}

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 14 Feb 2011, 10:24 AM
Hello Adam,

 You can check this code library entry which shows how to customize the popup form. You can use the OnEdit client-side event to pass any data to the form and to modify the title of the window. 

Regards,
Atanas Korchev
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
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or