Hi,
I think this is a relatively simple problem, but it's starting to annoy me
quite a bit. I have two issues with a custom Web Part that I have created,
both related to property editing at run time using an EditorZone.
One of my web parts contains a control which displays information for a
particular (default) user. The user should have the ability to select an
alternate user whose information should be displayed in the control, and so I
have defined the relevant property as follows on the custom Web Part:
[Personalizable( true), WebBrowsable(tr ue), WebDisplayName( "Scope code")]
public string ScopeCode
{
get
{
return pr_scopeCode;
}
set
{
pr_scopeCode = value;
}
}
where pr_scopeCode is a private local variable.
To give the user a nicer front end than just a box for the code, I have
written a custom EditorPart to enable the users to be displayed and selected
from a drop-down list. *Problem 1*: although the drop-down list displays
correctly at run time, the value chosen by the user is not saved back to the
page. I can post the code for the custom EditorPart if that would be of
assistance.
I also have some other properties that I wish to allow the user to modify,
including the Title of the web part (I do not wish to open up all the
properties available in the AppearanceEdito rZone). To implement this I have
used the code below:
[Browsable(true) , Personalizable( ), WebBrowsable(),
WebDisplayName( "Title")]
public override string Title
{
get
{
return base.Title;
}
set
{
base.Title = value;
}
}
*Problem 2*: this, and the many other properties that I have marked as
'WebBrowsable' are not displayed in the EditorZone at run time at all.
Please can anyone suggest why these WebBrowsable properties would not be
available for editing at run time, and/or why changes in the custom
EditorPart are not saved back as personalised data? If I use the
AppearanceEdito rZone or other pre-defined EditorZones, changes may be made
and saved back against the user successfully.
Thanks,
Marc 3 6681
Having done a bit more investigation I can see that *Problem 2* is actually
working correctly (rookie error - please don't ask) but *Problem 1* still
exists, seemingly only for static web parts. If I use the Catalog to add
another one of my custom web parts I am able to make the selection from the
drop-down list in the custom EditorZone, and it _is_ saved back to the web
part successfully. To resolve this, I removed the WebBrowsable attribute from
the ScopeCode property, as the 'old' value in the PropertyGridEdi tor was
overwriting the 'new' one selected from the custom Editor.
For the static web part, the value now seems to be saved and the contents of
the webpart updated as required when in *EditDesignMode *, but is _lost_ when
returning to BrowseDesignMod e.
Any ideas? I would rather avoid adding all existing static web parts
dynamically in code.
Thanks,
Marc
Could I ask about the rookie error? I must be doing the same because I just
can't see any of my custom properties.
Thanks,
"Marc Woolfson" wrote:
Having done a bit more investigation I can see that *Problem 2* is actually
working correctly (rookie error - please don't ask) but *Problem 1* still
exists, seemingly only for static web parts. If I use the Catalog to add
another one of my custom web parts I am able to make the selection from the
drop-down list in the custom EditorZone, and it _is_ saved back to the web
part successfully. To resolve this, I removed the WebBrowsable attribute from
the ScopeCode property, as the 'old' value in the PropertyGridEdi tor was
overwriting the 'new' one selected from the custom Editor.
For the static web part, the value now seems to be saved and the contents of
the webpart updated as required when in *EditDesignMode *, but is _lost_ when
returning to BrowseDesignMod e.
Any ideas? I would rather avoid adding all existing static web parts
dynamically in code.
Thanks,
Marc
Ok it really was a rookie error... my properties were not public.
"GBelzile" wrote:
Could I ask about the rookie error? I must be doing the same because I just
can't see any of my custom properties.
Thanks,
"Marc Woolfson" wrote:
Having done a bit more investigation I can see that *Problem 2* is actually
working correctly (rookie error - please don't ask) but *Problem 1* still
exists, seemingly only for static web parts. If I use the Catalog to add
another one of my custom web parts I am able to make the selection from the
drop-down list in the custom EditorZone, and it _is_ saved back to the web
part successfully. To resolve this, I removed the WebBrowsable attribute from
the ScopeCode property, as the 'old' value in the PropertyGridEdi tor was
overwriting the 'new' one selected from the custom Editor.
For the static web part, the value now seems to be saved and the contents of
the webpart updated as required when in *EditDesignMode *, but is _lost_ when
returning to BrowseDesignMod e.
Any ideas? I would rather avoid adding all existing static web parts
dynamically in code.
Thanks,
Marc
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: bob |
last post by:
I have been trying to auto generate a proxy from a WSDL file. I do
this fairly regularly, so I am not a novice, but perhaps I am missing
something easy. I searched on the problem, but did not find too much
that was helpful...
I am trying to tie into the web services offered by a large firm.
They have a basic set of methods I was able to integrate easily into
my project using the tried and true "auto generate the proxy method".
The...
|
by: Earl Bonovich |
last post by:
This is a repost from my question in the buildcontrol sub group.
----------------
I have created a composite custom control.
It works fine, renders, all is good on that side.
I am trying to cleaup the design mode side of it, and in turn clean up the
core control.
All surounding properties.
|
by: Paul Perot |
last post by:
Hi All:
I need some help. I am using DSOFile.exe to examine and add and/or
manipulate some document and custom properties on a JPEG file. When the
document properties are correct, I would like to copy or move the modified
file to a new location. The problem that I am having is that the modified
file is somehow being held in memory and not being released. I use the
following code to read in the file:
Try
|
by: Robert |
last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into
some sporadic viewstate errors...usually saying the viewstate is invalid,
eventvalidation failed or mac error.
My web config does specify a machinekey setting:
<machineKey
validationKey="447C05E8B3A71401CC4CAE5513A7F1A3494A3618EE819316AAD1D58433F236A759D66FB4154500E01EB4E1BC1DE42046E2D652D391CB8367A1649438867A02EB"...
|
by: cendrizzi |
last post by:
Hi all,
I've read some stuff on this but can't seem to come up with a solution
that works right. I have a semi-mature (yet very large and robust)
internal web application that currently only works with one window open
at a time.
Maybe I'm abusing the use of $_SESSION but I have data entry processes
split up in several steps (which is required since depending on what
was put before determines what pages will be shown after). To store...
| |
by: Matt F |
last post by:
I have a deployment project that I'm setting up. I need to perform a
different custom action based on whether this is a first time install or an
update. Does anyone have any idea if it's possible to set the Condition
property of a custom action to determine if the currently running install is
upgrading a previous installation and if so how? I'm also open to other
methods of acheiving this functionality.
|
by: Handle |
last post by:
Hi,
I have to persist the following property on a "per user" basis:
public Hashtable listOfViews
{
get
{
|
by: =?Utf-8?B?UmljaEI=?= |
last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I
would like to dynamically add panes to the control with a form template added
when the pane is added. I have tried unsuccessfully in creating the whole
pane as a user control and have succeeded in adding the pane and then
dynamically adding the content which is a user control to the pane,
dynamically within the page.
However I would like to have a single pane...
|
by: Miro |
last post by:
I am having an annoying vs2008 pro ( vb ) issue.
I have a custom class for a date cell for the datagridview column.
I use the column in the datagrid on a cell.
And every once in a while - the form cannot be displayed because it thinks
the 'DataGridViewDateColumn' doesnt exist.
"Count not find type ' .. and its like the datagridviewdatacolumn.vb i have
in my project is not compiled.
|
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...
|
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: 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: 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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |