单选按钮列表-在项目中一起显示2个字段 [英] radiobuttonlist - display 2 fields together in items

查看:57
本文介绍了单选按钮列表-在项目中一起显示2个字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我有一个单选按钮列表,它是数据绑定的.我想在此显示商品名称及其价格.当我使用查询组合这些字段时,它显示有关数据类型不匹配的错误.Itemname在varchar中,而价格在float中.有什么方法可以同时显示这两个字段.
我想这样显示:
产品名称(Rs.100)

谢谢....

Hi I have a radiobuttonlist which is databinded. I want to display an item name and its price in this. when I combine these fields using query, it shows an error regarding datatype mismatch.Itemname is in varchar and price is in float. Is there any method to display these 2 fields together.
I want to display like this:
Itemname(Rs.100)

Thank you....

推荐答案

Neha,您是否改进了您的问题或完全更改了它?如果您有新查询,请发布新问题.你想知道为什么吗?

因为其他用户提供的所有三种解决方案现在都脱离了上下文.这会使将这个帖子用于相同查询的人们感到困惑.我要求您发布一个新问题.
Neha, did you improved your question or changed it entirely? if you have new query pls pls pls post a new question. Do you want to know why so?

Because all three solutions provided by other users are looking out of context now. this will confuse people who will refer this post for the same query. I request you to post a new question.


是的,它将显示错误.如果尝试添加/连接两个不同的数据类型值,则会抛出数据类型不匹配错误.

我建议您在连接之前将项目价格转换为字符串格式.您可以使用 JavaScript toString() [
Yes, it''ll show the error. If you''ll try to add/concatenate two different data types values it''ll throw data type mismatch error.

I would suggest you to convert your item price in string format before concatenating it. You can use Javascript toString()[^] function to convert the values in string format..

  --Amit


有两个属性
SelectedValue和SelectedItems

您可以使用这两个中的任何一个.
There are two properties
SelectedValue and SelectedItems

you can use any of these two.


这篇关于单选按钮列表-在项目中一起显示2个字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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