如何在最后一个未使用的项目上动态添加项目到gridview? [英] How to add item dynamically into gridview on last unused item?

查看:61
本文介绍了如何在最后一个未使用的项目上动态添加项目到gridview?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望与Windows 8中的财务应用程序具有相同的效果,我可以在网格中添加新项目并跳转到网格上的下一个未使用的块。有人可以为我提供解决方案吗?

I want to have the same effect as the finance app in Windows 8 where I can add a new item into the Grid and jump to the next unused block on the grid. Can someone provide me a solution on how can this be done?

推荐答案

有没有简单的方法可以做到这一点。

There is no easy way to do this .

你能做的就是写一个
数据模板选择器
。要将GridView绑定到Collection,最后添加一个占位符对象 。在数据模板选择器中,您可以检查绑定的每个对象,并为最后一个项目选择不同的数据模板。

What you can do is write a Data Template Selector . To the Collection you are binding the GridView to , add a placeholder object in the end . In the data template selector , you can inspect each object that is getting bound and choose a different data template for the last item.


这篇关于如何在最后一个未使用的项目上动态添加项目到gridview?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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