简体   繁体   English

Ext.js网格中的自定义编辑器

[英]Custom Editors in an Ext.js Grid

So this is my first time posting here but I'm more or less stumped. 所以这是我第一次在这里发帖,但我或多或少地感到困惑。 Basically what I have is an ext grid that loads a bunch of data. 基本上,我拥有的是一个ext网格,可以加载大量数据。 Among these columns are all these date fields. 这些列中包括所有这些日期字段。 Start, Finish, Etc. I'm trying to create a date picker to edit these columns. 开始,完成等,我正在尝试创建日期选择器来编辑这些列。 I've experimented with the different ext component editors and I was able to hack together something that mostly worked but what I would really prefer is a way to use my own custom date picker or even better a third party solution like the JQuery UI date picker. 我已经尝试了不同的ext组件编辑器,并且可以一起破解大部分可以工作的东西,但我真正希望使用的是使用自己的自定义日期选择器或更好的第三方解决方案(如JQuery UI日期选择器)的方法。

Neither extending nor overriding the editor seemed to do the trick. 扩展或覆盖编辑器似乎都无法解决问题。 I'm not so much looking for code but more whether this is even possible with ext and if so maybe to be pointed in the right direction. 我不是在寻找代码,而是在寻找是否甚至可以使用ext,如果可以的话,也可以将其指向正确的方向。 So has anyone ran into a similar problem? 那么有人遇到过类似的问题吗? Thanks in advance. 提前致谢。

It seems to me that it would be fairly straight forward to extend Ext.form.field.Picker and use the jQuery date picker as the picker part. 在我看来,扩展Ext.form.field.Picker并将jQuery日期选择器用作选择器部分将是相当直接的。 I've wrapped the FCK editor in an Ext component and it was very easy to do. 我将FCK编辑器包装在Ext组件中,这很容易做到。 Picker involves a few more moving parts, but I think it's worth a try. Picker涉及更多活动部件,但我认为值得尝试。

That being said, the idea of picking a few parts of ExtJS to use in a non-Ext app and then trying to marry other things into Ext is going to be painful. 话虽这么说,选择ExtJS的一部分以在非Extt应用程序中使用,然后尝试将其他东西结合到Ext中的想法将很痛苦。 I strongly advise fully embracing ExtJS and then choosing very carefully where you stray away. 我强烈建议完全拥抱ExtJS,然后非常谨慎地选择您所处的位置。 Another approach might be to use a different grid system (sorry Evan) that plays nicer with jQuery. 另一种方法可能是使用与jQuery配合使用更好的其他网格系统(对不起,Evan)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM