KendoUI ChartEventBuilder DataBinding事件无法正常工作(KendoUI ChartEventBuilder DataBinding event not working)
我正在使用KendoUI MVC Complete和DataViz图表包。 我已经将DataBound事件连接起来并且触发得非常好,但我似乎无法触发DataBinding事件。
在文档中,ChartEventBuilder确实有一个DataBinding方法,我完全按照指定的方式实现它,但它永远不会得到处理。 在ChartEventBuilder.DataBinding方法详细信息的文档中,它指向dataBinding事件的javascript文档,但该锚不存在(并且dataBinding事件也不存在)!
Kendo.Mvc.UI.Fluent.ChartEventBuilder DataBinding链接在这里
...并且该页面有一个指向此页面的链接,其中dataBinding事件文档不存在kendo.dataviz.ui.Chart DataBinding链接HERE但不存在
这非常令人困惑,因为MVC扩展的这个事件显然存在,但似乎没有做任何事情。 或者 - 我做错了吗? 我希望有人能指出我一个有效的例子,因为剑道网站上的所有演示都没有在实践中显示这个Chart DataBinding事件。
I'm working with KendoUI MVC Complete and the DataViz charting package. I've got the DataBound event hooked up and firing very well, but I can't seem to get the DataBinding event to fire.
In the documentation, ChartEventBuilder does have a DataBinding method and I implement it exactly as specified but it never gets handled. In the docs for ChartEventBuilder.DataBinding method details, it points to the javascript documentation for the dataBinding event, but that anchor doesn't exist (and the dataBinding event doesn't exist either)!
Kendo.Mvc.UI.Fluent.ChartEventBuilder DataBinding link HERE
... and that page has a link that points to this page where the dataBinding event documentation doesn't exist kendo.dataviz.ui.Chart DataBinding link HERE but doesn't exist
It's very confusing since this event for the MVC extension clearly exists but doesn't seem to do anything. Or - am I doing it wrong? I'm hoping someone can point me to a working example since none of the demos on the Kendo site show this Chart DataBinding event in practice.
原文:https://stackoverflow.com/questions/18321208
最满意答案
您没有使用包含
MessageBoxIcon
参数的正确重载 :MessageBox.Show("Please fill a valid login!", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
.NET框架中没有满足您需求的内置方法,但您可以创建一个帮助方法来执行此操作:
public static class MessageBoxHelper { const string _defaultCaption = "Message"; const MessageBoxButtons _defaultButtons = MessageBoxButtons.OK; public static void Show(string message, MessageBoxIcon icon) { MessageBox.Show(message, _defaultCaption, _defaultButtons, icon); } }
You're not using the correct overload that contains the
MessageBoxIcon
parameter :MessageBox.Show("Please fill a valid login!", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
There is no built-in method in the .NET framework that satisfies your needs but you can create a helper method to do that:
public static class MessageBoxHelper { const string _defaultCaption = "Message"; const MessageBoxButtons _defaultButtons = MessageBoxButtons.OK; public static void Show(string message, MessageBoxIcon icon) { MessageBox.Show(message, _defaultCaption, _defaultButtons, icon); } }
相关问答
更多-
System.Windows.MessageBox与WPF一起添加,并存在于WPF程序集(PresentationFramework.dll)中。 System.Windows.Forms.MessageBox与Windows窗体一起添加,并存在于Windows窗体组件中。 如果你的程序是Windows窗体程序,我会使用后者( System.Windows.Forms.MessageBox ),因为它不会引入对WPF的依赖。 另一方面,如果你正在开发WPF,我会使用System.Windows.Messag ...
-
如果您想要的只是一种将cv :: String转换为System :: String的方法 ,那么这可能对您有所帮助: cv::string cvStr = "some text"; std::string str = cvStr.operator std::string(); 然后在任何你想要的地方使用str! if what you want is just a way to converting cv::String to System::String, then maybe this can he ...
-
将字符串char类型转换为System.Windows.Forms.Keys(Convert a string, char type to System.Windows.Forms.Keys)[2021-11-07]
数字和大写字母的Keys代码与相应的ASCII代码匹配。 假设你正在处理ASCII,你可以这样做: Keys key = (Keys) (byte) char.ToUpper(c); The Keys codes for the numbers and uppercase letters match the corresponding ASCII codes. Assuming you're dealing with ASCII, you can do: Keys key = (Keys) (byte) ... -
该错误是因为您将字符串传递给MessageBox.Show(),您应该传递MessageBoxButtons和MessageBoxIcon。 换句话说,你不能这样做: MessageBox.Show("Some text", "a caption", "MessageBoxButtons.AbortRetryIgnore", "MessageBoxIcon.Error"); 但是你可以这样做: MessageBox.Show("Some text", "a caption", MessageBoxButt ...
-
听起来你可能想要使用KeyPress而不是KeyDown : private void keypressed(Object o, KeyPressEventArgs e) { char key = e.KeyChar; // the character representation of the key that was pressed } 针对非字符键(如方向键和功能键)引发KeyDown 。 Sounds like you may want to use KeyPress instead o ...
-
您在窗体上有一个名为Name的TextBox控件。 这导致了冲突。 将文本框重命名为不同的内容。 WinForms开发中的一个常见约定是使用控制前缀(或后缀)。 例如文本框的txt 。 例如txtName 。 有关命名的详细信息 ,请参见此处 。 You have a TextBox control on your form that you have called Name. That is causing a conflict. Rename your text box to something dis ...
-
从Sub / void函数返回时,您必须确保堆栈为空。 Show -Method返回一个DialogResult ,因此您必须调用Pop从堆栈中删除DialogResult 。 ... ilGenerator.EmitCall(OpCodes.Call, GetType(System.Windows.Forms.MessageBox).GetMethod("Show", {GetType(String)}), {GetType(String)}) ilGenerator.Emit(OpCodes.Pop) ...
-
无法将类型'System.Windows.Forms.Control'转换为'T'(Cannot convert type 'System.Windows.Forms.Control' to 'T')[2022-01-28]
尝试这个 public T Control(String id) where T : Control { foreach (Control ctrl in MainForm.Controls.Find(id, true)) { return (T)ctrl; // Form Controls have unique names, so no more iterations needed } throw new Exception("Control not found!"); ... -
您正在尝试分配调用uc.Show();的结果 uc.Show(); 作为MouseDoubleClick事件的事件处理程序。 该方法返回void ,导致您看到的错误消息。 如果UseCase.Show的签名**与事件处理程序的预期签名匹配,您只需分配方法本身: lb.MouseDoubleClick += uc.Show; 鉴于您的评论,但看起来签名不匹配。 在这种情况下,您可以创建一个匿名事件处理程序,只需调用您要调用的方法: lb.MouseDoubleClick += (sender, e) => ...
-
您没有使用包含MessageBoxIcon参数的正确重载 : MessageBox.Show("Please fill a valid login!", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); .NET框架中没有满足您需求的内置方法,但您可以创建一个帮助方法来执行此操作: public static class MessageBoxHelper { const string _defaultCa ...