Asp net gridview rowupdating newvalues Horny feee chatting

I cannot get the selected row cell value in my gridview. my biggest problem is that I do not know how to reach to selected row productid value thanks in advance Did you set the Data Key Names in your Grid View? Row Command Event Hi, I'm trying to retreive the row that contains the button clicked to get a cell value in that particular row...

I could n't use ds.tables(0)coumns(4).value or e... I am using VWD and VB if any of you can send me some sample script will be greatly appriciated.

I have a gridview with about 15 or so columns, all of which are template fields.

Most of the cells contain a single textbox, but some of them have multiple textboxes.

So far so good, this all works, the grid is displayed, the Drop Down List appears, filled with the correct data, shows the correct initial item and lets the user select another. The when trying to get the value from the Drop Down List in the Row Updating event, I cant find it. I create a Recursive Find Control method that ran through every control on the page, and it cant find it.

Ive tried peeking in the cell controls in the debugger and its just not there. Ive duplicated it in a simpler test page, with a test database.

To String Message="Conversion from string "Location Name" to type ' Integer' is not valid."I would prefer to get the cells by name rather then by location e.g. since the location might ideas why I get this odd error?

I have therefore added the relevant xml, and when creating the grid, create the column as a Template Field and the Edit Item as a Drop Down List with its own Sql Data Source. Regards Helen u can use row data bound event of the gridview..there u can access that column by cells(4)or u can go for dataset..there also u can access by:ds.tables(0)coumns(4).value Hi, Thank you for your reply. Update Command Type = Sql Data Source Command Type. Update Command = "UPDATE tbl Clients Custom Fields SET " & Custom Field1. Grid View Just when I can run circles around a datagrid, here comes gridview.... It is a template column with a single value - an int. Protected Sub gv Configuration_Row Updating(By Val sender As Object, By Val e As System. When the buttonfield is clicked, the procedure below is called. (cartid=session.sessionid and productid=int) anyway, I would like to put row delete command and quantity update futures to it. I couldn't use the following code: Gridview1.selectedrow.cells(5)Instead of this Is there any way to get the value? Must be non-negative and less than the size of the collection. The gridview has the first column as a buttonfield and bound fields to the right of it. this gridview uses storedprocedure that uses two parameter. Grid View Command Event Args) dim therow as integer=gridview1.selectedindex dim theval=gridvie...I have a problem, with Grid View and Template Fields.

Leave a Reply