i have a gridview with textboxes in. a barcode reader is used to enter data in the textboxes in the grid. when something is scanned in the page does a full postback.
so after a postback and after something has been scanned in, i want the focus to be moved to the next textbox in the row inside the gridview.
i have some code, but it doesnt seem to work. after the postback the focus is set to one of the textboxes outside the grid.
i need it to recognise one of the textboxes in the grid. i have tried to use the findcontrol property to do this still doesnt work.
please can anyone see where i am going wrong. what i wanted to do is for it to automatically tab to the next textbs in the gridview after a postback.
please any advise on this would be much appreciated.
thank you very muchprotected void Page_Load(object sender, EventArgs e)
WebControl wcICausedPostBack = (WebControl)GetControlThatCausedPostBack(sender as Page);
int indx = wcICausedPostBack.TabIndex;
var ctrl = from control in wcICausedPostBack.Parent.Controls.OfType<WebControl>()
where control.TabIndex > indx
protected Control GetControlThatCausedPostBack(Page page)
View Complete Post