473,761 Members | 4,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hosting ascx's inside a datagrid....

Jim
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 expanded row still
expanded and the web user control is displayed.

BUT

the problem is when I click on something inside the web user control
displayed in the expanded dataGrid row the action works fine BUT when the
main page refreshes and the datagrid is redrawn the web user control is not
displayed anymore....

So the question is if I display a web user control in a datagrid by
overriding the 'OnItemCreated' method do I have to do anything specifically
to save the State of the web user control?

If not does anyone no a solution to the problem?

Hope this makes sense....

Cheers

Earth Worm Jim
Nov 17 '05 #1
3 1595
Zi
Jim,
I am having a similar problem with a user control within a data
grid... did you find a solution? if so could you post please:)

Regards,

Zi
Nov 17 '05 #2
Jim
not yet will post when i get a solution

Earth Worm Jim

"Zi" <zi*****@yahoo. com> wrote in message
news:8b******** *************** ***@posting.goo gle.com...
Jim,
I am having a similar problem with a user control within a data
grid... did you find a solution? if so could you post please:)

Regards,

Zi

Nov 17 '05 #3
Jim
Zi

The answer for me was to call Page.DataBind() inside the web user control
(ascx file) when the button click event is fired.

HTH

Earth Worm Jim

"Jim" <ssss> wrote in message news:#S******** ******@TK2MSFTN GP11.phx.gbl...
not yet will post when i get a solution

Earth Worm Jim

"Zi" <zi*****@yahoo. com> wrote in message
news:8b******** *************** ***@posting.goo gle.com...
Jim,
I am having a similar problem with a user control within a data
grid... did you find a solution? if so could you post please:)

Regards,

Zi


Nov 17 '05 #4

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

Similar topics

2
2269
by: Stephen | last post by:
Hey everyone. I was wondering if someone could help me with a small problem. I have designed a user control and I would have inserted it on a aspz page (WebForm1). The User control is being used to help with the navigation through a datagrid. The control handles all the paging issues and on the webform I do all the DataBinding. My problem is that at the end of code of an on-click event for a link button on my user control...
6
1404
by: jty202 | last post by:
"Although we do support the ASP.NET Starter Kits, we do not do the installation for you. You can run the installation file locally, then upload the kit. You will not be able to compile on the server. You will be able to set your .NET virtual directories through our web based control panel. This same support is available for DotNetNuke. We support the application, but not the installation. Please let us know if you have additional...
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
1487
by: Francis | last post by:
Hi all, I am writing a .cs component that sets RegisterHiddenField on the server side and generates javascript to execute on the client side. It works when the component is directly in the page, but not when it is inside an ascx. In the source code of the page, I can see that the ascx adds an prefix before the ID of the hidden field. This kind of thing is no problem when you are using javascript on objects such as buttons, that have a...
1
996
by: Jason Shohet | last post by:
We have some db-search functionality that we need in several asp.net apps. How to get reuse out of this... I was thinking of putting the search criteria, and the datagrid that displays the results, in an ascx control that can be plopped down in any of our apps. 1. I'm just not sure about putting a datagrid in an ascx -- any minuses to doing this? 2. Can an ascx can call a web service (thats where we put our ADO stuff --
4
2704
by: Chris | last post by:
I have an ASCX (I think thats called a user control), with a public property of "TextStatic". I want to put this ASCX into a datagrid's template item and bind a data sources to the TextStatic property. Is there any way to do this? I tried setting <Bindable(true)> to the property, but that didn't seem to make the "TextStatic" property showup in the Bindable properties of the ASCX.
1
3390
by: rodrigo | last post by:
This is what I am doing public class GridCustomPaging : System.Web.UI.Page { protected System.Web.UI.WebControls.DataGrid DgSearch;
6
2787
by: tshad | last post by:
I have an ascx file I am using to include my logos and heading information for all my pages. It was working fine up until now. I decided to set up an admin folder inside of my main folder and move one of my files into it - now my links don't work. I have a setup:
2
1225
by: Tina | last post by:
I am accustomed to displaying datagrids in ASPX pages with data in textboxes inside template items. Normally I have an Update button on the form. In the click event of that button I spin through the datagrid comparing the values in the editable textboxes with the original values to determine what needs updating. I have done this dozens of times and it always works great. BUT, now I'm doing that same thing in an ASCX control. I have...
4
3450
by: | last post by:
I'm building some user controls. I very much like how you can build custom properties to be bound to a user control, and how instances of that control will show those custom properties in the VS.NET IDE. I've made a user control -- let's call it MyUserControl.ascx -- with a DataGrid and an SqlDataSource. The SqlDataSource that loads content by categoryID. I've defined a property on MyUserControl.ascx called ContentCategoryID.
0
9538
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
10123
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
9975
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
8794
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
7342
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
6623
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
5384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3481
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2765
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.