Would it be possible to confirm which version you are using?
I was able to set the properties in the codebehind using the same code, the only change I made was adding ReloadData(true). I tested this in v7 with the latest hotfix as you seem to be using v7, please let me know if that is not the case.
protected override void OnInit(EventArgs e)
QueryRepeater1.QueryName = "customtable.SampleTable.test";
QueryRepeater1.TransformationName = "customtable.SampleTable.Default";