Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Dialog box (for confirmation) in DataGrid control?


Message #1 by Romy Jarr <romyjarr@t...> on Sun, 20 Oct 2002 22:16:50 +0800
Hello guys,
 
I'm currently developing an ASP.NET application using C#.  Some of the code snippet for the datagrid control in my application is as
follows:

<asp:DataGrid id="ListsGrid" runat="server" CssClass="Grid_General" OnSortCommand="ListsGrid_Sort"
OnDeleteCommand="ListsGrid_Delete" OnUpdateCommand="ListsGrid_Update" OnCancelCommand="ListsGrid_CancelEdit"
OnEditCommand="ListsGrid_Edit" DataKeyField="ID" AutoGenerateColumns="False" AllowSorting="True"
AlternatingItemStyle-CssClass="Grid_AlternatingItem" ItemStyle-CssClass="Grid_Item" HeaderStyle-CssClass="Grid_Header">

   <Columns>
         <asp:EditCommandColumn ItemStyle-Width="25px" EditText="<img border=0 Alt='Edit this list'
src=./Images/imgEdit.gif>" CancelText="<img border=0 src=./Images/imgCancel.gif>" UpdateText="<img border=0
src=./Images/imgOK.gif>" />
         <asp:ButtonColumn ItemStyle-Width="25px" Text="<img border=0 Alt='Delete this list' src=./Images/imgDelete.gif>"
CommandName="delete" />
.................................
.................................
.................................
   </Columns>
</asp:DataGrid>
 
 
Based on the above code, I would like to add a function that will ask the user for an input confirmation.  Where and How do I use a
dialog box as for both '<asp:EditCommandColumn />' for the updating part, and also the '<asp:ButtonColumn />' for the
deleting part?  How do I include a dialog box here in both columns to be used as confirmation mechanism?  The intended dialog boxes
shall ask the user to choose either "yes" or "no" in order to proceed or abort, respectively.

Pls help me.

Thanks a lot in advance.

Regards,
Romy
Kuala Lumpur,
Malaysia.

Message #2 by "David Adames" <david@p...> on Sun, 20 Oct 2002 10:23:22 -0400
Romy,

Check out this link...
http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=505

David X



-----Original Message-----
From: Romy Jarr [mailto:romyjarr@t...]
Sent: Sunday, October 20, 2002 10:17 AM
To: ASP+
Subject: [aspx] Dialog box (for confirmation) in DataGrid control?


Hello guys,

I'm currently developing an ASP.NET application using C#.  Some of the code
snippet for the datagrid control in my application is as follows:

<asp:DataGrid id="ListsGrid" runat="server" CssClass="Grid_General"
OnSortCommand="ListsGrid_Sort" OnDeleteCommand="ListsGrid_Delete"
OnUpdateCommand="ListsGrid_Update" OnCancelCommand="ListsGrid_CancelEdit"
OnEditCommand="ListsGrid_Edit" DataKeyField="ID" AutoGenerateColumns="False"
AllowSorting="True" AlternatingItemStyle-CssClass="Grid_AlternatingItem"
ItemStyle-CssClass="Grid_Item" HeaderStyle-CssClass="Grid_Header">

   <Columns>
         <asp:EditCommandColumn ItemStyle-Width="25px" EditText="<img
border=0 Alt='Edit this list' src=./Images/imgEdit.gif>" CancelText="<img
border=0 src=./Images/imgCancel.gif>" UpdateText="<img border=0
src=./Images/imgOK.gif>" />
         <asp:ButtonColumn ItemStyle-Width="25px" Text="<img border=0
Alt='Delete this list' src=./Images/imgDelete.gif>" CommandName="delete" />
.................................
.................................
.................................
   </Columns>
</asp:DataGrid>


Based on the above code, I would like to add a function that will ask the
user for an input confirmation.  Where and How do I use a dialog box as for
both '<asp:EditCommandColumn />' for the updating part, and also the
'<asp:ButtonColumn />' for the deleting part?  How do I include a dialog box
here in both columns to be used as confirmation mechanism?  The intended
dialog boxes shall ask the user to choose either "yes" or "no" in order to
proceed or abort, respectively.

Pls help me.

Thanks a lot in advance.

Regards,
Romy
Kuala Lumpur,
Malaysia.


---

ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442

ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450

These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples.

---

Message #3 by Romy Jarr <romyjarr@t...> on Sun, 20 Oct 2002 22:48:46 +0800
Thank you David, but I think the article (as per your suggested link) is
with regards to the <asp:HyperlinkColumn /> and not the
<asp:EditCommandColumn /> and <asp:ButtonColumn />.

Anyway, thanks David.

Regards,
Romy

----- Original Message -----
From: "David Adames" <david@p...>
To: "ASP+" <aspx@p...>
Sent: Sunday, October 20, 2002 10:23 PM
Subject: [aspx] RE: Dialog box (for confirmation) in DataGrid control?


>
> Romy,
>
> Check out this link...
> http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=505
>
> David X
>
>
>
> -----Original Message-----
> From: Romy Jarr [mailto:romyjarr@t...]
> Sent: Sunday, October 20, 2002 10:17 AM
> To: ASP+
> Subject: [aspx] Dialog box (for confirmation) in DataGrid control?
>
>
> Hello guys,
>
> I'm currently developing an ASP.NET application using C#.  Some of the
code
> snippet for the datagrid control in my application is as follows:
>
> <asp:DataGrid id="ListsGrid" runat="server" CssClass="Grid_General"
> OnSortCommand="ListsGrid_Sort" OnDeleteCommand="ListsGrid_Delete"
> OnUpdateCommand="ListsGrid_Update" OnCancelCommand="ListsGrid_CancelEdit"
> OnEditCommand="ListsGrid_Edit" DataKeyField="ID"
AutoGenerateColumns="False"
> AllowSorting="True" AlternatingItemStyle-CssClass="Grid_AlternatingItem"
> ItemStyle-CssClass="Grid_Item" HeaderStyle-CssClass="Grid_Header">
>
>    <Columns>
>          <asp:EditCommandColumn ItemStyle-Width="25px" EditText="<img
> border=0 Alt='Edit this list' src=./Images/imgEdit.gif>" CancelText="<img
> border=0 src=./Images/imgCancel.gif>" UpdateText="<img border=0
> src=./Images/imgOK.gif>" />
>          <asp:ButtonColumn ItemStyle-Width="25px" Text="<img border=0
> Alt='Delete this list' src=./Images/imgDelete.gif>" CommandName="delete"
/>
> .................................
> .................................
> .................................
>    </Columns>
> </asp:DataGrid>
>
>
> Based on the above code, I would like to add a function that will ask the
> user for an input confirmation.  Where and How do I use a dialog box as
for
> both '<asp:EditCommandColumn />' for the updating part, and also the
> '<asp:ButtonColumn />' for the deleting part?  How do I include a dialog
box
> here in both columns to be used as confirmation mechanism?  The intended
> dialog boxes shall ask the user to choose either "yes" or "no" in order to
> proceed or abort, respectively.
>
> Pls help me.
>
> Thanks a lot in advance.
>
> Regards,
> Romy
> Kuala Lumpur,
> Malaysia.
>
>
> ---
>
> ASP.NET 1.0 Namespace Reference with C#
> http://www.wrox.com/acon11.asp?ISBN=1861007442
>
> ASP.NET 1.0 Namespace Reference with VB.NET
> http://www.wrox.com/acon11.asp?ISBN=1861007450
>
> These books are a complete reference to the ASP.NET namespaces
> for developers who are already familiar with using ASP.NET.
> There is no trivial introductory material or useless .NET
> hype and the presentation of the namespaces, in an easy-to use
> alphabetical order ensures a user-friendly reference format.
> We provide in-depth coverage of all the major ASP.NET classes,
> giving you those real-world tips that the documentation doesn't
> offer, and demonstrating complex techniques with simple
> examples.
>
> ---
>
>
> ---
>
> ASP.NET 1.0 Namespace Reference with C#
> http://www.wrox.com/acon11.asp?ISBN=1861007442
>
> ASP.NET 1.0 Namespace Reference with VB.NET
> http://www.wrox.com/acon11.asp?ISBN=1861007450
>
> These books are a complete reference to the ASP.NET namespaces
> for developers who are already familiar with using ASP.NET.
> There is no trivial introductory material or useless .NET
> hype and the presentation of the namespaces, in an easy-to use
> alphabetical order ensures a user-friendly reference format.
> We provide in-depth coverage of all the major ASP.NET classes,
> giving you those real-world tips that the documentation doesn't
> offer, and demonstrating complex techniques with simple
> examples.
>
> ---


  Return to Index