Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CommandField Type Select
Message
 
 
À
18/03/2008 13:27:02
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01303034
Message ID:
01303048
Vues:
10
>>Hi everybody,
>>
>>I have a GridView on the form with the Select button
>>
>>
>> <asp:CommandField SelectText="Edit" ShowSelectButton="True" />
>>
>>Now, I want to hide the grid when I press it and show the information from the table.
>>
>>I had it working correctly using server side code. But I decided to change my approach and do it from the client side.
>>
>>I added two DIV tags GridInfo and ProfileInfo around my grid and table correspondignly.
>>
>>My problem now is to inject the JavaScript into the Select button. Since it doesn't have ID I'm at lost as how to do it.
>>
>>Any ideas, please?
>>
>>Thanks a lot in advance.
>
>Here's an example from one of my projects using a linkbutton:
>
>((LinkButton)item.Cells[0].Controls[0]).Attributes.Add("onClick","return confirm('Are you sure you want to delete this Profile?')");

Thanks, I have it working correctly already for the LinkButton. Please note, that I need to add it for my Select button. Do you know how can I do it for the select button?

Or do you access the first Select button this way?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform