Click here to Skip to main content
15,922,584 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionDeleting Multiple checked rows from DataGridView with DataGridViewCheckboxColumn Pin
aspnet2.developer7-Jul-08 22:20
aspnet2.developer7-Jul-08 22:20 
AnswerRe: Deleting Multiple checked rows from DataGridView with DataGridViewCheckboxColumn Pin
Ashfield7-Jul-08 23:50
Ashfield7-Jul-08 23:50 
QuestionHow to close the parentwindow without closing child window in windows applications Pin
Member 38720757-Jul-08 20:50
Member 38720757-Jul-08 20:50 
AnswerRe: How to close the parentwindow without closing child window in windows applications Pin
N a v a n e e t h7-Jul-08 23:04
N a v a n e e t h7-Jul-08 23:04 
QuestionIntegrate desktop application with browser??? Pin
Technobizz7-Jul-08 17:53
Technobizz7-Jul-08 17:53 
AnswerRe: Integrate desktop application with browser??? Pin
N a v a n e e t h7-Jul-08 23:06
N a v a n e e t h7-Jul-08 23:06 
QuestionPopulating a treeview on bases of selected node Pin
sam128747-Jul-08 8:14
sam128747-Jul-08 8:14 
QuestionDatabound column doesn't see inherited interface properties Pin
Joby17-Jul-08 6:08
Joby17-Jul-08 6:08 
I am data binding a DataGridView to a BindingList<t> where the type of the list's items "T" is an interface. Ex:
public class TowerList : BindingList< ITower >

The "ITower" interface descends from a base interface called "IModule" which has two properties, "PartNumber" & "PartDescription".
public interface IModule
{
    string PartNumber { get; }
    string PartDescription{ get; }
}

public interface ITower : IModule
{
    double Height { get; }
}

When I data bind a TowerList object to a DataGridView, and set the "DataPropertyName" of a column to "PartNumber" or "PartDescription", it seems that the data binding mechanism does NOT see the "PartNumber" and "PartDescription" properties which are inherited from the base "IModule" interface. The result is that the part number and part description strings do not show up in the grid.

If I "redeclare" the "PartNumber" and "PartDescription" properties directly in the "ITower" interface itself, then the data binding works and the part number and part description strings show up in the grid. Here is the new "ITower" interface:
public interface ITower : IModule
{
    double Height { get; }
    new string PartNumber { get; }
    new string PartDescription{ get; }
}

I know that if the list contained a set of regular object references (such as a "Tower" object) and not a list of "ITower" interfaces that the data binding would work and the inherited "PartNumber" and "PartDescription" properties would been "seen" by the data binding infrastructure. But.... I'm not sure why the "PartNumber" and "PartDescription" properties are not seen when the items in the list are interfaces. Any advice? Thank you for your help. Joby
AnswerRe: Databound column doesn't see inherited interface properties Pin
darkelv7-Jul-08 6:18
darkelv7-Jul-08 6:18 
GeneralRe: Databound column doesn't see inherited interface properties Pin
Joby17-Jul-08 7:50
Joby17-Jul-08 7:50 
GeneralRe: Databound column doesn't see inherited interface properties Pin
Paul Fuller23-Jul-08 9:31
Paul Fuller23-Jul-08 9:31 
GeneralRe: Databound column doesn't see inherited interface properties Pin
Joby124-Jul-08 4:21
Joby124-Jul-08 4:21 
AnswerRe: Databound column doesn't see inherited interface properties Pin
Paul Fuller24-Jul-08 6:15
Paul Fuller24-Jul-08 6:15 
QuestionData-bound DataGridView adds bogus empty row Pin
JustinInGwinnett7-Jul-08 2:47
JustinInGwinnett7-Jul-08 2:47 
Questionhow to stop the UPLOADING a file, or SAVING a file in middle by clicking cancel event. Pin
balaji_vbr6-Jul-08 18:38
balaji_vbr6-Jul-08 18:38 
AnswerRe: how to stop the UPLOADING a file, or SAVING a file in middle by clicking cancel event. Pin
Christian Graus6-Jul-08 18:56
protectorChristian Graus6-Jul-08 18:56 
AnswerRe: how to stop the UPLOADING a file, or SAVING a file in middle by clicking cancel event. Pin
N a v a n e e t h6-Jul-08 19:13
N a v a n e e t h6-Jul-08 19:13 
QuestionCustom DataBinding Question [modified] Pin
David Henry6-Jul-08 10:01
David Henry6-Jul-08 10:01 
AnswerRe: Custom DataBinding Question Pin
darkelv6-Jul-08 16:10
darkelv6-Jul-08 16:10 
GeneralRe: Custom DataBinding Question Pin
David Henry6-Jul-08 22:44
David Henry6-Jul-08 22:44 
GeneralRe: Custom DataBinding Question Pin
darkelv6-Jul-08 23:24
darkelv6-Jul-08 23:24 
GeneralRe: Custom DataBinding Question Pin
David Henry6-Jul-08 23:48
David Henry6-Jul-08 23:48 
GeneralRe: Custom DataBinding Question Pin
darkelv7-Jul-08 3:22
darkelv7-Jul-08 3:22 
AnswerRe: Custom DataBinding Question Pin
David Henry9-Jul-08 22:57
David Henry9-Jul-08 22:57 
Questionhow to implement recording sound in .net Pin
Ashok Nalam5-Jul-08 0:42
Ashok Nalam5-Jul-08 0:42 

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.