473,722 Members | 2,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid OnItemCommand not firing

Hi

I am using the datagrid OnItemCommand to fire an event to remove a
cell.

e.Item.Cells.Re moveAt(7)
e.Item.Cells[6].ColumnSpan = 2;

Which works fine first time through but when I submit a button that
resides in a user control with a search box also on the page the
OnItemCommand command does not seem to do what it should.

e.Item.Cells[7] reappears throwing the whole datagrid out of shape.

Your help would be appreciated

Nov 17 '05 #1
0 1157

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

Similar topics

3
1098
by: Andrea Williams | last post by:
I still consider myself to be a novice with ASP.NET, and going through the samples in my books is not helping me spot the problem. I very often find my answer after I've posted so maybe it will happen again? :-) I'm having trouble getting an ButtonColumn click event to fire. I set a break point in the event method and it doesn't break. here's my Datagrid in the ASPX file: <asp:datagrid id="dgdSearchResults" runat="server"
2
336
by: vinay | last post by:
I implemented paging on this grid OnPageIndexChanged="dgSales_Page" When i click Next page, it is firing OnItemCommand insted of OnPageIndexChanged ??? <asp:datagrid id="dgSales" runat="server" Width="100%" AutoGenerateColumns="False" HeaderStyle-CssClass="datagridheader" PagerStyle-Visible="False" DataKeyField="referralID" AllowSorting="True" OnSortCommand="SortSales"
4
2074
by: Luis Esteban Valencia | last post by:
I have a asp.net page (C#), with a datagrid. I use template for all columns, and have <asp:requiredfieldvalidator> in with one of the textboxes, to make sure it's filled in. However, this validation is not firing, even when I leave the field empty. Below please find the code: <%@ Page Language="C#" Debug="true" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SqlClient" %>
1
1665
by: Stu | last post by:
Hi, I have a button in the footer of a datagrid that sometimes does not tigger the item command. The page is quite large & has a number of homegrown controls in it. Has anyone come across this type of behaviour before? Can anyone suggest a solution? Thanks in advance, Stu
4
2137
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with a Delete button on the end of each row. I am unable to gain access to the event when the button is clicked. I don't fully understand how the click gets connected to the C# code,
2
1683
by: Lagwagon | last post by:
I have an Image Button inside of a Datagrid and its not firing the datagrid.itemcommand event when it is clicked. Does anyone have a link to a tutorial or a solution for this problem? For my datagrid I do have the OnItemCommand propert set. <asp: Datagrid id="DataGrid1" runat="server" OnItemCommand="gStarted"> In the code the function is:
0
1135
by: LeAnne | last post by:
In my ASPX page, I populate the GRID when the user selects an item in the dropdown list. Thus, the data is fetched and the data grid DataBind() method is executed in the PostBack (i.e. IsPostBack = TRUE on the server side). At this time the data grid has some information and is now displayed. How ever, the OnItemCommand that I've specified in the data grid doesn't seem to get executed at ALL. I.e. i've placed a simple button control...
2
1471
by: praveenkhade | last post by:
I got a prob I am using a repeater to display the product docs. M using OnItemCommand but its not firing. can u tell me wat might be the prob, I made viewstate as enable. Plz help me <asp:DataList ID="dlData" runat="server" DataKeyField="prod_doc_id" EnableViewState=true RepeatColumns=3 RepeatDirection=Horizontal OnItemCommand="DoThis"> <ItemTemplate> <table align="right" style="vertical-align: top"> <tr align="left" valign="top">...
8
1255
by: brock wade | last post by:
I have a Datagrid that is working fine displying my records, but I'm trying to program buttons on each record line to launch another web page that shows all the details for the product: <asp:datagrid id="dgProducts" runat="server"> <asp:ButtonColumn Text="Details" CommandName="Details" ButtonType="PushButton"></asp:ButtonColumn> </asp:datagrid>
0
8863
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9384
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
9088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4502
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...
1
3207
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
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
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.