Hello,
I have a multi-part question.
Part 1: I have a listbox on a user control that I need to display a
particular property of a custom object in for each object in an IList.
(I know... huh?) Here is the idea with some pseudo
-code.
I have a method that returns an IList<CustomObj>. The CustomObj looks
like the following:
[Serializable]
public class CustomObj
{
protected int _objId;
protected int _createByUserId;
protected DateTime _createDate;
protected DateTime _lastModifyDate;
protected int _lastModifyUserId;
protected string _objName;
public CustomObj();
[XmlElement(ElementName = "ObjId")]
public int ObjId { get; set; }
[XmlElement(ElementName = "CreateByUserId")]
public int CreateByUserId { get; set; }
[XmlElement(ElementName = "CreateDate")]
public DateTime CreateDate { get; set; }
[XmlElement(ElementName = "LastModifyDate")]
public DateTime LastModifyDate { get; set; }
[XmlElement(ElementName = "LastModifyUserId")]
public int LastModifyUserId { get; set; }
[XmlElement(ElementName = "ObjName")]
public string ObjName { get; set; }
public enum ObjFieldEnum
{
CreateDate = 1,
LastModifyDate = 2,
ObjName = 3,
ObjId = 4,
CreateByUserId = 5,
LastModifyUserId = 6,
}
}
I first need to bind my listbox.datatextfield to the CustomObj.ObjName
field. Which I believe I have accomplished but would be interested in
some feedback.
Secondly, and more importantly. I need to take all items that have
been selected in the listbox and extract the associated ObjId for
those items. This is where I have gotten stuck.
Any advice would be greatly appreciated.
Thanks in advance.
rbr
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---