Using OA with RadGrid (and NOT using the OpenAccessDataSource control)

2 posts, 0 answers
  1. Rob Richard
    Rob Richard avatar
    4 posts
    Member since:
    Sep 2002

    Posted 04 Aug 2010 Link to this post

    Ok, between following documentation, posts and videos that use syntax and tools that are no longer used or available, I'm really lost as to how to go about even using this tool.  So I thought I'd ask for some help and hopefully someone out there has done this before.

    I want to simply bind my entities to a RadGrid, but I want to use TemplateColumn in my RadGrid (in editmode, I want to use other controls like datepickers, dropdowns, etc.)  Therefore, like the old way of doing things, I want to fire off the RadGrid's ItemDataBound event, for example, find the controls and set the controls to the appropriate values.

    Old way that we were used to (You know, like the old fashioned way of something like setting a RadTextBox to a value from the RadGrid's DataSource, which was a DataReader:):
    string strID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["campaignID"].ToString();
    RadTextBox rtxtTitle = (RadTextBox)e.Item.FindControl("rtxtTitle");
    rtxtTitle.Text = DataBinder.Eval(e.Item.DataItem, "title").ToString();







    Does anyone have sample out there of how to do this?  I would assume that I would also need to know how to bind the RadGrid in the first place, so an example of that would also be helpful (NOT using the actual OpenAccessDataSource control - I want to bind it in the NeedDataSource event of the RadGrid).

    Thanks in advance...

    Oh, and Telerik - if there's videos and documentation for versions OTHER than the Q2 2010 version of OpenAccess, could you warn us NOT to look at them so that we're not wondering why things are so different and can't get anything to work???

  2. Petko_I
    Petko_I avatar
    184 posts

    Posted 06 Aug 2010 Link to this post

    Hi Rob Richard,

    We have prepared a simple example (a revised version of one of our online examples) which illustrates the usage of OpenAccessDataSource for simple tasks as well as the handling of RadGridView events to customize your application logic. The example is based on the NorthwindOA database which is installed automatically with OpenAccess. We subscribe to the RadGridView OnNeedDataSource, OnInsertCommand, OnUpdateCommand and OnDeleteCommand events and also customize the columns displayed.  Do not forget to upgrade your references prior to testing the sample. I sincerely hope this example is exactly what you are looking for. If you need anything else, just ask and we will do our best to swiftly supply you with additional resources.

    With regard to our resources I admit that there was an extended period of time when our help was not updated. However, it is up-to-date now and there shouldn’t be anything that is described there and outdated. Should you find such discrepancies, I will kindly ask you to point them to us so that we can fix what is displayed. There might be a bit of confusion right now as we have radically changed our menu items. You can find some information about this and other issues on our blog.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top