如何在DevExpress中使用回调 [英] How to use callback in DevExpress

查看:94
本文介绍了如何在DevExpress中使用回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是使用DevExpress的新手,首先感谢您查看我的问题。



这是我的问题:





我创建了一个ASPxButton来隐藏/显示一个panelgraph,这里是我写的代码:

Hi, I''m new in using DevExpress, thank you first of all for checking my question.

Here is my problem:


I created a ASPxButton​ to hide/show a panelgraph, here are codes that I wrote:

<dx:ASPxButton ID="btHideShowChart"  runat="server" Text="Hide the chart" 
                                                                             önclick="btHideShowChart_Click" >
                                                                           <ClientSideEvents Click="function(s, e) {
                                                                                if(s.GetText().toString()== ''Hide the chart''){
	                                                                            callbackPanelGraph.SetVisible(false);
	                                                                            }
	                                                                            else{
	                                                                            callbackPanelGraph.SetVisible(true);
	                                                                            }
                                                                            }" />



同时,我写道:




at the same time, I wrote :

protected void btHideShowChart_Click(object sender, EventArgs e)
        {
            if (btHideShowChart.Text.ToString() == "Hide the chart")
            {
                btHideShowChart.Text = "Show the chart";
                return;
            }
            if (btHideShowChart.Text.ToString() == "Show the chart")
            {
                btHideShowChart.Text = "Hide the chart";
                return;
            }
        }





它运作良好。但现在,我希望一旦图表被隐藏,旁边另一个Panel的宽度可能会比以前更大。 (有两个对齐的面板:我想要显示/隐藏的panelChart和panelDetail,当panelChart被隐藏时,我想让它更大。)



我试过回调..但它不起作用....





谢谢非常有帮助!!



it does work well. But now, I''d like that once the chart is hidden, the width of another Panel beside​ could be bigger than before. ( There are two panels which are aligned: panelChart which I''d like to show/hide and panelDetail which I''d like to make it bigger when the panelChart is hidden. )

I''d tried callback..but it doesn''t work....


thank you so much for helping!!​

推荐答案

http: //demos.devexpress.com/aspxperiencedemos/callbackpanel/example.aspx [ ^ ]



这里给出了最简单的方法
http://demos.devexpress.com/aspxperiencedemos/callbackpanel/example.aspx[^]

See easiest way is given here


这篇关于如何在DevExpress中使用回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆