Click here to Skip to main content
15,890,282 members
Home / Discussions / C#
   

C#

 
GeneralRe: Querying Active Directory Pin
soup198319-Dec-06 12:58
soup198319-Dec-06 12:58 
GeneralRe: Querying Active Directory Pin
neonoid1620-Dec-06 8:06
neonoid1620-Dec-06 8:06 
QuestionI Need Your Suggestions Pin
kifahhk18-Dec-06 11:23
kifahhk18-Dec-06 11:23 
AnswerRe: I Need Your Suggestions Pin
led mike18-Dec-06 11:46
led mike18-Dec-06 11:46 
AnswerRe: I Need Your Suggestions Pin
Colin Angus Mackay18-Dec-06 12:54
Colin Angus Mackay18-Dec-06 12:54 
QuestionUndo Pin
netJP12L18-Dec-06 10:28
netJP12L18-Dec-06 10:28 
AnswerRe: Undo Pin
User 665818-Dec-06 10:35
User 665818-Dec-06 10:35 
QuestionDataGridView binding custom properties Pin
Wjousts18-Dec-06 8:50
Wjousts18-Dec-06 8:50 
I wanted to bind a collect to a DataGridView, but the objects in the collection are collections themselves. Ideally, I'd like the objects in the later collection to be displayed as rows in the table and I thought I might be able to do that using the ITypedList interface and a custom PropertyDescriptor class. I came up with something like this for my GetItemProperties implementation:
public PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors)
{
    PropertyDescriptor[] properties = new PropertyDescriptor[myCollection.Count];
    for (int i = 0; i < myCollection.Count; i++)
    {
        properties[i] = new MyPropertyDescriptor(i.ToString(), i);
    }
    return new PropertyDescriptorCollection(properties);
}


MyPropertyDescriptor uses the index in the collection as a name for the property and also stores the index so I can recall the value.
Now to add a column to the collection in the DataGridView I do this:

design.Channels[0].Add(0);
DataGridViewTextBoxColumn dgvtbc = new DataGridViewTextBoxColumn();
dgvtbc.DataPropertyName = "0";
dgvtbc.HeaderText = "0";
dgvtbc.Name = "0";
dgvLevels.Columns.Add(dgvtbc);


This adds the column, but it doesn't appear to actually be bound to the data source because if I can the value in column 0, the corresponding item in the collection isn't changing. Does anybody have any idea if this can be made to work? Am I barking up the wrong tree?

Thanks
QuestionConvert HTML string to HtmlDocument Pin
zaboboa18-Dec-06 7:53
zaboboa18-Dec-06 7:53 
AnswerRe: Convert HTML string to HtmlDocument Pin
JMummery3-Dec-12 0:30
professionalJMummery3-Dec-12 0:30 
QuestionGet the appdomain by its friendly name. Pin
Prasadrn18-Dec-06 7:33
Prasadrn18-Dec-06 7:33 
QuestionASP.Net Question. Pin
hdv21218-Dec-06 6:48
hdv21218-Dec-06 6:48 
AnswerRe: ASP.Net Question. Pin
Prasadrn18-Dec-06 7:38
Prasadrn18-Dec-06 7:38 
GeneralRe: ASP.Net Question. Pin
hdv21218-Dec-06 8:50
hdv21218-Dec-06 8:50 
QuestionDataGridView - dragging multiple items with left mouse button Pin
Patrick Etc.18-Dec-06 5:52
Patrick Etc.18-Dec-06 5:52 
QuestionIssues with Converting IDataReader to DataSet Pin
DeepToot18-Dec-06 5:37
DeepToot18-Dec-06 5:37 
AnswerRe: Issues with Converting IDataReader to DataSet Pin
Colin Angus Mackay18-Dec-06 5:52
Colin Angus Mackay18-Dec-06 5:52 
GeneralRe: Issues with Converting IDataReader to DataSet Pin
DeepToot18-Dec-06 6:13
DeepToot18-Dec-06 6:13 
QuestionHow to create different versions/configurations in VS2005 Pin
frozenpondlife18-Dec-06 5:06
frozenpondlife18-Dec-06 5:06 
AnswerRe: How to create different versions/configurations in VS2005 Pin
ednrgc18-Dec-06 5:34
ednrgc18-Dec-06 5:34 
GeneralRe: How to create different versions/configurations in VS2005 Pin
frozenpondlife18-Dec-06 5:53
frozenpondlife18-Dec-06 5:53 
AnswerRe: How to create different versions/configurations in VS2005 Pin
Daniel Grunwald18-Dec-06 5:48
Daniel Grunwald18-Dec-06 5:48 
Questioni want code for authentication's to connect remote computer Pin
haneef118-Dec-06 4:29
haneef118-Dec-06 4:29 
AnswerRe: i want code for authentication's to connect remote computer Pin
ednrgc18-Dec-06 5:35
ednrgc18-Dec-06 5:35 
QuestionHow to Connect remoter computer i am getting exception error for remote as well as local computer Pin
haneef118-Dec-06 4:24
haneef118-Dec-06 4:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.