Vous êtes sur la page 1sur 2

T235942 - How to use XafCallbackManager without page flickering.

| DevExpress Support Center

25-May-15
Log In

Products

Free Trials & Demos

Buy

SUPPORT CENTER

Support
Tickets

My Account
Examples

About Us
Localization

FAQ

Submit a Support Ticket

Type search string and press Enter

solution

Training Events

How to use XafCallbackManager without page flickering.

ID:
T235942

Tags: .NET, Frameworks (XAF & XPO), eXpressApp Framework

Created O n :
4/29/2015 12:12:40 PM

Mo dified O n :
5/5/2015 3:59:33 PM

sergey filippov 1 4 weeks ago

Hi.
I use XafCallbackManager like in E3778 . All works fine but after callback part of my page is reloaded. I just want to send some data from frontend to my
controller without any flickering and reloading of page just like AspxCallback.
Refreshing is happenning because of event 'callbackControl_Callback' In 'XafCallbackManager' class.

B u ild:
v2014 vo l 2.4 / 19-Jan -2015

sergey filippov 1 4 weeks ago


I fo u n ded th at refresh in g is n o t h ap p en in g if I tu rn static p ro p erty o f XafCallb ackMan ager Ch eckCo n tro lsMo dificatio n to tru e. W h at
u n desirab le side effects can I get if Ch eckCo n tro lsMo dificatio n alw ays w ill b e tru e?

Leave a Comment

1 Solution
0

Alexey (DevExpress Support) 4 weeks ago

Hello Sergey,
The CheckControlsModification property set to true can affect performance. I want to note that we have removed this property in the latest versions and was
leading to the Toolbar in the nested frame disappears after pressing F5 issue.

Show all comments

sergey filippov 1 4 weeks ago


IXafCallb ackHan dler imp lemen ted in Stan dardFo rmW ith Cu sto mU serCo n tro lView Co n tro ller
E911.rar

Alexey (DevExpress Support) 4 weeks ago


I h ave ch ecked yo u r samp le u sin g versio n 14.2.7, an d all seems to w o rk co rrectly. I h ave attach ed a video th at illu strates it. As yo u can see,
th ere is n o flickerin g.
Please u p date to versio n 14.2.7 an d let me kn o w if yo u n eed fu rth er assistan ce.
T235942.sw f

sergey filippov 1 3 weeks ago


B u t grid is relo adin g in yo u r video . In my samp le grid is n o t relo adin g if Ch eckCo n tro lsMo dificatio n tru e.

Alexey (DevExpress Support) 3 weeks ago


Th an k yo u fo r th e clarificatio n . W e w ill research th is b eh avio r an d let yo u kn o w o u r resu lts.

Alexey (DevExpress Support) 3 weeks ago


I regret to in fo rm yo u , th at th ere is n o easy w ay to imp lemen t th e requ ired b eh avio r.
Th e b est ap p ro ach seems to mo dify o u r co de an d retu rn th e Ch eckCo n tro lsMo dificatio n p ro p erty. See Ho w to reb u ild assemb lies fro m th e
so u rce co de.
Yo u n eed to defin e th e Ch eckCo n tro lsMo dificatio n p ro p erty in XAFCallb ackMan ager in th e fo llo w in g man n er:

[C#]

Open in popup window


[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
static public bool CheckControlsModification {
get { return checkControlsModification; }
set { checkControlsModification = value; }
}

After th at, exten d th e callb ackCo n tro l_Callb ack meth o d in th e fo llo w in g man n er:

[C#]

Open in popup window


private void callbackControl_Callback(object source, CallbackEventArgs e) {
RegisterUpdatePanels(callbackControl.Page as IXafUpdatePanelsProvider, ref updatePanels);
Dictionary<Control, string> renderResult = new Dictionary<Control, string>();
if(CheckControlsModification) {
foreach(Control control in updatePanels) {
renderResult[control] = GetControlChildrenRenderResult(control);
}
}
ProcessAction(e.Parameter);
RaisePreRenderEvents();
RegisterClientScripts();
string cpControlsToUpdate = "";
foreach(XafUpdatePanel updatePanel in updatePanels) {
if(updatePanel != null) {
PartialRenderingEventArgs eventArgs = new PartialRenderingEventArgs(updatePanel);
if(PartialRendering != null) {
PartialRendering(this, eventArgs);
}

https://www.devexpress.com/Support/Center/Question/Details/T235942

1/2

T235942 - How to use XafCallbackManager without page flickering. | DevExpress Support Center

25-May-15

if(!eventArgs.Cancel && !updatePanel.IsRendered) {


string newRender = GetControlChildrenRenderResult(updatePanel);
if(CheckControlsModification && (!renderResult.ContainsKey(updatePanel) || renderResult
!CheckControlsModification) {
callbackControl.JSProperties["cp" + updatePanel.ClientID] = newRender;
cpControlsToUpdate += updatePanel.ClientID + ";";
}
}
}
}
if(cpControlsToUpdate.Length > 0) {
cpControlsToUpdate = cpControlsToUpdate.Substring(0, cpControlsToUpdate.Length - 1);
}
callbackControl.JSProperties[ControlsToUpdate] = cpControlsToUpdate;
callbackControl.JSProperties[pageTitle] = pageCaption;
}

As a resu lt, yo u w ill retu rn th e Ch eckCo n tro lsMo dificatio n p ro p erty in th e latest versio n s.

Show all comments

DEVEXPRESS
About Us
News
Our Awards
Upcoming Events
User Comments
Case Studies
Reviews and Publications
Licensing
Purchasing
MVP Program
Contact Us
Logos

.NET CONTROLS
WinForms
ASP.NET
MVC
WPF
Silverlight
Windows 8 XAML
CROSS PLATFORM
Reporting
Document Automation

Leave a Comment

MOBILE
DevExtreme Mobile

HTML5 JS WIDGETS
DevExtreme Web

ENTERPRISE TOOLS
Report Server
Analytics Dashboard

iOS 7
DataExplorer

FRAMEWORKS
eXpressApp Framework
CODE-DEBUG-REFACTOR
CodeRush for Visual Studio

FUNCTIONAL WEB TESTING


TestCafe
DELPHI C++BUILDER
VCL

SUPPORT
Search the Knowledge Base
My Questions
Code Examples
Getting Started
Demos
Documentation
Blogs
Training
Webinars
Current Version/Build
Version History

FOLLOW US
If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business


Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance
HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether
using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you
build and deliver your best in the shortest time possible.

Your Privacy - Legal Statements

https://www.devexpress.com/Support/Center/Question/Details/T235942

Copyright 1998-2014 Developer Express Inc.


All trademarks or registered trademarks are property of their respective owners

2/2

Vous aimerez peut-être aussi