Hypothetical situation - best method for maintaining a join table

3 posts, 0 answers
  1. Boris
    Boris avatar
    289 posts
    Member since:
    Oct 2012

    Posted 05 Aug 2013 Link to this post

    This is a rather vague question.  I have a classic join table situation.  I put a key from table A and a key from Table B in a join table.  The join table record either exists or it doesn't exist.  If it does exist another process selects the records from table A and B.  (This is a one to many situation.)

    My concern is this.  I already have a working solution for this.  I have a popup in the screen for editing table A that creates/deletes join table records for a particular Table A record.  

    The popup screen consists of a RadGrid with table B records and a checkbox for each record.  The grid loads from a view that loads all table B records and whether or not a join exists for them with Table A (to set the check boxes.)  Once displayed the users can check or uncheck boxes as they please.  When the Save button is hit, the codebehind adds/deletes join table records as needed. 

    This works fine so far but I'm just wondering that if table B grows to some hundreds of records, this might become cumbersome.  I believe it would be simple to 'Ajaxify' the situation so that adds/deletes take place the instant the box is clicked but on the other hand I wonder if I need to maintain a user interface in which changes only take place as a whole.

    Suggestions?
  2. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 08 Aug 2013 Link to this post

    Hi Boris,

    As I understand you are adding all changes on Save button click as it happens when using Batch Editing functionality and you are wondering if you make ajax on each checkbox click instead would be better. I can not say which one is better for you, as this depends on the specific scenario. Therefore, you can try to use both of them and see which approach is more appropriate for your situation.

    Regards,
    Pavlina
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. Boris
    Boris avatar
    289 posts
    Member since:
    Oct 2012

    Posted 08 Aug 2013 Link to this post

    Actually I'm wondering out loud if there are any other scenarios besides those two (Batch or Ajax) that I might have over-looked.

    There's no 'right' or 'wrong' answer in this case.   Actually I suspect management will consider my current system 'good enough'.

    :-)

    But thanks.
Back to Top