We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to change values in UserControl in a Cell

Using the RepeaterUserControl sample, how can I change the value in a textbox in the UserControl, knowing the rowIndex and colIndex of the cell hosting the UserControl? I can figure out how to get to the UserControl in an specific cell to change values in textboxes or other controls in the UserControl.

1 Reply

AD Administrator Syncfusion Team June 9, 2004 02:40 AM

One approach would be to change the DataSource directly instead of trying to change the DataSource through the grid. int gridRowIndex = ???;//what ever grid row you want to set int positionInDataTable = gridRowIndex - 1; this.dt.Rows[positionInDataTable]["City"] = newValue; //change the city field Making the change directly to the datasource should be immediately reflected in the grid display.

Loader.
Live Chat Icon For mobile
Up arrow icon