Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple DataKeys in DataGrid 2

Status
Not open for further replies.

ietprofessional

Programmer
Apr 1, 2004
267
US
Is it possible to have multiple values in a datakey, maybe an array? For example, could you put the customerid and customerphonenumber in the datakey, so that you could retrieve these values?

Thanks,
Harold
 
one thought would be to create a composite key of the 2 fields with some sort of seperator. when you retrieve the key you would need to prase out the fields.

another option would be to put one field in the datakey object and the other as a hidden field in the datagrid.1 of the fields for the composite field would be visible in the source of the page, but you wouldn't need to parse the key.

Jason Meckley
Database Analyst
WITF
 
You can have a hidden column with a label in it to save the second key in it. Framework 2.0 should have a fix for multiple datakyes in the grid control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top