在数据网格中选择自定义 itemrenderer 的后续问题 [英] follow up question problem with selecting a custom itemrenderer in a datagrid

查看:23
本文介绍了在数据网格中选择自定义 itemrenderer 的后续问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发布了两个关于自定义 itemRenderer 的问题 看到这个发布.我的主要问题是,它总是选择错误的行(在我选择的行之下).我现在意识到当我将 itemRenderer 的内容保存回 dataProvider 时会发生这种情况.如果我将这部分编码出来,dataGrid 会按预期工作...

I have posted two problems with a custom itemRenderer see this post. My primary Problem is, that it always selects a wrong line (one under the one I select). I now realized that this happens, when I save back the content of the itemRenderer to the dataProvider. If I code this part out, the dataGrid works as expected...

这对你有意义吗?

谢谢马库斯

推荐答案

这可能不是问题,但我建议在 createChildren 方法中添加子项,如下所示:

This is probably not the problem, but I would recommend adding children in the createChildren method, like this:

override protected function createChildren() : void {
            correctAnswer = new CheckBox();
            addChild(correctAnswer);            
            choiceLabel = new Label();
            addChild(choiceLabel);      

}

这篇关于在数据网格中选择自定义 itemrenderer 的后续问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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