-
Nov 5th, 2014, 12:30 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Is there a way to store a custom object in a DataRow or DataColumn?
Is there a way to store a custom object in a DataRow or DataColumn?
Basically I'm looking for the equivalent of a tag property for a DataRow or DataColumn. I looked into ExtendedProperties for the DataColumn but you can only store strings there.
Code:
drNewPathRow = dsOutputGrid.Tables("dtPathElements").Rows.Add()
elm = pth.Elements(iElements)
drNewPathRow(0) = elm.Name
' drNewPathRow.tag = elm .... I wish!
_____________
Tim
If anyone's answer has helped you, please show your appreciation by rating that answer.
When you get a solution to your issue remember to mark the thread Resolved.
reference links
-
Nov 5th, 2014, 12:38 PM
#2
Re: Is there a way to store a custom object in a DataRow or DataColumn?
You can extend the properties of a datagridview not sure about colums
-
Nov 5th, 2014, 12:43 PM
#3
Thread Starter
Addicted Member
Re: Is there a way to store a custom object in a DataRow or DataColumn?
I appreciate the input but I really need to attach the object directly to the datarow or datacolumn object versus accessing the datagrid ( in this case an infragistics ultragrid )
_____________
Tim
If anyone's answer has helped you, please show your appreciation by rating that answer.
When you get a solution to your issue remember to mark the thread Resolved.
reference links
-
Nov 5th, 2014, 12:59 PM
#4
Re: Is there a way to store a custom object in a DataRow or DataColumn?
While this may not be a solution that you'd want to hear, you could create a List of whatever object it is that you're wanting to store and have that coordinate with your columns/rows. Any time you adjust the column/row collection, you'd adjust it's List.
-
Nov 5th, 2014, 01:25 PM
#5
Re: Is there a way to store a custom object in a DataRow or DataColumn?
You could add a column of type object to the datatable,
Code:
dt.Columns.Add("objCol", GetType(Object))
-
Nov 5th, 2014, 01:57 PM
#6
Thread Starter
Addicted Member
Re: Is there a way to store a custom object in a DataRow or DataColumn?
wes4dbt , The answer I was hoping for, didn't know you could do that. thanks.
Last edited by thetimmer; Nov 5th, 2014 at 04:03 PM.
_____________
Tim
If anyone's answer has helped you, please show your appreciation by rating that answer.
When you get a solution to your issue remember to mark the thread Resolved.
reference links
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|