15,886,422 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by miss_sumaira (Top 10 by date)
miss_sumaira
4-Jul-12 13:01pm
View
yeah i implemented all these handler also ..
thank you so much for replaying...
miss_sumaira
4-Jul-12 12:55pm
View
<asp:GridView ID="gvw" runat="server" AutoGenerateColumns="False"
CssClass="basix" Width="408px" CellPadding="4" ForeColor="#333333"
GridLines="None" Height="127px"
onselectedindexchanged="gvwExample_SelectedIndexChanged" onrowdeleting="gvw_RowDeleting1"
onrowupdating="gvw_RowUpdating" EditIndex="0"
onrowcancelingedit="gvw_RowCancelingEdit" onrowediting="gvw_RowEditing"
DataKeyNames="ID" >
<asp:BoundField DataField="ID" HeaderText="ID" AccessibleHeaderText="ID" />
<asp:BoundField DataField="MedDoze" HeaderText="DOZE"
AccessibleHeaderText="DOZE" />
<asp:CommandField HeaderText="Delete" ShowDeleteButton="True" />
<asp:CommandField ShowEditButton="True" />
<PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
Event code
GridViewRow row = (GridViewRow)gvw.Rows[e.RowIndex];
Int32 ID = Int32.Parse(gvw.DataKeys[e.RowIndex].Value.ToString());
string DozeName = ((TextBox)(row.Cells[1].Controls[0])).Text;
TextBox txtDozename = new TextBox();
txtDozename.Text = DozeName;
this.Controls.Add(txtDozename);
string Query = " update dbo.AddDoze set Meddoze= N'" txtDozename.Text + "' where ID= " + ID + " ";
DBAccess.Execute(Query);
miss_sumaira
4-Jul-12 8:26am
View
Deleted
.
miss_sumaira
4-Jul-12 8:16am
View
after added this Query, my Data-updated Successfully but its not Accepting NEW Value in grid view its again used previous value...
Like if database Table stored that value "صبح، دوپہر شام". when i am updating or replace with " روزانہ صبح " ... When i enter " روزانہ صبح " in gridview ...but its do not Use new value " روزانہ صبح " instead its again used "صبح، دوپہر شام" and updated ...
i am using Above Code.
Can you tell me what mistake i done in it.
miss_sumaira
3-Jul-12 17:09pm
View
try{
GridViewRow row = (GridViewRow)gvw.Rows[e.RowIndex];
Int32 ID = Int32.Parse(gvw.DataKeys[e.RowIndex].Value.ToString());
string investgation = ((TextBox)(row.Cells[1].Controls[0])).Text;
string Query = "update dbo.Investigations set Investigations= '" + investgation + "' where ID= " + ID + " ";
DBAccess.Execute(Query);
gvw.EditIndex = -1;
FillData();
}
catch (Exception ex)
{
string strEx = ex.Message;
}
miss_sumaira
3-Jul-12 15:56pm
View
yeah i use this one also. but Does not affect..
miss_sumaira
3-Jul-12 15:54pm
View
i used N' as a prefixed. but its not working .... and gives Incorrect Format Exception.
miss_sumaira
3-Jul-12 11:26am
View
my solution is
DataKeyNames="ID"
Int32 ID = Int32.Parse(GridView.DataKeys[e.RowIndex].Value.ToString());
miss_sumaira
3-Jul-12 8:46am
View
any other solution ?
miss_sumaira
3-Jul-12 8:37am
View
I m not using DataKeyName property for Assessing....
Show More