-
William Corry
21
posts
Member since:
Feb 2009
Posted 25 Mar 2009
Link to this post
I have created a usercontrol to edit the values on a RadGrid. One of the fields on the grid is stored in the database as a comma separated string. In order to allow the user to change the stored values for this field, a multiselect listbox has been placed on the usercontrol. Currently I use the edit event to store the currentvalues in this field in a session variable. Then on the databound event, I retrieve the value from the session variable, parse them and select the appropriate rows in the listbox to show what the past values were. The code works but I was wondering if there was any way to use the bind statement to effect the same end? If there is only one value to be selected the bind will work but if more than one value is to be selected I don't know of or how the bind statement would work.
-
-
2040
posts
Member since:
Aug 2005
Posted 26 Mar 2009
Link to this post
Hello William-
As far as I know, you cannot declaratively use the ASP.NET Bind() syntax to do two-way binding with multiple fields. According to what I can find in some quick research, too, the only supported formats for Bind() are:
Bind("field") and Bind("field", "format string {0}")
I think the code-behind solution that's working for you now is the correct approach for this scenario. Hope that helps!
-Todd
-
-
Do Xuan
16
posts
Member since:
Aug 2011
Posted 05 May 2013
Link to this post
i can't understand Bind("field", "format string {0}"). can you go to the details, plz!
-
-
-