Reputation: 33784
DataTextField="Name"
DataValueField="ID_ListGroupParIzm"
???? DataValueField2="ID_Point"
is it real to load 2 values from sqlDataSource in one DropDown list ? Get structure object from sqlDataSource ?
I can see only one way - making a new table to combine ID_Point and ID_ListGroupParIzm to one ID but that's really weird.
Upvotes: 1
Views: 140
Reputation: 6440
The only reason I can see for trying to do this is so that you can use javascript to affect two other objects on the page when something is selected.
If that is the case, I would strongly suggest using css classes instead and using jQuery (or another similar framework to select them from the dom.
eg.
<div id="ctl00_point" class="point item1">Content</div>
<div id="ctl00_listgrouppartzm" class="lgpartzm item1">Content</div>
<div id="ctl01_point" class="point item2">Content</div>
<div id="ctl01_listgrouppartzm" class="lgpartzm item2">Content</div>
Now rather than trying to store "point1|listgrouppartzm1" into the value of the drop down list and then parse it out, you only have to store "item1" and you have all the information you need to find those two divs.
In jQuery, you can get them both by
$(".item1")
or individually by
$(".item1.point")
$(".item1.lgpartzm")
Upvotes: 1
Reputation: 15706
You need to combine two fields before data-binding to the dropdownlist. I think it's the only way to do it.
Upvotes: 0