The best way to do this is to enable templates on your DataGrid. You can do this by right-clicking on your DataGrid and opening the Property Builder. In the Property Builder, select the Columns item in the list view and change or add Template columns to your DataGrid. When you've added all your template columns, close the Property Builder and right click the DataGrid in your page. Select Edit Template > and select the column you want to edit. Now you can add controls to any of the modes for that column. In your case, you'll probably want a TextBox in the Edit Template. Once you add the TextBox, go to it's property view and select the (DataBindings) property by clicking the [...] button in its property field. This will open the DataBindings form for the TextBox. Select the ReadOnly field from the BindableProperties list and then select the "Custom binding expression" option. You'll want to create an expression that uses the variable you obtained from a different table. For more info on creating custom binding expressions, refer to "Data-Binding Expressions for Web Forms Pages" topic in MSDN.
Dig Deeper on Win Development Resources
Related Q&A from Berni McCoy
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.