It is a common scenario that you want the first item of the Drop Down List to be some message saying "Please select an item".For this you can add the item dynamically inside the Grid View_Row Data Bound event.
i went through for loop and if loop and did all things which were of total failure i came across this right now. The code which you provided roughly a fortnight has done wonders for me. Click 'Display the Table with data in the gridview 'clear the current content of the Table dt. Find Control("txt City"); and i assume that the txt City. Old Values and New Values both have length 0, and the Text Box approach described above gives a null reference after conversion. I've posted the ASP Code, and decided to skip the actual binding code, since it works great; checked it with the debugger.
I've commented out the VB options that haven't worked and included them here as I've spent too long trying to figure it out. Looks like you are binding the grid in the Page Load. Please add the below code in Page Load before binding the grid..
If Not Is Post Back Then Bind the grid End If I guess I didn't check the backend to see that the xml file was updating. I have Bind Grid() at the bottom of the code which re-binds the xml file. Should the value be displayed in a label or a textbox in the normal state (during non edit times.) I've accepted my own comment because hdesouky did identify the correct property to use.
If the Cell contains Text Box control, then the Text Box is assigned an ID and a dynamic Required Field Validator is added to the Cell. Now you can ask questions directly to me on my new site ASPForums.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.