ultrawebgrid下拉栏问题

发布于 2024-07-23 22:39:29 字数 138 浏览 10 评论 0原文

您好,我已将下拉列表添加到 Ultra Web 网格列,并将下拉列表中选择的值保存到数据库中 当我尝试检索数据并显示数据时,它显示下拉列表的值而不是文本,例如 4001 - 销售,它显示 4001 而不是销售,我想在下拉列表中显示销售文本 如何实现这一目标

hi i have added the drop down list to the ultra web grid column and saved the value selected in the drop down to the database
and when i try to retrieve the data and display the data its showing the value of the dropdown not the text e.g. 4001 - sales it is showing 4001 not sales i want to show the sales text in the drop down
how to achieve this

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

赏烟花じ飞满天 2024-07-30 22:39:30

我遇到了类似的问题,我有一个网格,当我单击“添加”按钮添加新行时,现有行将在下拉列表中显示 ID,而不是显示文本。 解决这个问题的方法是将下拉列上的 DataType 设置为 ID 的类型(在我的例子中为 System.Int32)。 希望有帮助。

I had a similar problem where I had a grid and when I clicked an "Add" button to add a new row, the existing rows would show the ID in the drop downs instead of the Display Text. What fixed it was to set the DataType on the drop down column to the type of the ID (in my case, System.Int32). Hope that helps.

话少心凉 2024-07-30 22:39:30

此代码对我有用:

ultraGridValueList.ValueListItems.Add("ValueMemeber1", "DisplayMemeber1");
ultraGridValueList.ValueListItems.Add("ValueMemeber2", "DisplayMemeber2");
ultraGridValueList.ValueListItems.Add("ValueMemeber3", "DisplayMemeber3");
ultraGridValueList.ValueListItems.Add("ValueMemeber4", "DisplayMemeber4");

ultraGrid1.DisplayLayout.Bands[0].Columns["myDropDownCol"].ValueList = ultraGridValueList;

This code works for me:

ultraGridValueList.ValueListItems.Add("ValueMemeber1", "DisplayMemeber1");
ultraGridValueList.ValueListItems.Add("ValueMemeber2", "DisplayMemeber2");
ultraGridValueList.ValueListItems.Add("ValueMemeber3", "DisplayMemeber3");
ultraGridValueList.ValueListItems.Add("ValueMemeber4", "DisplayMemeber4");

ultraGrid1.DisplayLayout.Bands[0].Columns["myDropDownCol"].ValueList = ultraGridValueList;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文