Has anyone else noticed that the design-time support for databinding in custom controls in ASPNET2 sucks? At least for GridViews? So
far I've spent going on two days trying to get the following simple statements to actually generate something at design-time:
gridView = new GridView();
gridView.AutoGe nerateColumns = true;
gridView.DataSo urce = [a List<of simple objects exposing three dummy string properties];
gridView.DataBi nd();
I have tried everything I could think of, or read about in four books on custom control design and what must amount to a couple of
hundred pages of google results. This includes changing when in the control life-cycle the binding code gets executed, trying
different kinds of datasources (including simple arrays of the dummy data objects, custom DataTables built on-the-fly), manually
generating the columns, subclassing GridView and writing custom designers to interact with the GridView more closely at design-time,
and about a thousand other things I won't bother to list. I think by this point I could load my testbed website in a separate
running-under-the-debugger instance of VS2005 in my sleep.
Nothing works. No rows are created. No exceptions are generated. Just deafening silence.
This is unacceptable. When I issue a simple (from the developer perspective) command like that, >>something<< has to happen. Either
the bind takes place, or an exception gets raised about why the bind didn't take place. That could be optional (something like
gridView.DataBi nd(bool TellMeIfSomethi ngGoesWrong)), but >>something needs to happen<<.
I presume the approach for doing databinding at design-time must be radically, fundamentally different from how you do it at
run-time. I have never had a problem getting GridViews to bind at run-time, whether implicitly through DataSourceIDs, or explicitly
through the set DataSource/DataBind() construct.
But if it is radically different it needs to be documented! So far as I can tell, it is not. Which, for any 'Softies out there,
makes me a very unhappy customer.
The favor of a quick reply from Microsoft is greatly anticipated.
- Mark 1 1740
Howdy,
For me it's obvious they didn't want full code compatibility at design time.
To make everything work, entire application would have to be compiled which
would be very slow. Your example it's very simple, but imagine what would
happen in real life scenarios, where application is complex, data retrival is
time consuming. Would it be confortable to work in such enviroment? :)
Best regards
--
Milosz
"Mark Olbert" wrote:
Has anyone else noticed that the design-time support for databinding in custom controls in ASPNET2 sucks? At least for GridViews? So
far I've spent going on two days trying to get the following simple statements to actually generate something at design-time:
gridView = new GridView();
gridView.AutoGe nerateColumns = true;
gridView.DataSo urce = [a List<of simple objects exposing three dummy string properties];
gridView.DataBi nd();
I have tried everything I could think of, or read about in four books on custom control design and what must amount to a couple of
hundred pages of google results. This includes changing when in the control life-cycle the binding code gets executed, trying
different kinds of datasources (including simple arrays of the dummy data objects, custom DataTables built on-the-fly), manually
generating the columns, subclassing GridView and writing custom designers to interact with the GridView more closely at design-time,
and about a thousand other things I won't bother to list. I think by this point I could load my testbed website in a separate
running-under-the-debugger instance of VS2005 in my sleep.
Nothing works. No rows are created. No exceptions are generated. Just deafening silence.
This is unacceptable. When I issue a simple (from the developer perspective) command like that, >>something<< has to happen. Either
the bind takes place, or an exception gets raised about why the bind didn't take place. That could be optional (something like
gridView.DataBi nd(bool TellMeIfSomethi ngGoesWrong)), but >>something needs to happen<<.
I presume the approach for doing databinding at design-time must be radically, fundamentally different from how you do it at
run-time. I have never had a problem getting GridViews to bind at run-time, whether implicitly through DataSourceIDs, or explicitly
through the set DataSource/DataBind() construct.
But if it is radically different it needs to be documented! So far as I can tell, it is not. Which, for any 'Softies out there,
makes me a very unhappy customer.
The favor of a quick reply from Microsoft is greatly anticipated.
- Mark This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: SammyBar |
last post by:
Hi,
I'm trying to bind a custom collection class to a data grid, following the
guidelines from the article
http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx.
The problem is the article is in VisualBasic. I already get the collection
to be recognized as a Data Source by the IDE. It populated the DataGrid
correctly from the fields on the items object of the collection, but I can't
get the DataGrid to...
|
by: waltborders |
last post by:
Hi,
Because the blind are unable to use a mouse, keyboard navigation is
key. A major difficulty is that not all windows forms controls are
keyboard 'tab-able' or 'arrow-able' or have "tab order".
The application is built and the next step is to create the custom JAWS
(Freedom Scientific)screen reader script to read the application. The
application uses the accessibility properties for controls provided by
C#. JAWS reads properties...
|
by: tshad |
last post by:
Many (if not most) have said that code-behind is best if working in teams -
which does seem logical.
How do you deal with the flow of the work?
I have someone who is good at designing, but know nothing about ASP. He can
build the design of the pages in HTML with tables, labels, textboxes etc.
But then I would need to change them to ASP.net objects and write the code
to make the page work (normally I do this as I go - can't do this...
|
by: Shimon Sim |
last post by:
I have a custom composite control
I have following property
|
by: onyxring |
last post by:
I'm reposting this, because I had a bit of difficulty last time and think
that it might have fallen through the cracks. If I'm posting to the wrong
groups, please let me know. Surely someone has some experience with this...
I've been building custom web controls in C# with VS2005. Currently I'm
looking into adding design-time functionality and have reached a point where
I need to generate code in the page the custom control is on. ...
| |
by: George Jordanov Ivanov |
last post by:
Folks,
I am implementing a WebUserControl, which will have its own custom event
StateChanged. Now, I want to add this event to the Events tab in the control
properties, so that the users of my control can set the event handler from
this tab. However, I can't see my custom StateChanged event over there and I
don't know what is the reason. Setting BrowsableAttribute to the public
event property doesn't solve the problem. Any other ideas?
...
|
by: Brant Estes |
last post by:
So try this. Create a new ASP.NET 2.0 website. Add a theme. Add a
skin to the theme. In your web.config, add the <pages theme="MyTheme"
styleSheetTheme="MyTheme" /tag under your system.web node.
Now, on a page, drag out any built in control, such as a label.
Style/Skin it. The control will take the style of the theme at both
runtime and in the designer. Cool!
Now, create a custom server control (inherits from WebControl)....
|
by: Mark Olbert |
last post by:
I've written a composite custom control which I would like to have update its design-time display when one of several properties
changes at design time. These custom properties are not simply the exposed properties of the constituent controls (e.g., they
control how many constitutent controls are displayed).
I am at a loss as to how to go about doing this. I have a custom designer for the control, but I don't see any functionality in the...
|
by: Ken Fine |
last post by:
I've been living with a frustrating issue with VS.NET for some months now
and I need to figure out what the problem is. Hopefully someone has run into
the same issue and can suggest a fix. I suspect some permissions problem.
I'm running VS.NET 2008 in Vista. Symptoms and observations:
* ASP.NET's native ImageMap and Image controls work just fine and provide a
design-time preview of images that are referenced via the ImageUrl property
*...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |