Data grid help pls

R

Raghu Raman

HI,

IS IT POSSIABLE TO EDIT THE DATAGRID,IF I CLICK IT WITH OUT DISPLAYING
THE EDIT ,UPDATE,CANCEL COLUMN.


If so ,please help

With Regards
Raghhu
 
M

Michelle Hlaing

Hi Raghhu

When you click on the datagrid, the ItemCommand event is fired. Depending on what you want to do, in the ItemCommand event you can check if
e.CommandName equals to Edit, Update or Cancel. You would have to associate a control to a CommandName and when you click a particular control
with the functionality, it would complete the code block corresponding to it.

For example:

private void dgContacts_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if (e.CommandName == "Add")
{
//do something
}
}

Hope that helps,

Michelle

***Disclaimer: This posting is provided "as is" with no warranties and confers no rights.***
--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top