Click here to Skip to main content
15,891,905 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHi guy adding my asp to my xBap project. Pin
Epsilone314-Oct-07 19:55
Epsilone314-Oct-07 19:55 
Questionhow i can make content editable asp.net page Pin
jagadeeshkumar8414-Oct-07 19:52
jagadeeshkumar8414-Oct-07 19:52 
AnswerRe: how i can make content editable asp.net page Pin
mareers14-Oct-07 20:06
mareers14-Oct-07 20:06 
AnswerRe: how i can make content editable asp.net page Pin
John-ph14-Oct-07 20:12
John-ph14-Oct-07 20:12 
QuestionI used nant to build ASP .NET application Pin
balpanbh14-Oct-07 18:35
balpanbh14-Oct-07 18:35 
QuestionHi..i have CSS and images problem in Url Rewriting Pin
Jay Bhagatwala14-Oct-07 18:21
Jay Bhagatwala14-Oct-07 18:21 
AnswerRe: Hi..i have CSS and images problem in Url Rewriting Pin
Guffa14-Oct-07 19:17
Guffa14-Oct-07 19:17 
QuestionGridview row deletion requires two clicks [modified] Pin
stelban14-Oct-07 14:43
stelban14-Oct-07 14:43 
First post chopped off left side of code. Here is the complete version.

Objective is to click on the image in the gridview to delete the record from the database, rebind,
and display the gridview showing that the record is gone. Problem is that it requires 2 clicks.
The first click makes the page move slightly but it does not delete the record from the database.
The second click displays the grid without the record and it displays the response.write text.
If I remove the call to the deleteje sub, the response.write does display the jeid so the onrowcommand appears to be firing.


<asp:GridView ID="gv3" runat="server" BackColor="SkyBlue"
HeaderStyle-BackColor="lightGray" DataKeyNames="ID" onrowcommand="modifyje"
AlternatingRowStyle-BackColor="LightSteelBlue"
AutoGenerateColumns="false" >

<columns>



<asp:TemplateField >
<ItemTemplate >
<asp:ImageButton runat="server" ImageUrl="/images/delete.gif"
enabled="true" ToolTip="Delete"
commandname="DeleteJE2" CausesValidation="false"
CommandArgument='<%# DataBinder.Eval(Container.DataItem,"id") %>'
ID="deleteimage" />
</ItemTemplate>
</asp:TemplateField>




<asp:boundfield datafield="id" headertext="ID" />

<asp:boundfield datafield="name" headertext="Name" />
<asp:boundfield datafield="descr" headertext="Description" />
<asp:boundfield datafield="cr_div" headertext="Cr_Div" />
<asp:boundfield datafield="Cr_CC" headertext="Cr_CC" />
<asp:boundfield datafield="Cr_Acct" headertext="Cr_Acct" />
<asp:boundfield datafield="Bill_Div" headertext="Bill_Div" />
<asp:boundfield datafield="Bill_CC" headertext="Bill_CC" />
<asp:boundfield datafield="Db_Acct" headertext="Db_Acct" />



</columns>


</asp:GridView>



Sub modifyje(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles gv3.RowCommand


' this uses the template column which passes the record id
' this is the easiets way to get the record id field value
'--------------------------------------------------------------------------
If (e.CommandName = "DeleteJE2") Then
jeid = Convert.ToInt32(e.CommandArgument)
Response.Write("jeid=" & jeid)
Call deleteje(jeid)
End If
'--------------------------------------------------------------------------
End Sub

Sub deleteje(ByVal jeid As Integer)


Dim objctl As New JEController
Dim objinfo As New JEInfo

objctl.JE_DeleteJE(jeid)

Dim ds2 As DataSet

ds2 = objctl.JE_getJEList(lname,keywd,crdv,crcc)
gv3.DataSource = ds2
gv3.DataBind()


End Sub

Thanks for your help!
QuestionMerge Default_Master & Default Pin
crazy friend14-Oct-07 14:41
crazy friend14-Oct-07 14:41 
AnswerRe: Merge Default_Master & Default Pin
Christian Graus14-Oct-07 14:44
protectorChristian Graus14-Oct-07 14:44 
GeneralRe: Merge Default_Master & Default Pin
crazy friend14-Oct-07 14:51
crazy friend14-Oct-07 14:51 
GeneralRe: Merge Default_Master & Default Pin
crazy friend14-Oct-07 15:27
crazy friend14-Oct-07 15:27 
GeneralRe: Merge Default_Master & Default Pin
Christian Graus14-Oct-07 16:36
protectorChristian Graus14-Oct-07 16:36 
GeneralRe: Merge Default_Master & Default Pin
crazy friend14-Oct-07 16:50
crazy friend14-Oct-07 16:50 
GeneralRe: Merge Default_Master & Default Pin
Christian Graus14-Oct-07 17:40
protectorChristian Graus14-Oct-07 17:40 
GeneralRe: Merge Default_Master & Default Pin
crazy friend14-Oct-07 18:26
crazy friend14-Oct-07 18:26 
QuestionAdding foriegn keys Pin
learningman14-Oct-07 14:21
learningman14-Oct-07 14:21 
AnswerRe: Adding foriegn keys Pin
Christian Graus14-Oct-07 14:42
protectorChristian Graus14-Oct-07 14:42 
QuestionDiplay Crystal report thumbnail on web page. Pin
BigSkin14-Oct-07 13:56
BigSkin14-Oct-07 13:56 
QuestionGrid View in aspx Pin
newbie1234567891014-Oct-07 13:46
newbie1234567891014-Oct-07 13:46 
AnswerRe: Grid View in aspx Pin
Christian Graus14-Oct-07 13:52
protectorChristian Graus14-Oct-07 13:52 
QuestionRe: Grid View in aspx Pin
newbie1234567891015-Oct-07 5:24
newbie1234567891015-Oct-07 5:24 
QuestionAdd Group in Report Pin
mihirhp14-Oct-07 8:13
mihirhp14-Oct-07 8:13 
AnswerRe: Add Group in Report Pin
John-ph14-Oct-07 20:32
John-ph14-Oct-07 20:32 
QuestionAjax Support Pin
mehrdadc4814-Oct-07 5:48
mehrdadc4814-Oct-07 5:48 

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.