Good day!
I have got m own class News
I've made a child class NewsForSite
public class NewsForSite : News
{
public string SitesTree;
}
NewsForSite has one more parametr - string SitesTree.
I'm making NewsForSite exemplar on base of News exemplar by coping all the parameters of News to NewsForSite and writing SitesTree string to each NewsForSite.
In debugger (you can see it at attached picture) I can see that all of paramerts of NewsForSite are in base collection and SitesTree parametr is outstanding, and when I try to bind this parametr to grid like other parmetrs, there is an empty space instead of SitesTree stings in grid. Otner columns look well.
I bind all the parametrs this way:
grUsersGroup.DataSource=newsWithSitesList; //( var newsWithSitesList = new List<NewsForSite>();)
<telerik:RadGrid ID="grUsersGroup" runat="server" >
<MasterTableView AutoGenerateColumns="False" EditMode="PopUp" DataKeyNames="Id">
<Columns>
<telerik:GridBoundColumn DataField="Id" HeaderText="ID"
SortExpression="Id" UniqueName="Id" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SitesTree" HeaderText="Где опубликована"
SortExpression="SitesTree" UniqueName="SitesTree" ReadOnly="true" AllowFiltering="true">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
what is the right way of binding of SitesTree to me?
I have got m own class News
I've made a child class NewsForSite
public class NewsForSite : News
{
public string SitesTree;
}
NewsForSite has one more parametr - string SitesTree.
I'm making NewsForSite exemplar on base of News exemplar by coping all the parameters of News to NewsForSite and writing SitesTree string to each NewsForSite.
In debugger (you can see it at attached picture) I can see that all of paramerts of NewsForSite are in base collection and SitesTree parametr is outstanding, and when I try to bind this parametr to grid like other parmetrs, there is an empty space instead of SitesTree stings in grid. Otner columns look well.
I bind all the parametrs this way:
grUsersGroup.DataSource=newsWithSitesList; //( var newsWithSitesList = new List<NewsForSite>();)
<telerik:RadGrid ID="grUsersGroup" runat="server" >
<MasterTableView AutoGenerateColumns="False" EditMode="PopUp" DataKeyNames="Id">
<Columns>
<telerik:GridBoundColumn DataField="Id" HeaderText="ID"
SortExpression="Id" UniqueName="Id" ReadOnly="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SitesTree" HeaderText="Где опубликована"
SortExpression="SitesTree" UniqueName="SitesTree" ReadOnly="true" AllowFiltering="true">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
what is the right way of binding of SitesTree to me?