|
Re: Image Button in the Template column of the datagrid: msg#00147windows.devel.dotnet.web
Do you have an event handler for the DataGrid? If not, you need, probably within your Page_Init method, a handler as follows: dtgrdPendingCases.ItemCommand =+ new DataGridCommandEventHandler(dtgrdPendingCases_ItemCommand); Christopher Reed Web Applications Supervisor Information Technology City of Lubbock creed@xxxxxxxxxxxxxxxxxxxxx "The oxen are slow, but the earth is patient." >>> parikshith.padala@xxxxxxxxxxxxx 3:31:03 PM 6/28/2005 >>> Oflate It is observed that none of the events on this user control are getting fired.The datagrid i have mentioned below is in this user control. Now the issue is why the events of the dynamically loaded user control are not getting fired. Thank You parikshith -----Original Message----- From: Discussion of building .NET applications targeted for the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx]On Behalf Of Padala, Parikshith Sent: Tuesday, June 28, 2005 3:41 PM To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx Subject: [DOTNET-WEB] Image Button in the Template column of the datagrid Hi I have an image Button in the template column of the data grid. The Image Button click does'nt invoke the ItemCommand of the datagrid. Any ideas on what am i doing wrong here. The code listing : Private void Page_Load(object sender, System.EventArgs e) { if(!IsPostBack) { LoadReportGrid(); } } private void dtgrdPendingCases_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { TextWriter tw = new StreamWriter("C:\\ImageButtonTest.txt"); // write a line of text to the file tw.WriteLine("); tw.Flush(); tw.close() } =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Timeout debugging web service: 00147, Ainsley, Robert, ISD |
|---|---|
| Next by Date: | A question of design... to Refactor a webform or not.: 00147, Robert Dickson |
| Previous by Thread: | Re: Image Button in the Template column of the datagridi: 00147, Padala, Parikshith |
| Next by Thread: | A question of design... to Refactor a webform or not.: 00147, Robert Dickson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |