Home Forums Programming General Updating datagrid with C#.net RE: Updating datagrid with C#.net

  • rayh 98086 (4/16/2013)


    Hi Lowell,

    Good to hear from you again. I am using a Windform.

    This generally does answer my question, but do you have an example of this?

    The trick is, the user should be able to update any EndDt that is visible after passing the ID. For any row that does have an updated EndDt, that specific row should also be updated with an Active of 0 and Status of REVO "behind the scenes".

    Thanks again!!

    For this type of custom logic on the value you will probably need to handle the RowUpdating event. You can then add just about level of customization to the values that you want. You might be able to use a trigger for this too but the effects of that would apply to any updates to this table, not just those from within your application.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/