Click here to Skip to main content
15,908,020 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionasp.net DatePicker control Pin
aransiola10-May-07 8:43
aransiola10-May-07 8:43 
AnswerRe: asp.net DatePicker control Pin
enjoycrack10-May-07 15:54
enjoycrack10-May-07 15:54 
AnswerRe: asp.net DatePicker control Pin
varshavmane10-May-07 19:14
varshavmane10-May-07 19:14 
Questiongridview with Edit option Pin
aransiola10-May-07 8:37
aransiola10-May-07 8:37 
AnswerRe: gridview with Edit option Pin
Sherin Iranimose10-May-07 18:02
Sherin Iranimose10-May-07 18:02 
GeneralRe: gridview with Edit option Pin
aransiola10-May-07 22:37
aransiola10-May-07 22:37 
GeneralRe: gridview with Edit option Pin
Sherin Iranimose10-May-07 22:47
Sherin Iranimose10-May-07 22:47 
GeneralRe: gridview with Edit option Pin
aransiola12-May-07 1:43
aransiola12-May-07 1:43 
Thank you for your response on this problem. Please my

Row_Updating not updating old value with new value. Remember i am using a datatable returned from my middle tier as the datasource to the gridview. If i was using the sqldatasource, i would not have this problem, but the problem im solving requires that i should use a datatable. One user will create the detail table while the other user will use the information from the first user, then update that with his own and save it into another table. Sorry for labouiring you people with this details.

See my code below


Protected Sub grdPhases_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles grdPhases.RowUpdating

If Not Session("biddetail") Is Nothing Then
oDT = Session("biddetail")
End If
grdPhases.DataSource = oDT

If e.NewValues("PhaseCost") IsNot Nothing Then
e.NewValues("PhaseCost") = Decimal.Parse(e.NewValues("PhaseCost").ToString(), Globalization.NumberStyles.Currency)
Else
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
End If

If e.NewValues("StartDate") IsNot Nothing Then
lblPhaseCost.Visible = False
Else
lblPhaseCost.Text = "Enter the Start Date for this phase"
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
End If

If e.NewValues("EndDate") IsNot Nothing Then
lblPhaseCost.Visible = False
Else
lblPhaseCost.Text = "Enter the End Date for this phase"
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
End If

If Not IsDate(e.NewValues("StartDate")) Then
lblPhaseCost.Text = "Invalid Start Date"
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
Else
lblPhaseCost.Visible = False
End If

If Not IsDate(e.NewValues("EndDate")) Then
lblPhaseCost.Text = "Invalid End Date"
lblPhaseCost.Visible = True
e.Cancel = True 'cancels the operation being performed
Else
lblPhaseCost.Visible = False
End If


'Dim strFind As String = "PhaseCode='" & e.OldValues("PhaseCode") & "'"
'Dim RowFound() As DataRow = oDT.Select(strFind)

'For j As Integer = 0 To RowFound.GetUpperBound(0)
'only 1 row
e.OldValues.Item("Description") = e.NewValues.Item("Description")
e.OldValues.Item("StartDate") = e.NewValues.Item("StartDate")
e.OldValues.Item("EndDate") = e.NewValues.Item("EndDate")
e.OldValues.Item("PhaseCost") = e.NewValues.Item("PhaseCost")
'Next

Session("biddetail") = oDT

'Set EditIndex=-1 to exit editing mode and rebind teh gridview to the
'datasourecto refersh
grdPhases.DataSource = oDT
grdPhases.EditIndex = -1
End Sub

t.aransiola
QuestionPage themes Pin
DanB198310-May-07 8:25
DanB198310-May-07 8:25 
AnswerRe: Page themes Pin
DanB198310-May-07 8:39
DanB198310-May-07 8:39 
Questionhelp needed urgently Pin
ahsan201110-May-07 7:38
ahsan201110-May-07 7:38 
AnswerRe: help needed urgently Pin
SimulationofSai10-May-07 9:14
SimulationofSai10-May-07 9:14 
AnswerRe: help needed urgently Pin
sooreeagt10-May-07 18:29
sooreeagt10-May-07 18:29 
QuestionGridView unique ID issues Pin
Sam Heller10-May-07 6:48
Sam Heller10-May-07 6:48 
AnswerRe: GridView unique ID issues Pin
PSK_10-May-07 19:40
PSK_10-May-07 19:40 
GeneralRe: GridView unique ID issues Pin
Sam Heller10-May-07 22:47
Sam Heller10-May-07 22:47 
QuestionError while using Word object in ASP.Net Pin
Shakila Karunamurthy10-May-07 6:36
Shakila Karunamurthy10-May-07 6:36 
AnswerRe: Error while using Word object in ASP.Net Pin
DanB198310-May-07 8:29
DanB198310-May-07 8:29 
QuestionAdRotator Control and doubleclick adserving Pin
shaunll10-May-07 6:02
shaunll10-May-07 6:02 
Questionasp.net cookies Pin
maganti.venkat10-May-07 5:36
maganti.venkat10-May-07 5:36 
AnswerRe: asp.net cookies Pin
Guffa10-May-07 8:01
Guffa10-May-07 8:01 
QuestionGridView bind with dropdown, needed page refresh .. Pin
Milw199110-May-07 5:35
Milw199110-May-07 5:35 
AnswerRe: GridView bind with dropdown, needed page refresh .. Pin
SimulationofSai10-May-07 9:17
SimulationofSai10-May-07 9:17 
GeneralRe: GridView bind with dropdown, needed page refresh .. Pin
Milw199111-May-07 8:57
Milw199111-May-07 8:57 
Questionhow to access hidden columns in the grid Pin
rama charan10-May-07 5:15
rama charan10-May-07 5:15 

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.