473,734 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid events inside a user control

Hello,

I have a usercontrol that I have built that has a single generic
datagrid. When setting up the inital properties I build the template
columns for the datagrid dynamically so it can display as readonly or
readwrite. The readwrite displays link buttons for edit, update,
cancel and delete buttons.

When I click on a edit link button the page using the usercontrol will
begin it's page load event and then the usercontrol page load event.
However, the edit event is never fired.

I can get the edit event to fire if I bind the dataset to the data
grid on every usercontrol page load. The problem with binding to the
datagrid on every page load is during the update. Whenever, a user
changes data in a textbox control within the datagrid control those
changes are lost due to the databinding on the page load.

If I don't do the databind then the events do not fire and I render a
null datagrid.

How can I retrieve the user's changes during the update command and
have the events fire?

Any help would be appriciated.

Thanks,

Dan.
Nov 17 '05 #1
0 1405

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

Similar topics

5
12236
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. The ID is a member of the keys array. I then create a DataView dv over the table, and sort it by Display and ID column (in case of duplicate Display). I then set my DataGrid.DataSource = dv; I then load the datatable with my rows, and this is...
3
448
by: Jim | last post by:
I have derived of DataGrid to give functionality of an expandable dataGrid (similar to article in October2003 MSDN). I have override the LoadStateView and SaveStateView to save the extra properties I have added to the derived class. It works perfectly fine at expanding and collapse the row that was clicked on, it displays a web user control (*.ascx) correctly. When the refresh button is pressed(F5) it refreshes correctly with the...
0
314
by: Vikram Sinha | last post by:
Hi, I have placed a datagrid inside a web user control. The datagrid is getting displayed without any problem. But the datagrid's postback event handlers are not getting called whenever any control inside the datagrid does postback. Other events like ItemCreated, ItemDatabound are getting called properly. Can you please help fix this problem. TIA, Vikram
7
2277
by: Lars Netzel | last post by:
If I put a checkbox in a datagrid (ASP.NET) and set the Autopostback to true I can catch OnChange event on checkbox but how do I then catch what DataGridItemIndex is? Can I use some Event in the Datagrid that will fire off when the Checkbox is changed? regards /Lars
10
1905
by: Terry Olsen | last post by:
I've got a datagrid set up to display data. I've also got an Edit,Update,Cancel column set up to allow editing of data. I've got a DropDownList (ID="ddl3")in the EditItemTemplate for a certain column that I need to populate while in Edit Mode. Two questions: Is there a way to directly use another DropDownList as a DataSource? If so how? I'm using the following code to try to populate the DropDownList, but
2
3684
by: Luis Esteban Valencia Muñoz | last post by:
I have a datagrid that displays editable text fields (2 different price fields) and a checkbox in every row. It has a "SaveChanges" button at the bottom, which, when pressed, looks at every checkbox in the datagrid, if it is checked, it updates the corresponding rows prices. That works, no problem. What I need to do is that when a user clicks into either of the price text fields, the checkbox automatically checks itself. This will save...
2
2376
by: Carl Tribble | last post by:
Is there any way to reliably catch KeyUp events for Function keys in particular while inside a datagrid? I have a form with KeyPreview=True and I am using the Form.KeyUp event to handle several function keys (F5, F6, etc.) The problem is I have a datagrid on this form and it seems whenever the datagrid has the focus, it consumes most of the key events without passing them on to me. I have tried using a DataGridTextBox control, which...
1
2041
by: margant | last post by:
Dear Professionals, I have placed my datagrid : .... <asp:Datagrid ID="DGEdu" runat="server" OnDeleteCommand="DGEdu_Remove" OnItemDataBound="DGEdu_ItemDataBound" OnItemCommand="DGEdu_OnItemCommand" AutoGenerateColumns="false"
1
1953
by: johnson.bj | last post by:
I have a relatively minor problem that has been bugging me for a long time. I have created a user control which consists of a few panels and labels. What I want to do with this user control is to change its back color when the mouse hovers over it and to change the back color to its previous color when the mouse leaves the control creating the illusion of the control being highlighted. Now I assumed that after the user control was...
0
8776
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
9449
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
9310
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
8186
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...
0
6031
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
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
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
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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.