473,607 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

handling events in template columns created dyanmically

red
i have a template column for datagrid created dynamically in which i have a
image button

i am able to display the images for the imagebuttons from datatable but not
able to generate the image button click event .
1)mygrid.ItemCo mmand += new DataGridCommand EventHandler(my _fucntion);

2)img.CommandNa me = "iclick";

3)public void my_function(obj ect sender, DataGridCommand EventArgs e)
{
if(e.commandnam e = "iclick"
{
............... .......
............... .
}
}
but
when i click on the imagebutton i cannot reach to step 3

thanks
red

Nov 18 '05 #1
0 862

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1318
by: Makarand | last post by:
Hi Friends I am having problem in Event handling in ASP.NET. Let me tell you what I am doing, I have having DataGrid for which I am using 'Dynamic addition of Template controls'. For this I have set 'AutoGenerateColumns' property as false. I am raising few events from the Template controls e.g Text Chamged event of TextBox UI control, and bubbling the same event to the Parent control using 'RaiseBubbleEvent' method of Control class. I...
1
4697
by: wsyeager36 | last post by:
I have a datagrid inside a datalist. The datalist shows parent info and the datagrid shows the child info for that parent. There is a checkbox on each row of the child datagrid. Also inside the datalist is a radiobuttonlist. When this radiobuttonlist is checked, I would like it to iterate thru each row on the child grid and either select or deselct the checkboxes (which are on each row of the child datagrid). In addition, the user can also check...
1
1121
by: Rich | last post by:
I'm working on a Data Grid app. For a number of reasons (mostly aesthetic) I don't want to use the standard approach with Button Columns for doing updates on a row-by-row basis. I know I can create Template Columns that contain Web Controls. I want to handle postback events (TextChanges on a TextBox, for example) on Web Controls contained in a Template Column. Does anybody know of a way to write "AddHandlers" for those Sample code, maybe?...
4
1582
by: JezB | last post by:
I am dynamically creating WebControls and creating them on my page. Some of these are buttons, and I attach events to these buttons. The problem is these force a post-back, so I must regenerate all the webcontrols in the same way (I am assuming - am I right?). It was all working fine but now I get the error: "An error has occurred because a control with auto-generated id '_ctl129' could not be located to raise a postback event. To...
2
1431
by: Suma | last post by:
I have a problem with editable datagrid and was hoping if anyone could help me. Please help me if possible. I have an editable datagrid, whose column count I don’t know until runtime. I am sure of 3 columns Id,Name and Description. But there also might be more. So I add these 3 columns and an editcommandbutton and deletecommnadbutton at design time. Then during runtime I insert my other columns that I need, in between
12
2780
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown when menu items are clicked.Besides these i would like to put a custom status bar. Any error message encountered in any of the webpage will be displayed in the banner. The problem iam encountering is how to access the customer status bar in child...
3
13735
by: NateDawg | last post by:
I'm reposting this. I'm kinda in a bind untill i get this figured out, so if anyone has some input it would sure help me out. Ok, I’ve noticed a few gridview problems floating around the forum. Everyone wants to do a java confirmation box when a user clicks the delete button. Fair enough, basic user design rules state that you should always confirm a delete action. There is also a consensus that the best way to do this is a template...
9
11888
by: lilOlMe | last post by:
Hi there! I have generated a GridView that looks something like: SportName| CompanyNameX |CompanyNameY |CompanyNameZ Hockey.....| Shipping------------ |Accounting-------- |Shipping------------ BaseBall...| Receiving-----------|Shipping------------|Accounting--------- Etc............| Accounting----------|Receiving---------- |Receiving----------- Where there are an unknown number of Company Names and an unknown number of Sport...
4
10998
by: Craig Buchanan | last post by:
I dynamically add data-bound templates to a gridview in my ascx control. while this works correctly when the gridview is databound to the datatable, i'm having issues on postback. i would like to iterate thru the gridview's rows, examine the databound controls, then perform a database action. for some reason, i can't find the controls. i have a two templates: one that uses a label the other uses a textbox to display data. when the...
0
8472
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8464
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6805
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3954
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4015
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2464
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.