Embedding a WebEditor Control in WebGrid

Before You Begin:

All of the WebEditors™ can be embedded into the WebGrid™ as embedded editors.

Follow These Steps:

To add any of the WebEditors as an editor in WebGrid cells:

  1. Add the WebDataInput editors to the ASPX page that you are going to use in the cells of a WebGrid.
  2. Set the BorderStyle of the WebDataInput editors to None.
  3. Add a WebGrid to an ASPX page.
  4. Set the DataSource and DataMember properties to your data source if you are using the WebGrid in bound mode, or add columns manually if you are using WebGrid in unbound mode.
  5. Change the AllowUpdateDefault property of the WebGrid to Yes.
  6. Select the Columns collection from the properties grid to bring up the Columns Collection Editor.
  7. From the Members pane on the right of the Columns Collection Editor, select the field you wish to use the editor with.
  8. From the EditorControlID property, select the ID of the editor on the ASPX page you wish to use for the selected field.
  9. Change the Type property to Custom.

Repeat steps 7 thru 9 for each editor you want to use in the cells of the WebGrid.

What You Accomplished:

This project demonstrates the ease with which a WebTextEdit can be embedded into a WebGrid.

你可能感兴趣的:(editor)