Deductions & credits

My remaining question is this:  If I withdrew the 401K money and paid the charitable contrinbutions while in Virginia, would all that go against my Virginia taxes and not Kansas?