Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
WebGrid in usercontrol
posted

Hi,  I'm having trouble using properties and events when I put a WebGrid in  a user control.  I followed these instructions:

 In some applications, there may be a situation where the

WebGrid displays data and multi-level data from your database on a Web Form. It also allows you to modify the data and update your database with the changes.

Toolbox Item: UltraWebGrid

Namespace: Infragistics.WebUI.UltraWebGrid

',event)" class="hsglossaryreference" title="Click to show a definition of this term">WebGrid
™ needs to be configured the same and populated the same on many different web forms. For these applications, the WebGrid can be placed on a Web User Control along with all of the necessary initialization and configuration code, and the User Control placed on the various web forms.

This project places a WebGrid on a User Control and this user control is placed on a Web Form. This methodology could be used to provide a list of items in a shopping cart as the user makes shopping cart item selections.

  1. Create a new WebSite.
  2. Right click on the WebSite node in the solution explorer and select "Add New Item".
  3. In the dialog select the "Web User Control". You can change the default name if you wish, for this topic we left the default name in place. Click Add.
  4. In the design view of the Web User Control drag from the toolbox a WebGrid onto the surface.
  5. From the data section in the toolbox, drag an SqlDataSource onto the form. To learn how to configure the data source and bind it to the WebGrid review Binding WebGrid To SQL Data Source.
  6. With the data source set up, and connected to WebGrid, open the WebSites ASPX page in design view.
  7. Select the ASCX in the solution explorer, and while holding down the mouse button drag it from the solution explorer onto the ASPX page.
  8. If you build and run this web site you should see the Web User Control rendering on your ASPX. You can now customize your WebGrid to the settings you want it to repeat on all the ASPX pages you intend to place it on.


But I don't have access to the AutoGenerateColumns or the width and height properties.  I also can't use the InitilizeLayout event.  What am I missing?  could you please help me out... with Visual Basic code would be greatly appreciated.

 

vs2005, Visual Basic, NetAdvantage 8.1.20081.1000

 

Thank you for your time.