Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
Hello Every One,
I am making a project in c#. In a gridview i have two three columns ID, status, comment.
for status i have used two radio button in gridview column. so in my gridview's every row i have one radio button in status column and one textbox in comment column.
fo save changes i use a button outside of the gridview. for update the changes in database.
I want that when user click on save hanges button then update query should be execute only for those ID in which comment or status has been changed. Means i don't want to execute update query for every row of gridview.
so i am not understand taht how i will find that in which row textbox value is changed or not.
please giveme any idea.
thanks in advance
Posted 27-May-12 18:56pm
SAKryukov at 28-May-12 1:10am
"I am not understand" is not a valid question. What's the problem?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you can add a hiddend field
in which you can store you data received from server as a string
when button press
you can compare data of grid view and hidden field
if any changed made then save other wise skip ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 518
1 OriginalGriff 459
2 ChintanShukla 305
3 Richard Deeming 250
4 RyanDev 210
0 Sergey Alexandrovich Kryukov 8,901
1 OriginalGriff 7,571
2 CPallini 2,603
3 Richard MacCutchan 2,095
4 Abhinav S 1,893

Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 28 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100