Click here to Skip to main content
15,901,871 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Data Grid Delete using checkbox with customize delete button Pin
piyush12317-Apr-07 22:40
piyush12317-Apr-07 22:40 
GeneralRe: Data Grid Delete using checkbox with customize delete button Pin
J Liang17-Apr-07 22:47
J Liang17-Apr-07 22:47 
Questionpassing value between two asp.net pages Pin
siddisagar17-Apr-07 21:23
siddisagar17-Apr-07 21:23 
AnswerRe: passing value between two asp.net pages Pin
mareers17-Apr-07 22:39
mareers17-Apr-07 22:39 
QuestionFireFox Pin
bhanu1234517-Apr-07 21:09
bhanu1234517-Apr-07 21:09 
AnswerRe: FireFox Pin
N a v a n e e t h17-Apr-07 22:51
N a v a n e e t h17-Apr-07 22:51 
QuestionGridVew Updation Pin
piyush12317-Apr-07 20:53
piyush12317-Apr-07 20:53 
AnswerRe: GridVew Updation Pin
mdv11318-Apr-07 13:02
mdv11318-Apr-07 13:02 
Use the SqlDataSource for this or code it your self.
I asume you will not use the SqlDataSource.
Steps:
1) fetch the GridViewRowUpdate event
2) compare old and new value
3) create sql statements

See sample(you should call your Storedproc with SqlCommand class)
Protected Sub GridViewDetectorInstellingen_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridViewDetectorInstellingen.RowUpdating
Dim newvals As IOrderedDictionary = e.NewValues
Dim oldvals As IOrderedDictionary = e.OldValues
'note TDBP1 is column name in Grid
Dim begin As String = newvals.Item("TDBP1").ToString()
Dim einde As String = newvals.Item("TDBP2").ToString()
Dim oudbegin As String = oldvals.Item("TDBP1").ToString()
Dim oudeinde As String = oldvals.Item("TDBP2").ToString()
Dim keys As IOrderedDictionary = e.Keys
'Keys are the key columns from the main key of the source table
Dim dim1 As String = keys.Item("Dimension1")
Dim dim2 As String = keys.Item("Dimension2")
Dim kid As String = keys.Item("KID")
Dim sql As String
Dim pos As Int32
If Not IsNothing(begin) Then
If begin <> oudbegin Then
pos = begin.IndexOf(":")
If pos > -1 Then
begin = begin.Remove(begin.IndexOf(":"), 1)
End If
sql = "update Elementen0 set [Value] = " & begin & " where Dimension1 = " & dim1 & " and Dimension2 = " & dim2 & " and OID = (select ID from Objecten where KID = " & kid & " and Naam = 'TDBP1')"
globalstuff.ExecuteNonQuery(sql)
End If
End If
If Not IsNothing(einde) Then
If einde <> oudeinde Then
pos = einde.IndexOf(":")
If pos > -1 Then
einde = einde.Remove(einde.IndexOf(":"), 1)
End If
sql = "update Elementen0 set [Value] = " & einde & " where Dimension1 = " & dim1 & " and Dimension2 = " & dim2 & " and OID = (select ID from Objecten where KID = " & kid & " and Naam = 'TDBP2')"
globalstuff.ExecuteNonQuery(sql)
End If
End If
'no update through SqlDataSource permitted
e.Cancel = True
'update is done through code behind so stop editmode
Me.GridViewDetectorInstellingen.EditIndex = -1
Me.GridViewDetectorInstellingen.DataBind()
End Sub




Mdv
QuestionAsp.net 2.0 + c# + javascripting Pin
ritu432117-Apr-07 20:50
ritu432117-Apr-07 20:50 
AnswerRe: Asp.net 2.0 + c# + javascripting Pin
Sandeep Akhare19-Apr-07 1:34
Sandeep Akhare19-Apr-07 1:34 
QuestionGridView in ASP.Net Pin
piyush12317-Apr-07 20:41
piyush12317-Apr-07 20:41 
AnswerRe: GridView in ASP.Net Pin
Sandeep Akhare19-Apr-07 1:49
Sandeep Akhare19-Apr-07 1:49 
QuestionDon't Accept same names using javascript Pin
siddisagar17-Apr-07 20:25
siddisagar17-Apr-07 20:25 
AnswerRe: Don't Accept same names using javascript Pin
N a v a n e e t h17-Apr-07 22:54
N a v a n e e t h17-Apr-07 22:54 
GeneralRe: Don't Accept same names using javascript Pin
siddisagar17-Apr-07 23:15
siddisagar17-Apr-07 23:15 
QuestionReg : Sessions Pin
venkatasivaramaprasad17-Apr-07 20:03
venkatasivaramaprasad17-Apr-07 20:03 
AnswerRe: Reg : Sessions Pin
Sandeep Kumar17-Apr-07 23:52
Sandeep Kumar17-Apr-07 23:52 
QuestionRegarding UserControls Pin
dayakar_dn17-Apr-07 19:35
dayakar_dn17-Apr-07 19:35 
AnswerRe: Regarding UserControls Pin
Paddy Boyd17-Apr-07 23:28
Paddy Boyd17-Apr-07 23:28 
AnswerRe: Regarding UserControls Pin
Sophia Rekhi18-Apr-07 2:09
Sophia Rekhi18-Apr-07 2:09 
QuestionHow to use hiddenfield control in asp.net Pin
Vimal Joseph17-Apr-07 19:30
Vimal Joseph17-Apr-07 19:30 
AnswerRe: How to use hiddenfield control in asp.net Pin
Sathesh Sakthivel17-Apr-07 19:37
Sathesh Sakthivel17-Apr-07 19:37 
GeneralRe: How to use hiddenfield control in asp.net Pin
Vimal Joseph17-Apr-07 21:04
Vimal Joseph17-Apr-07 21:04 
GeneralRe: How to use hiddenfield control in asp.net Pin
Sandeep Kumar18-Apr-07 0:03
Sandeep Kumar18-Apr-07 0:03 
GeneralRe: How to use hiddenfield control in asp.net Pin
Vimal Joseph19-Apr-07 18:17
Vimal Joseph19-Apr-07 18:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.