| Home | Forums | Reviews | Guides | Newsgroups | Register | Search |
![]() |
| Thread Tools |
| mato |
|
|
|
| |
|
Alessandro Zifiglio
Guest
Posts: n/a
|
hi mato, the reason you are unable to bind to the datalist when it is a
child control is because you "It is a childcontrol to pageview, either you get a reference to your datalist through page view using the fincontrol method or just simply add your datalist to a usercontrol and do the binding in your usercontrols code behind. And then add your usercontrol as a childcontrol to pageview. This way you get direct access to your datalist from the usercontrols codebehind directly. Also simplifies a lot of things for you. "mato" <> wrote in message news:... > hello! > i have this problem. i put datalist control under pageview, and the same > datalist on the page. > when it is placed under pageview, it does not bind, on the page works fine. > > this is piece of my aspx code. > > .... > <iewc:Multipage id="someId" runat="server" ... > > <iewc > <cc1:CategoryTreeView id="categoryTree" runat="server" > > </cc1:CategoryTreeView> > </iewc > <iewc > <asp > <ItemTemplate> > <cc1 > runat="server" PropertySessionId='<%# > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' Expanded="true" > PropertyGroupName='<%# > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > </cc1 > </ItemTeplate> > </asp > </iewc > > <asp > <ItemTemplate> > <cc1 > runat="server" PropertySessionId='<%# > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' Expanded="true" > PropertyGroupName='<%# > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > </cc1 > </ItemTeplate> > </asp > > ...... > > > c# page behind code. > public class MyWebPage : System.Web.UI.Page > { > .... > private void MyWebPage_PageLoad(object sender, System.EventArgs e) > { > BindDataList(); > } > > private void BindDataList() > { > System.Data.DataView _view = CreateDataSource(); > data1.DataSource = _view; > data1.DataBind(); > > data2.DataSource = _view; > data2.DataBind(); > } > .... > } > > c# custom control code: > public class PropertyGroupName : System.Web.UI.WebControls.DataList > { > .... > > [ System.ComponentModel.Bindable( true ) ] > public PropertySessionId > { > get > { > ... > } > set > { > ... > } > } > > [ System.ComponentModel.Bindable( true ) ] > public PropertyGroupName > { > get > { > ... > } > set > { > ... > } > } > .... > } > > > thank you for any comment, suggestion, help, opinion, anything > > |
|
|
|
|
|||
|
|||
| Alessandro Zifiglio |
|
|
|
| |
|
mato
Guest
Posts: n/a
|
hello alessandro.
thank you for your interest. my problem is not that i can not get reference to datalist. the problem is in binding. let me explain, how i create this control hierarchy ( every step is in design time ): 1. i put multipage control from toolbar at design time. 2. then i add 2 pages. 3. on first page i add my first custom control ( CategoryTreeView ) 4. on second page i add asp net dataList control 5. on page i add my second custom control ( PropertyGroupDataList ) 6. then i create some dataBinding to 2 properties on PropertyGroupDataList ( PropertySessionId and PropertyGroupName ) 7. then i start template editing of items on dataList control 8. add my custom PropertyGroupDataList with dataBindings to item template 9. stop template editig now i added some behind code. like createDataView ( create table, add two columns, then add some rows with values set ). then do DataBind() on dataList. The problem is that if i put this dataList under PageView it does not bind to PropertySessionId and PropertyGroupName properties. when it is placed on the page ( the same control, the same bindings ) it works fine. but maybe i misunderstand what you wrote. "Alessandro Zifiglio" <> wrote in message news:1S4Zb.9181$... > hi mato, the reason you are unable to bind to the datalist when it is a > child control is because you "It is a childcontrol to pageview, either you > get a reference to your datalist through page view using the fincontrol > method or just simply add your datalist to a usercontrol and do the binding > in your usercontrols code behind. And then add your usercontrol as a > childcontrol to pageview. This way you get direct access to your datalist > from the usercontrols codebehind directly. Also simplifies a lot of things > for you. > > "mato" <> wrote in message > news:... > > hello! > > i have this problem. i put datalist control under pageview, and the same > > datalist on the page. > > when it is placed under pageview, it does not bind, on the page works > fine. > > > > this is piece of my aspx code. > > > > .... > > <iewc:Multipage id="someId" runat="server" ... > > > <iewc > > <cc1:CategoryTreeView id="categoryTree" runat="server" > > > </cc1:CategoryTreeView> > > </iewc > > <iewc > > <asp > > <ItemTemplate> > > <cc1 > > runat="server" PropertySessionId='<%# > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > Expanded="true" > > PropertyGroupName='<%# > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > </cc1 > > </ItemTeplate> > > </asp > > </iewc > > > > <asp > > <ItemTemplate> > > <cc1 > > runat="server" PropertySessionId='<%# > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > Expanded="true" > > PropertyGroupName='<%# > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > </cc1 > > </ItemTeplate> > > </asp > > > > ...... > > > > > > c# page behind code. > > public class MyWebPage : System.Web.UI.Page > > { > > .... > > private void MyWebPage_PageLoad(object sender, System.EventArgs e) > > { > > BindDataList(); > > } > > > > private void BindDataList() > > { > > System.Data.DataView _view = CreateDataSource(); > > data1.DataSource = _view; > > data1.DataBind(); > > > > data2.DataSource = _view; > > data2.DataBind(); > > } > > .... > > } > > > > c# custom control code: > > public class PropertyGroupName : System.Web.UI.WebControls.DataList > > { > > .... > > > > [ System.ComponentModel.Bindable( true ) ] > > public PropertySessionId > > { > > get > > { > > ... > > } > > set > > { > > ... > > } > > } > > > > [ System.ComponentModel.Bindable( true ) ] > > public PropertyGroupName > > { > > get > > { > > ... > > } > > set > > { > > ... > > } > > } > > .... > > } > > > > > > thank you for any comment, suggestion, help, opinion, anything > > > > > > |
|
|
|
|
|||
|
|||
| mato |
|
Alessandro Zifiglio
Guest
Posts: n/a
|
Ok, just tested and i were under the impression that the multipage control
behaved like the datalist, datagrid and repeater controls in that they supplied their own naming scheme to child controls but this is not so. Please ignore my earlier post ;P I have just run a small test and I've been able to bind a datalist successfully, within a multipage control that is, so the problem remains within your custom control. You've also stated that this has worked nicely when not contained within the multipage control. At this point i have no idea why it is not working for you ;P "mato" <> wrote in message news:... > hello alessandro. > thank you for your interest. > my problem is not that i can not get reference to datalist. the problem is > in binding. > let me explain, how i create this control hierarchy ( every step is in > design time ): > 1. i put multipage control from toolbar at design time. > 2. then i add 2 pages. > 3. on first page i add my first custom control ( CategoryTreeView ) > 4. on second page i add asp net dataList control > 5. on page i add my second custom control ( PropertyGroupDataList ) > 6. then i create some dataBinding to 2 properties on > PropertyGroupDataList ( PropertySessionId and PropertyGroupName ) > 7. then i start template editing of items on dataList control > 8. add my custom PropertyGroupDataList with dataBindings to item > template > 9. stop template editig > > now i added some behind code. like createDataView ( create table, add two > columns, then add some rows with values set ). > then do DataBind() on dataList. The problem is that if i put this dataList > under PageView it does not bind to PropertySessionId and PropertyGroupName > properties. when it is placed on the page ( the same control, the same > bindings ) it works fine. > > but maybe i misunderstand what you wrote. > > "Alessandro Zifiglio" <> wrote in > message news:1S4Zb.9181$... > > hi mato, the reason you are unable to bind to the datalist when it is a > > child control is because you "It is a childcontrol to pageview, either you > > get a reference to your datalist through page view using the fincontrol > > method or just simply add your datalist to a usercontrol and do the > binding > > in your usercontrols code behind. And then add your usercontrol as a > > childcontrol to pageview. This way you get direct access to your datalist > > from the usercontrols codebehind directly. Also simplifies a lot of things > > for you. > > > > "mato" <> wrote in message > > news:... > > > hello! > > > i have this problem. i put datalist control under pageview, and the same > > > datalist on the page. > > > when it is placed under pageview, it does not bind, on the page works > > fine. > > > > > > this is piece of my aspx code. > > > > > > .... > > > <iewc:Multipage id="someId" runat="server" ... > > > > <iewc > > > <cc1:CategoryTreeView id="categoryTree" runat="server" > > > > </cc1:CategoryTreeView> > > > </iewc > > > <iewc > > > <asp > > > <ItemTemplate> > > > <cc1 > > > runat="server" PropertySessionId='<%# > > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > > Expanded="true" > > > PropertyGroupName='<%# > > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > > </cc1 > > > </ItemTeplate> > > > </asp > > > </iewc > > > > > > <asp > > > <ItemTemplate> > > > <cc1 > > > runat="server" PropertySessionId='<%# > > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > > Expanded="true" > > > PropertyGroupName='<%# > > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > > </cc1 > > > </ItemTeplate> > > > </asp > > > > > > ...... > > > > > > > > > c# page behind code. > > > public class MyWebPage : System.Web.UI.Page > > > { > > > .... > > > private void MyWebPage_PageLoad(object sender, System.EventArgs e) > > > { > > > BindDataList(); > > > } > > > > > > private void BindDataList() > > > { > > > System.Data.DataView _view = CreateDataSource(); > > > data1.DataSource = _view; > > > data1.DataBind(); > > > > > > data2.DataSource = _view; > > > data2.DataBind(); > > > } > > > .... > > > } > > > > > > c# custom control code: > > > public class PropertyGroupName : System.Web.UI.WebControls.DataList > > > { > > > .... > > > > > > [ System.ComponentModel.Bindable( true ) ] > > > public PropertySessionId > > > { > > > get > > > { > > > ... > > > } > > > set > > > { > > > ... > > > } > > > } > > > > > > [ System.ComponentModel.Bindable( true ) ] > > > public PropertyGroupName > > > { > > > get > > > { > > > ... > > > } > > > set > > > { > > > ... > > > } > > > } > > > .... > > > } > > > > > > > > > thank you for any comment, suggestion, help, opinion, anything > > > > > > > > > > > > |
|
|
|
|
|||
|
|||
| Alessandro Zifiglio |
|
mato
Guest
Posts: n/a
|
thank you very much for taking that test.
at least i know that the problem is somewhere in my aspx code, because some things i had changed manually. i better recreate the page again. have a nice day and thank you again. "Alessandro Zifiglio" <> wrote in message news:J46Zb.9205$... > Ok, just tested and i were under the impression that the multipage control > behaved like the datalist, datagrid and repeater controls in that they > supplied their own naming scheme to child controls but this is not so. > Please ignore my earlier post ;P > > I have just run a small test and I've been able to bind a datalist > successfully, within a multipage control that is, so the problem remains > within your custom control. You've also stated that this has worked nicely > when not contained within the multipage control. At this point i have no > idea why it is not working for you ;P > > "mato" <> wrote in message > news:... > > hello alessandro. > > thank you for your interest. > > my problem is not that i can not get reference to datalist. the problem is > > in binding. > > let me explain, how i create this control hierarchy ( every step is in > > design time ): > > 1. i put multipage control from toolbar at design time. > > 2. then i add 2 pages. > > 3. on first page i add my first custom control ( CategoryTreeView ) > > 4. on second page i add asp net dataList control > > 5. on page i add my second custom control ( PropertyGroupDataList ) > > 6. then i create some dataBinding to 2 properties on > > PropertyGroupDataList ( PropertySessionId and PropertyGroupName ) > > 7. then i start template editing of items on dataList control > > 8. add my custom PropertyGroupDataList with dataBindings to item > > template > > 9. stop template editig > > > > now i added some behind code. like createDataView ( create table, add two > > columns, then add some rows with values set ). > > then do DataBind() on dataList. The problem is that if i put this dataList > > under PageView it does not bind to PropertySessionId and PropertyGroupName > > properties. when it is placed on the page ( the same control, the same > > bindings ) it works fine. > > > > but maybe i misunderstand what you wrote. > > > > "Alessandro Zifiglio" <> wrote in > > message news:1S4Zb.9181$... > > > hi mato, the reason you are unable to bind to the datalist when it is a > > > child control is because you "It is a childcontrol to pageview, either > you > > > get a reference to your datalist through page view using the fincontrol > > > method or just simply add your datalist to a usercontrol and do the > > binding > > > in your usercontrols code behind. And then add your usercontrol as a > > > childcontrol to pageview. This way you get direct access to your > datalist > > > from the usercontrols codebehind directly. Also simplifies a lot of > things > > > for you. > > > > > > "mato" <> wrote in message > > > news:... > > > > hello! > > > > i have this problem. i put datalist control under pageview, and the > same > > > > datalist on the page. > > > > when it is placed under pageview, it does not bind, on the page works > > > fine. > > > > > > > > this is piece of my aspx code. > > > > > > > > .... > > > > <iewc:Multipage id="someId" runat="server" ... > > > > > <iewc > > > > <cc1:CategoryTreeView id="categoryTree" runat="server" > > > > > </cc1:CategoryTreeView> > > > > </iewc > > > > <iewc > > > > <asp > > > > <ItemTemplate> > > > > <cc1 > > > > runat="server" PropertySessionId='<%# > > > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > > > Expanded="true" > > > > PropertyGroupName='<%# > > > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > > > </cc1 > > > > </ItemTeplate> > > > > </asp > > > > </iewc > > > > > > > > <asp > > > > <ItemTemplate> > > > > <cc1 > > > > runat="server" PropertySessionId='<%# > > > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > > > Expanded="true" > > > > PropertyGroupName='<%# > > > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > > > </cc1 > > > > </ItemTeplate> > > > > </asp > > > > > > > > ...... > > > > > > > > > > > > c# page behind code. > > > > public class MyWebPage : System.Web.UI.Page > > > > { > > > > .... > > > > private void MyWebPage_PageLoad(object sender, System.EventArgs e) > > > > { > > > > BindDataList(); > > > > } > > > > > > > > private void BindDataList() > > > > { > > > > System.Data.DataView _view = CreateDataSource(); > > > > data1.DataSource = _view; > > > > data1.DataBind(); > > > > > > > > data2.DataSource = _view; > > > > data2.DataBind(); > > > > } > > > > .... > > > > } > > > > > > > > c# custom control code: > > > > public class PropertyGroupName : System.Web.UI.WebControls.DataList > > > > { > > > > .... > > > > > > > > [ System.ComponentModel.Bindable( true ) ] > > > > public PropertySessionId > > > > { > > > > get > > > > { > > > > ... > > > > } > > > > set > > > > { > > > > ... > > > > } > > > > } > > > > > > > > [ System.ComponentModel.Bindable( true ) ] > > > > public PropertyGroupName > > > > { > > > > get > > > > { > > > > ... > > > > } > > > > set > > > > { > > > > ... > > > > } > > > > } > > > > .... > > > > } > > > > > > > > > > > > thank you for any comment, suggestion, help, opinion, anything > > > > > > > > > > > > > > > > > > > > |
|
|
|
|
|||
|
|||
| mato |
|
mato
Guest
Posts: n/a
|
hello again
right now i carefully looked at the code and guess what i found. yes, i mistyped both names of properties. no wonder they did not bind. two days of very intensive investigation. shame on me. be carefull with copy & paste. "Alessandro Zifiglio" <> wrote in message news:J46Zb.9205$... > Ok, just tested and i were under the impression that the multipage control > behaved like the datalist, datagrid and repeater controls in that they > supplied their own naming scheme to child controls but this is not so. > Please ignore my earlier post ;P > > I have just run a small test and I've been able to bind a datalist > successfully, within a multipage control that is, so the problem remains > within your custom control. You've also stated that this has worked nicely > when not contained within the multipage control. At this point i have no > idea why it is not working for you ;P > > "mato" <> wrote in message > news:... > > hello alessandro. > > thank you for your interest. > > my problem is not that i can not get reference to datalist. the problem is > > in binding. > > let me explain, how i create this control hierarchy ( every step is in > > design time ): > > 1. i put multipage control from toolbar at design time. > > 2. then i add 2 pages. > > 3. on first page i add my first custom control ( CategoryTreeView ) > > 4. on second page i add asp net dataList control > > 5. on page i add my second custom control ( PropertyGroupDataList ) > > 6. then i create some dataBinding to 2 properties on > > PropertyGroupDataList ( PropertySessionId and PropertyGroupName ) > > 7. then i start template editing of items on dataList control > > 8. add my custom PropertyGroupDataList with dataBindings to item > > template > > 9. stop template editig > > > > now i added some behind code. like createDataView ( create table, add two > > columns, then add some rows with values set ). > > then do DataBind() on dataList. The problem is that if i put this dataList > > under PageView it does not bind to PropertySessionId and PropertyGroupName > > properties. when it is placed on the page ( the same control, the same > > bindings ) it works fine. > > > > but maybe i misunderstand what you wrote. > > > > "Alessandro Zifiglio" <> wrote in > > message news:1S4Zb.9181$... > > > hi mato, the reason you are unable to bind to the datalist when it is a > > > child control is because you "It is a childcontrol to pageview, either > you > > > get a reference to your datalist through page view using the fincontrol > > > method or just simply add your datalist to a usercontrol and do the > > binding > > > in your usercontrols code behind. And then add your usercontrol as a > > > childcontrol to pageview. This way you get direct access to your > datalist > > > from the usercontrols codebehind directly. Also simplifies a lot of > things > > > for you. > > > > > > "mato" <> wrote in message > > > news:... > > > > hello! > > > > i have this problem. i put datalist control under pageview, and the > same > > > > datalist on the page. > > > > when it is placed under pageview, it does not bind, on the page works > > > fine. > > > > > > > > this is piece of my aspx code. > > > > > > > > .... > > > > <iewc:Multipage id="someId" runat="server" ... > > > > > <iewc > > > > <cc1:CategoryTreeView id="categoryTree" runat="server" > > > > > </cc1:CategoryTreeView> > > > > </iewc > > > > <iewc > > > > <asp > > > > <ItemTemplate> > > > > <cc1 > > > > runat="server" PropertySessionId='<%# > > > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > > > Expanded="true" > > > > PropertyGroupName='<%# > > > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > > > </cc1 > > > > </ItemTeplate> > > > > </asp > > > > </iewc > > > > > > > > <asp > > > > <ItemTemplate> > > > > <cc1 > > > > runat="server" PropertySessionId='<%# > > > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > > > Expanded="true" > > > > PropertyGroupName='<%# > > > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > > > </cc1 > > > > </ItemTeplate> > > > > </asp > > > > > > > > ...... > > > > > > > > > > > > c# page behind code. > > > > public class MyWebPage : System.Web.UI.Page > > > > { > > > > .... > > > > private void MyWebPage_PageLoad(object sender, System.EventArgs e) > > > > { > > > > BindDataList(); > > > > } > > > > > > > > private void BindDataList() > > > > { > > > > System.Data.DataView _view = CreateDataSource(); > > > > data1.DataSource = _view; > > > > data1.DataBind(); > > > > > > > > data2.DataSource = _view; > > > > data2.DataBind(); > > > > } > > > > .... > > > > } > > > > > > > > c# custom control code: > > > > public class PropertyGroupName : System.Web.UI.WebControls.DataList > > > > { > > > > .... > > > > > > > > [ System.ComponentModel.Bindable( true ) ] > > > > public PropertySessionId > > > > { > > > > get > > > > { > > > > ... > > > > } > > > > set > > > > { > > > > ... > > > > } > > > > } > > > > > > > > [ System.ComponentModel.Bindable( true ) ] > > > > public PropertyGroupName > > > > { > > > > get > > > > { > > > > ... > > > > } > > > > set > > > > { > > > > ... > > > > } > > > > } > > > > .... > > > > } > > > > > > > > > > > > thank you for any comment, suggestion, help, opinion, anything > > > > > > > > > > > > > > > > > > > > |
|
|
|
|
|||
|
|||
| mato |
|
Alessandro Zifiglio
Guest
Posts: n/a
|
lol mato. I've been there myself.
"mato" <> wrote in message news:... > hello again > right now i carefully looked at the code and guess what i found. > yes, i mistyped both names of properties. no wonder they did not bind. > two days of very intensive investigation. shame on me. > be carefull with copy & paste. > > "Alessandro Zifiglio" <> wrote in > message news:J46Zb.9205$... > > Ok, just tested and i were under the impression that the multipage control > > behaved like the datalist, datagrid and repeater controls in that they > > supplied their own naming scheme to child controls but this is not so. > > Please ignore my earlier post ;P > > > > I have just run a small test and I've been able to bind a datalist > > successfully, within a multipage control that is, so the problem remains > > within your custom control. You've also stated that this has worked nicely > > when not contained within the multipage control. At this point i have no > > idea why it is not working for you ;P > > > > "mato" <> wrote in message > > news:... > > > hello alessandro. > > > thank you for your interest. > > > my problem is not that i can not get reference to datalist. the problem > is > > > in binding. > > > let me explain, how i create this control hierarchy ( every step is in > > > design time ): > > > 1. i put multipage control from toolbar at design time. > > > 2. then i add 2 pages. > > > 3. on first page i add my first custom control ( CategoryTreeView ) > > > 4. on second page i add asp net dataList control > > > 5. on page i add my second custom control ( PropertyGroupDataList ) > > > 6. then i create some dataBinding to 2 properties on > > > PropertyGroupDataList ( PropertySessionId and PropertyGroupName ) > > > 7. then i start template editing of items on dataList control > > > 8. add my custom PropertyGroupDataList with dataBindings to item > > > template > > > 9. stop template editig > > > > > > now i added some behind code. like createDataView ( create table, add > two > > > columns, then add some rows with values set ). > > > then do DataBind() on dataList. The problem is that if i put this > dataList > > > under PageView it does not bind to PropertySessionId and > PropertyGroupName > > > properties. when it is placed on the page ( the same control, the same > > > bindings ) it works fine. > > > > > > but maybe i misunderstand what you wrote. > > > > > > "Alessandro Zifiglio" <> wrote in > > > message news:1S4Zb.9181$... > > > > hi mato, the reason you are unable to bind to the datalist when it is > a > > > > child control is because you "It is a childcontrol to pageview, either > > you > > > > get a reference to your datalist through page view using the > fincontrol > > > > method or just simply add your datalist to a usercontrol and do the > > > binding > > > > in your usercontrols code behind. And then add your usercontrol as a > > > > childcontrol to pageview. This way you get direct access to your > > datalist > > > > from the usercontrols codebehind directly. Also simplifies a lot of > > things > > > > for you. > > > > > > > > "mato" <> wrote in message > > > > news:... > > > > > hello! > > > > > i have this problem. i put datalist control under pageview, and the > > same > > > > > datalist on the page. > > > > > when it is placed under pageview, it does not bind, on the page > works > > > > fine. > > > > > > > > > > this is piece of my aspx code. > > > > > > > > > > .... > > > > > <iewc:Multipage id="someId" runat="server" ... > > > > > > <iewc > > > > > <cc1:CategoryTreeView id="categoryTree" runat="server" > > > > > > </cc1:CategoryTreeView> > > > > > </iewc > > > > > <iewc > > > > > <asp > > > > > <ItemTemplate> > > > > > <cc1 > > > > > runat="server" PropertySessionId='<%# > > > > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > > > > Expanded="true" > > > > > PropertyGroupName='<%# > > > > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > > > > </cc1 > > > > > </ItemTeplate> > > > > > </asp > > > > > </iewc > > > > > > > > > > <asp > > > > > <ItemTemplate> > > > > > <cc1 > > > > > runat="server" PropertySessionId='<%# > > > > > DataBinder.Eval(Container.DataItem,"propertySessio nId") %>' > > > > Expanded="true" > > > > > PropertyGroupName='<%# > > > > > DataBinder.Eval(Container.DataItem,"propertyGroupN ame") %>' > > > > > > </cc1 > > > > > </ItemTeplate> > > > > > </asp > > > > > > > > > > ...... > > > > > > > > > > > > > > > c# page behind code. > > > > > public class MyWebPage : System.Web.UI.Page > > > > > { > > > > > .... > > > > > private void MyWebPage_PageLoad(object sender, System.EventArgs > e) > > > > > { > > > > > BindDataList(); > > > > > } > > > > > > > > > > private void BindDataList() > > > > > { > > > > > System.Data.DataView _view = CreateDataSource(); > > > > > data1.DataSource = _view; > > > > > data1.DataBind(); > > > > > > > > > > data2.DataSource = _view; > > > > > data2.DataBind(); > > > > > } > > > > > .... > > > > > } > > > > > > > > > > c# custom control code: > > > > > public class PropertyGroupName : System.Web.UI.WebControls.DataList > > > > > { > > > > > .... > > > > > > > > > > [ System.ComponentModel.Bindable( true ) ] > > > > > public PropertySessionId > > > > > { > > > > > get > > > > > { > > > > > ... > > > > > } > > > > > set > > > > > { > > > > > ... > > > > > } > > > > > } > > > > > > > > > > [ System.ComponentModel.Bindable( true ) ] > > > > > public PropertyGroupName > > > > > { > > > > > get > > > > > { > > > > > ... > > > > > } > > > > > set > > > > > { > > > > > ... > > > > > } > > > > > } > > > > > .... > > > > > } > > > > > > > > > > > > > > > thank you for any comment, suggestion, help, opinion, anything > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
|
|
|
|
|||
|
|||
| Alessandro Zifiglio |
|
|
|
| |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do you bind a datalist that is inside a bound datalist | =?Utf-8?B?QVNQIERldmVsb3Blcg==?= | ASP .Net | 2 | 09-26-2006 02:18 AM |
| Tabstrip and position and formatting multipage pageview | gce | ASP .Net | 0 | 03-30-2005 08:52 AM |
| Setting up a datalist control - Item_DataBound for a datalist in a datalist | Nevyn Twyll | ASP .Net | 8 | 09-09-2004 10:13 PM |
| HOW TO: showing datagrid in multipage (pageview) | RedEagle | ASP .Net | 0 | 08-20-2004 10:16 AM |
| WebControls: TabStrip, MultiPage, PageView | szabelin | ASP .Net | 1 | 08-20-2003 07:24 AM |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc..
SEO by vBSEO ©2010, Crawlability, Inc. |




