Click here to Skip to main content
15,888,116 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Text wrap on a button Pin
Dave Kreskowiak28-Jun-07 7:19
mveDave Kreskowiak28-Jun-07 7:19 
QuestionTextBoxes really Visible on Glass Pin
softwarejaeger28-Jun-07 5:18
softwarejaeger28-Jun-07 5:18 
Question[Message Deleted] Pin
DonVBguy28-Jun-07 5:08
DonVBguy28-Jun-07 5:08 
AnswerRe: Please Help with delete confirm in datagrid Pin
Dave Kreskowiak28-Jun-07 8:02
mveDave Kreskowiak28-Jun-07 8:02 
AnswerRe: Please Help with delete confirm in datagrid Pin
kubben28-Jun-07 9:15
kubben28-Jun-07 9:15 
GeneralRe: Please Help with delete confirm in datagrid Pin
DonVBguy3-Jul-07 5:40
DonVBguy3-Jul-07 5:40 
GeneralRe: Please Help with delete confirm in datagrid Pin
kubben5-Jul-07 1:52
kubben5-Jul-07 1:52 
GeneralRe: Please Help with delete confirm in datagrid Pin
DonVBguy5-Jul-07 6:12
DonVBguy5-Jul-07 6:12 
Hi Ben,

Thanks for your suggestion, but i don't think it's going to work.
Here is what i have:

Sub dgProgram_PreRender(ByVal sender As Object, ByVal e As System.EventArgs)
Dim item As DataGridItem
For Each item In dgProgram.Items
Dim lbl As Label
Dim btn As Button

lbl = CType(item.FindControl("lblProgram"), Label)
Me.program.Value = lbl.Text
btn = CType(item.FindControl("btnDel"), Button)

btn.Attributes.Add("onclick", "return deleteTesting(" + program.ClientID + ");")
'btn.Attributes.Add("onclick", "return deleteTesting(" + lbl.Text + ")")

Next
End Sub

function deleteTesting(v)
{
//v = document.getElementById("<%= program.ClientID %>").value;
return confirm('are you sure to delete ' + v.value + '?');
}


You said the javascript always fire before the postback, then how can we pass the current value of the row that we click on to the javascript. I have tried it many ways, it only pass the value of the last row of the datagrid to javascript. Supposed I have 5 rows in datagrid, when i click "delete" on row 1 and row 3, how we pass the values of these 2 rows to javascipt if you said the javascipt fire before the postback? What am I missing? Please Help!
GeneralRe: Please Help with delete confirm in datagrid Pin
kubben5-Jul-07 6:32
kubben5-Jul-07 6:32 
GeneralRe: Please Help with delete confirm in datagrid Pin
DonVBguy5-Jul-07 9:09
DonVBguy5-Jul-07 9:09 
GeneralRe: Please Help with delete confirm in datagrid Pin
kubben5-Jul-07 9:12
kubben5-Jul-07 9:12 
GeneralRe: Please Help with delete confirm in datagrid Pin
kubben5-Jul-07 10:40
kubben5-Jul-07 10:40 
GeneralRe: Please Help with delete confirm in datagrid Pin
DonVBguy5-Jul-07 12:32
DonVBguy5-Jul-07 12:32 
GeneralRe: Please Help with delete confirm in datagrid Pin
kubben5-Jul-07 12:47
kubben5-Jul-07 12:47 
QuestionGPS Graphical Display Pin
TheRidDlerX28-Jun-07 5:07
TheRidDlerX28-Jun-07 5:07 
QuestionSelecting text from a Word document Pin
reegan4128-Jun-07 4:40
reegan4128-Jun-07 4:40 
AnswerRe: Selecting text from a Word document Pin
Dave Kreskowiak28-Jun-07 5:22
mveDave Kreskowiak28-Jun-07 5:22 
GeneralRe: Selecting text from a Word document Pin
reegan4128-Jun-07 6:14
reegan4128-Jun-07 6:14 
QuestionUses for Group Boxes Pin
HurricaneDan28-Jun-07 4:20
HurricaneDan28-Jun-07 4:20 
AnswerRe: Uses for Group Boxes Pin
Dave Kreskowiak28-Jun-07 5:17
mveDave Kreskowiak28-Jun-07 5:17 
QuestionCreate small size PNG file Pin
Rupesh Kumar Swami28-Jun-07 4:10
Rupesh Kumar Swami28-Jun-07 4:10 
AnswerRe: Create small size PNG file Pin
Dave Kreskowiak28-Jun-07 5:15
mveDave Kreskowiak28-Jun-07 5:15 
GeneralRe: Create small size PNG file Pin
Paul Conrad28-Jun-07 6:35
professionalPaul Conrad28-Jun-07 6:35 
QuestionDynamic button + dynamic code. Pin
Barbarus28-Jun-07 3:57
Barbarus28-Jun-07 3:57 
AnswerRe: Dynamic button + dynamic code. Pin
Dave Kreskowiak28-Jun-07 5:09
mveDave Kreskowiak28-Jun-07 5:09 

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.