I currently have a popup with an Update and a Cancel button.
I would like to have 3 buttons - Update, Save and Cancel.
Save would do just that, but NOT close the popup.
This behavior is typical of many applications where Update means save+close and Save means save+leave-open.
How would go about implementing this Save functionality for my popup?
Thanks
Jim
I would like to have 3 buttons - Update, Save and Cancel.
Save would do just that, but NOT close the popup.
This behavior is typical of many applications where Update means save+close and Save means save+leave-open.
How would go about implementing this Save functionality for my popup?
Thanks
Jim
6 Answers, 1 is accepted
0

Jayesh Goyani
Top achievements
Rank 2
answered on 31 Mar 2012, 08:32 AM
Hello Jim,
Can you please provide information or code, which method you used for save/update/cancel ?
Thanks,
Jayesh Goyani
Can you please provide information or code, which method you used for save/update/cancel ?
Thanks,
Jayesh Goyani
0

jlj30
Top achievements
Rank 2
answered on 31 Mar 2012, 04:20 PM
I have included some snippets of the aspx page below.
Radbutton8 is where the Insert or Update takes place.
I'd like to add another button that performs a "Save" - i.e., an update that leaves the popup open for additional editing.
Radbutton8 is where the Insert or Update takes place.
I'd like to add another button that performs a "Save" - i.e., an update that leaves the popup open for additional editing.
<
telerik:RadGrid
ClientSettings-Resizing-AllowColumnResize
=
"true"
PageSize
=
"20"
ID
=
"grdDataSpecs"
Width
=
"100%"
ShowStatusBar
=
"True"
DataSourceID
=
"sqlDataSpec"
runat
=
"server"
AutoGenerateColumns
=
"False"
AllowSorting
=
"True"
AllowPaging
=
"True"
GridLines
=
"None"
Skin
=
"Vista"
ClientSettings-Selecting-AllowRowSelect
=
"true"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
AllowAutomaticUpdates
=
"True"
AllowFilteringByColumn
=
"True"
AllowMultiRowSelection
=
"True"
ClientSettings-Scrolling-AllowScroll
=
"true"
ClientSettings-Scrolling-UseStaticHeaders
=
"true"
ClientSettings-Scrolling-ScrollHeight
=
"100%"
OnItemCommand
=
"grdDataSpecs_ItemCommand"
OnItemDataBound
=
"grdDataSpecs_ItemDataBound"
OnPreRender
=
"grdDataSpecs_PreRender"
OnItemUpdated
=
"grdDataSpecs_ItemUpdated"
OnHTMLExporting
=
"grdDataSpecs_HTMLExporting"
OnExportCellFormatting
=
"grdDataSpecs_ExportCellFormatting"
OnItemCreated
=
"grdDataSpecs_ItemCreated"
OnItemInserted
=
"grdDataSpecs_ItemInserted"
CellSpacing
=
"0"
>
<
ExportSettings
HideStructureColumns
=
"true"
ExportOnlyData
=
"true"
IgnorePaging
=
"true"
OpenInNewWindow
=
"true"
>
<
Excel
Format
=
"Html"
/>
</
ExportSettings
>
<
MasterTableView
DataSourceID
=
"sqlDataSpec"
DataKeyNames
=
"ID"
AllowMultiColumnSorting
=
"True"
CommandItemDisplay
=
"Top"
AllowAutomaticDeletes
=
"True"
AllowAutomaticInserts
=
"True"
AllowAutomaticUpdates
=
"True"
EditMode
=
"PopUp"
>
...
<
EditFormSettings
CaptionDataField
=
"BriefField_Name"
CaptionFormatString
=
"Editing Data Specification"
EditFormType
=
"Template"
InsertCaption
=
"New Data Specification"
PopUpSettings-Modal
=
"true"
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
<
FormTemplate
>
<
div
id
=
"divEdit"
runat
=
"server"
class
=
"formTemplate"
style
=
"height: 500px;"
>
<
div
class
=
"tabContent"
style
=
"height: 30px; padding-bottom:5px;"
>
<
table
>
<
tr
>
<
td
>
<
telerik:RadButton
ID
=
"RadButton8"
runat
=
"server"
CommandName='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'
Text='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "Create" : "Update" %>'
Visible='<%# (Boolean)Session["EditProcess"] %>'>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"RadButton10"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Cancel"
Text='<%# ((Boolean)Session["EditProcess"]) ? "Cancel" : "Close" %>'>
</
telerik:RadButton
>
</
td
>
</
tr
>
</
table
>
</
div
>
...
0
Hello Jim,
Have you tried setting e.KeepInEditMode = true in the ItemUpdated event handler? This should leave the edit form open after the update takes place.
All the best,
Tsvetina
the Telerik team
Have you tried setting e.KeepInEditMode = true in the ItemUpdated event handler? This should leave the edit form open after the update takes place.
All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

jlj30
Top achievements
Rank 2
answered on 04 Apr 2012, 03:01 PM
I tried setting e.KeepInEditMode = true in the ItemUpdated event, but that did not work - the popup still closes.
I do some simple processing in ItemCommand for the Update command, but just setting some hidden label's Text attribute which in turn is bound to the database. I have included the opening section of the formtemplate below.
By the way, it is a rather busy template including a RadTabStrip, RadMultiPage and several RadPageViews.
Any suggestions as to what to try next?
Thanks.
I do some simple processing in ItemCommand for the Update command, but just setting some hidden label's Text attribute which in turn is bound to the database. I have included the opening section of the formtemplate below.
By the way, it is a rather busy template including a RadTabStrip, RadMultiPage and several RadPageViews.
Any suggestions as to what to try next?
Thanks.
<
EditFormSettings
CaptionDataField
=
"BriefField_Name"
CaptionFormatString
=
"Editing Data Specification"
EditFormType
=
"Template"
InsertCaption
=
"New Data Specification"
PopUpSettings-Modal
=
"true"
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
<
FormTemplate
>
<
div
id
=
"divEdit"
runat
=
"server"
class
=
"formTemplate"
style
=
"height: 500px;"
>
<
div
class
=
"tabContent"
style
=
"height: 30px; padding-bottom: 5px;"
>
<
table
>
<
tr
>
<
td
>
<
telerik:RadButton
ID
=
"RadButton8"
runat
=
"server"
CommandName='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "PerformInsert" : "Update" %>'
Text='<%# ((bool)DataBinder.Eval(Container, "OwnerTableView.IsItemInserted")) ? "Create" : "Update" %>'
Visible='<%# (Boolean)Session["EditProcess"] %>'>
</
telerik:RadButton
>
<
telerik:RadButton
ID
=
"RadButton10"
runat
=
"server"
CausesValidation
=
"False"
CommandName
=
"Cancel"
Text='<%# ((Boolean)Session["EditProcess"]) ? "Cancel" : "Close" %>'>
</
telerik:RadButton
>
</
td
>
</
tr
>
</
table
>
</
div
>
<
telerik:RadTabStrip
ID
=
"tspDataSpecs"
runat
=
"server"
MultiPageID
=
"RadMultiPageDataSpecs"
SelectedIndex
=
"0"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
ID
=
"tabDetails"
Text
=
"Details"
PageViewID
=
"pagDataSpecsDetails"
Selected
=
"true"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
ID
=
"tabValues"
Text
=
"Values"
PageViewID
=
"pagValues"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
ID
=
"tabHelpText"
Text
=
"Help Text"
PageViewID
=
"pagHelpText"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
ID
=
"tabComments"
Text
=
"Comments / Special Instructions"
PageViewID
=
"pagComments"
>
</
telerik:RadTab
>
<
telerik:RadTab
runat
=
"server"
ID
=
"tabImpTech"
Text
=
"Implementation Technique"
PageViewID
=
"pagImpTech"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPageDataSpecs"
runat
=
"server"
SelectedIndex
=
"0"
RenderSelectedPageOnly
=
"false"
>
<
telerik:RadPageView
ID
=
"pagDataSpecsDetails"
runat
=
"server"
>
...
0

jlj30
Top achievements
Rank 2
answered on 04 Apr 2012, 03:06 PM
**Update**
I just tried your suggested technique on a simpler popup template (no tabs) and it works fine.
It's only the tabbed popup that will not close.
Jim
I just tried your suggested technique on a simpler popup template (no tabs) and it works fine.
It's only the tabbed popup that will not close.
Jim
0
Hi Jim,
Do you have AJAX in this scenario? If so, check what happens when you disable it, are there any server errors?
If you cannot see anything more specific about the problem, I would suggest you to open a formal support ticket and send us a runnable sample of the problemmatic scenario, so that we can also debug it.
Kind regards,
Tsvetina
the Telerik team
Do you have AJAX in this scenario? If so, check what happens when you disable it, are there any server errors?
If you cannot see anything more specific about the problem, I would suggest you to open a formal support ticket and send us a runnable sample of the problemmatic scenario, so that we can also debug it.
Kind regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.