Assign data value in GridView Template
-
I'm trying to assign a data value in a gridview template during the databind operation. I've replaced the Bind("column_name") with a custom function. In that function, I want to take one of the values from the datatable's rowset (a vendor number) and lookup the name for that vendor returning that as a string. The following code is what I am trying to accomplish.
-
I'm trying to assign a data value in a gridview template during the databind operation. I've replaced the Bind("column_name") with a custom function. In that function, I want to take one of the values from the datatable's rowset (a vendor number) and lookup the name for that vendor returning that as a string. The following code is what I am trying to accomplish.
First of all.... you're going to want to close your tag there... it should say And.... why not just select the vendor name to begin with? Why go through the extra step of converting a vendor number?
-
First of all.... you're going to want to close your tag there... it should say And.... why not just select the vendor name to begin with? Why go through the extra step of converting a vendor number?
The closing tag is probably just an error when copying and editing the code in my post. The vendor name is coming from a different database so I can't include the name in the select statement. Excellent question though!
-
The closing tag is probably just an error when copying and editing the code in my post. The vendor name is coming from a different database so I can't include the name in the select statement. Excellent question though!
Hampden Tech wrote:
The vendor name is coming from a different database so I can't include the name in the select statement.
If you have a data access layer that provides the resultsets appropriate for the presentation layer you won't have this problem.
only two letters away from being an asset