troubleshooting Question

Insert more with ItemInserted

Avatar of m-jansen
m-jansen asked on
C#
36 Comments1 Solution356 ViewsLast Modified:
Hello. I try to insert something from current row and a selected column.... into another column in same row. But I don't see how to do it. Does anyone have some advice how to solve this?

I have tried a little, but I need some help.

    protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        // 1. Get current value at collumn 3
        // 2. Insert value of column 3 into the current column 2

        e.KeepInInsertMode;
        string CurrentValueInCol3 = e.Values[3].ToString(); // Is this right?
        e.Values.Insert(2 ,string, CurrentValueInCol3); // This is not right, but my best guess.
    }


or


    protected void InsertButton_Command(object sender, CommandEventArgs e)
    {
        e.CommandArgument; = // some insert stuff
    }
ASKER CERTIFIED SOLUTION
REA_ANDREW

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 36 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 36 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros