ASPX templates
Version 2.x > ASPX templates > Inlineusercontrol vs webparts View modes: 
User avatar
Member
Member
kansari@multiarray.com - 6/13/2007 8:24:52 AM
   
Inlineusercontrol vs webparts
I have to display a list of cars using a datagrid, which would display a image, text etc. For this purpose i am using asp.net datagrid and the data is extracted from our database.

I need to create it as a usercontrol or a web part, so that a web author can easily use it. What would be the best approach to this.

Also if this a web part, then what would happen, if the i add this web part on the second level page.

For example,

Cars
- New cars

I have tried using it as a webpart, but it displays on Cars and New cars web page.

Also how cani make the top level page as not clickable, i.e it just shows only the secondary navigation but does not navigate to a webpage.

User avatar
Member
Member
marie - 6/13/2007 4:26:54 PM
   
RE:Inlineusercontrol vs webparts
You can make the top level page not clickable by selecting the Cars page -> clicking the Properties tab ->click the Menu tab -> select Inactive menu item and then you can put in a redirect URL if you want.

If you don't want the subpages to inherit the datagrid from the parent; when you are in design mode click configure on the datagrid and select Hide on sub-pages.

Hope this helps.

User avatar
Member
Member
Sathish kumar - 5/5/2009 4:52:18 AM
   
RE:Inlineusercontrol vs webparts
Hi,

I am having a datagrid inside an user control. The datagrid has a button in the last column. If I click the button, that particular row must be deleted. My problem is the datagrid_delete event is not firing up. Could you plz help me? Many thanks for any kind of help. Sorry for the interruption of the post..

Regards
Sathish kumar.R

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 5/11/2009 3:27:08 PM
   
RE:Inlineusercontrol vs webparts
Hi,

I am posting this here only for further reference. In portal engine may be the control life cycle little bit different. For this, you need to use the User control web part which is already predefined. this should ensure the correct life cycle. Otherwise you need to override the page load events in the life cycle.

Best Regards,
Juraj Ondrus