Hello,
I created a user control that has a ListBox and a RadioButtonList (and other
stuff). The idea is that I put the user control on the ASPX page multiple
times and each user control will load with different data (locations,
departments, etc.).
When I click the RadioButtonList the Event is raised on the user control and
I can consume(?) it on the ASPX page. However, I needed to give each user
control its own ID, add the "protected UserControlType userControlID" to the
declarations, and then wire each of them to an Event to get them to work or
to even recognize their ID when the Event is raised.
It works, but my understanding that this is a poor way of doing things. Is
there a better way to approach this?
Here's some of the code in the ASPX page, to recognize the Event:
private void InitializeComponent(){
this.Load += new
System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
private void ChangedSelectionUCRadioButtons(object sender, System.EventArgs
e)
{
ReLoadControls((Selection)sender);
}
Thank you for the help.
-Gummy 9 3096
Is all you have to do is reload all the UserControls on the aspx page?
In this case, there is no need to wire up all of these controls on your
aspx page, you should defer these events into the UserControl itself.
Otherwise you have to wire up each and every event like you are doing.
If you wire the events within the UserControl, and have each of them
call a method on the aspx page to "ReloadControls" then that should do
the trick.
What advantage are you getting out of wiring the events on the aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong please.
Thanks
Sean
Gummy wrote:
Hello,
I created a user control that has a ListBox and a RadioButtonList (and other
stuff). The idea is that I put the user control on the ASPX page multiple
times and each user control will load with different data (locations,
departments, etc.).
When I click the RadioButtonList the Event is raised on the user control and
I can consume(?) it on the ASPX page. However, I needed to give each user
control its own ID, add the "protected UserControlType userControlID" to the
declarations, and then wire each of them to an Event to get them to work or
to even recognize their ID when the Event is raised.
It works, but my understanding that this is a poor way of doing things. Is
there a better way to approach this?
Here's some of the code in the ASPX page, to recognize the Event:
private void InitializeComponent(){
this.Load += new
System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
private void ChangedSelectionUCRadioButtons(object sender, System.EventArgs
e)
{
ReLoadControls((Selection)sender);
}
Thank you for the help.
-Gummy
dkode,
Thank you for responding..
I think I may have mislead you by having the
ReLoadControls((Selection)sender) method. It should be more like
PutInNewDataBasedOnRadioButtonChoices((Selection)s ender). So I am not
reloading each UserControl, they are placed statically on the page, I am
just reloading or changing the data that appears in the specific
UserControl.
Being new to this, I am not exactly sure what the difference is between
wiring up the Events in the UserControl or on the ASPX page. My assumption
is that I need to have an event in the UserControl that is raised when an
RadioButtonList is selected. Then that Event can only be recognized in the
ASPX page if I wire it, for each an every UserControl. To me, it seems like
there is a better way to do it (not that I have any clue). For example, if a
button is clicked on a UserControl, I thought the Event is raised and the
ASPX page should know that something was clicked on it and then be able to
find the specific UserControl that was clicked. All that without actually
having to manually wire each Event in the ASPX page. Maybe I am taking OOP
too far?
So if I understand you correctly, I may be doing this right. Right?
The issue, so to speak, was that I was talking to a programmer and he only
gave hints about ViewStates and other methodologies to be more in line with
proper OOP. For now, I figure it works and as I learn more I can improve
upon it.
Thanks again so much for the information.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Is all you have to do is reload all the UserControls on the aspx page?
In this case, there is no need to wire up all of these controls on your
aspx page, you should defer these events into the UserControl itself.
Otherwise you have to wire up each and every event like you are doing.
If you wire the events within the UserControl, and have each of them
call a method on the aspx page to "ReloadControls" then that should do
the trick.
What advantage are you getting out of wiring the events on the aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong please.
Thanks
Sean
Gummy wrote:
>Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.). When I click the RadioButtonList the Event is raised on the user control and I can consume(?) it on the ASPX page. However, I needed to give each user control its own ID, add the "protected UserControlType userControlID" to the declarations, and then wire each of them to an Event to get them to work or to even recognize their ID when the Event is raised. It works, but my understanding that this is a poor way of doing things. Is there a better way to approach this? Here's some of the code in the ASPX page, to recognize the Event: private void InitializeComponent(){
this.Load += new System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons);
ucDepartment.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons);
} private void ChangedSelectionUCRadioButtons(object sender, System.EventArgs e)
{
ReLoadControls((Selection)sender);
} Thank you for the help. -Gummy
Ok,
That gives me a better idea of what you are trying to do. Next
question:
Is the data that is changed in one UserControl change the data to be
displayed in other UserControls?
Secnario 1:
If you only need to change one UserControls data, then keep you all of
your processing within the UserControls on that level, don't bother
handling anything within the ASPX page, this will only make your
processing more complicated and unnecessary. In this sense, what you
would do is wire up the SelectedIndexChanged event, and handle it
within the appropraite UserControl
Secnario 2:
If one change on one UserControl changes data on all/other UserControls
on the page, it depends on what type of change is taking place.
If you need to reload/modify only a couple of UserControls it might be
best to have methods in your ASPX page that one UserControl calls and
then it can change other UserControls. If you need to reload ALL the
UserControls you could have a delegate setup in your ASPX page that all
of your usercontrols can subscribe to, then when one change is made,
you could fire the delegate that would in turn call methods on other
usercontrols. (this would be the true OOP approach to your problem,
using a multicast delegate)
Heres a tutorial on multicast delegates: http://en.csharp-online.net/index.ph...tes_and_Events
Gummy wrote:
dkode,
Thank you for responding..
I think I may have mislead you by having the
ReLoadControls((Selection)sender) method. It should be more like
PutInNewDataBasedOnRadioButtonChoices((Selection)s ender). So I am not
reloading each UserControl, they are placed statically on the page, I am
just reloading or changing the data that appears in the specific
UserControl.
Being new to this, I am not exactly sure what the difference is between
wiring up the Events in the UserControl or on the ASPX page. My assumption
is that I need to have an event in the UserControl that is raised when an
RadioButtonList is selected. Then that Event can only be recognized in the
ASPX page if I wire it, for each an every UserControl. To me, it seems like
there is a better way to do it (not that I have any clue). For example, if a
button is clicked on a UserControl, I thought the Event is raised and the
ASPX page should know that something was clicked on it and then be able to
find the specific UserControl that was clicked. All that without actually
having to manually wire each Event in the ASPX page. Maybe I am taking OOP
too far?
So if I understand you correctly, I may be doing this right. Right?
The issue, so to speak, was that I was talking to a programmer and he only
gave hints about ViewStates and other methodologies to be more in line with
proper OOP. For now, I figure it works and as I learn more I can improve
upon it.
Thanks again so much for the information.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Is all you have to do is reload all the UserControls on the aspx page?
In this case, there is no need to wire up all of these controls on your
aspx page, you should defer these events into the UserControl itself.
Otherwise you have to wire up each and every event like you are doing.
If you wire the events within the UserControl, and have each of them
call a method on the aspx page to "ReloadControls" then that should do
the trick.
What advantage are you getting out of wiring the events on the aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong please.
Thanks
Sean
Gummy wrote:
Hello,
I created a user control that has a ListBox and a RadioButtonList (and
other
stuff). The idea is that I put the user control on the ASPX page multiple
times and each user control will load with different data (locations,
departments, etc.).
When I click the RadioButtonList the Event is raised on the user control
and
I can consume(?) it on the ASPX page. However, I needed to give each user
control its own ID, add the "protected UserControlType userControlID" to
the
declarations, and then wire each of them to an Event to get them to work
or
to even recognize their ID when the Event is raised.
It works, but my understanding that this is a poor way of doing things.
Is
there a better way to approach this?
Here's some of the code in the ASPX page, to recognize the Event:
private void InitializeComponent(){
this.Load += new
System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
private void ChangedSelectionUCRadioButtons(object sender,
System.EventArgs
e)
{
ReLoadControls((Selection)sender);
}
Thank you for the help.
-Gummy
dkode,
Once again, thanks so much for the very detailed reply and link.
It is Scenario 1. Right now when a change is made to the UserControl, I have
that event in the UserControl and it is wired up in the ASPX.
Specifically, do I need to have every single UserControl wired in the ASPX
page? In the code below, the rblCodeDescrChanged is the Event in the
UserControl. So do I need to add the line for each UserControl (ucLocation,
ucDepartment, etc.)?
private void InitializeComponent(){
this.Load += new System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
By the way, the code compiles just fine, but I do get the error saying that
the rblCodeDescrChanged event does not exist (or something like that), when
obviously it does. Any thoughts on that?
What if I have multiple events in the UserControl? One for a button click,
one for a dropdownlistbox, do I need to wire the user control for each
event. My hope and assumption is that I can use the Delegates for that (I'll
read the link you sent).
I really appreciate you taking the time to answer my questions so
thoroughly. You have helped me so much and I've learned a great deal. Thank
you.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Ok,
That gives me a better idea of what you are trying to do. Next
question:
Is the data that is changed in one UserControl change the data to be
displayed in other UserControls?
Secnario 1:
If you only need to change one UserControls data, then keep you all of
your processing within the UserControls on that level, don't bother
handling anything within the ASPX page, this will only make your
processing more complicated and unnecessary. In this sense, what you
would do is wire up the SelectedIndexChanged event, and handle it
within the appropraite UserControl
Secnario 2:
If one change on one UserControl changes data on all/other UserControls
on the page, it depends on what type of change is taking place.
If you need to reload/modify only a couple of UserControls it might be
best to have methods in your ASPX page that one UserControl calls and
then it can change other UserControls. If you need to reload ALL the
UserControls you could have a delegate setup in your ASPX page that all
of your usercontrols can subscribe to, then when one change is made,
you could fire the delegate that would in turn call methods on other
usercontrols. (this would be the true OOP approach to your problem,
using a multicast delegate)
Heres a tutorial on multicast delegates: http://en.csharp-online.net/index.ph...tes_and_Events
Gummy wrote:
>dkode,
Thank you for responding..
I think I may have mislead you by having the ReLoadControls((Selection)sender) method. It should be more like PutInNewDataBasedOnRadioButtonChoices((Selection) sender). So I am not reloading each UserControl, they are placed statically on the page, I am just reloading or changing the data that appears in the specific UserControl.
Being new to this, I am not exactly sure what the difference is between wiring up the Events in the UserControl or on the ASPX page. My assumption is that I need to have an event in the UserControl that is raised when an RadioButtonList is selected. Then that Event can only be recognized in the ASPX page if I wire it, for each an every UserControl. To me, it seems like there is a better way to do it (not that I have any clue). For example, if a button is clicked on a UserControl, I thought the Event is raised and the ASPX page should know that something was clicked on it and then be able to find the specific UserControl that was clicked. All that without actually having to manually wire each Event in the ASPX page. Maybe I am taking OOP too far?
So if I understand you correctly, I may be doing this right. Right?
The issue, so to speak, was that I was talking to a programmer and he only gave hints about ViewStates and other methodologies to be more in line with proper OOP. For now, I figure it works and as I learn more I can improve upon it.
Thanks again so much for the information.
-Gummy
"dkode" <dk****@gmail.comwrote in message news:11**********************@h48g2000cwc.googleg roups.com...
Is all you have to do is reload all the UserControls on the aspx page?
In this case, there is no need to wire up all of these controls on your
aspx page, you should defer these events into the UserControl itself.
Otherwise you have to wire up each and every event like you are doing.
If you wire the events within the UserControl, and have each of them
call a method on the aspx page to "ReloadControls" then that should do
the trick.
What advantage are you getting out of wiring the events on the aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong please.
Thanks
Sean
Gummy wrote: Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.). When I click the RadioButtonList the Event is raised on the user control and I can consume(?) it on the ASPX page. However, I needed to give each user control its own ID, add the "protected UserControlType userControlID" to the declarations, and then wire each of them to an Event to get them to work or to even recognize their ID when the Event is raised. It works, but my understanding that this is a poor way of doing things. Is there a better way to approach this? Here's some of the code in the ASPX page, to recognize the Event: private void InitializeComponent(){
this.Load += new System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons);
ucDepartment.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons);
} private void ChangedSelectionUCRadioButtons(object sender, System.EventArgs e)
{
ReLoadControls((Selection)sender);
} Thank you for the help. -Gummy
Ok,
If changes inside one UserControl only affect that UserControl, then
you should have no event wiring in the aspx page. Keep all of your
event related wiring within the UserControl.
In each UserControl you will have to wire the events for that
UserControl via InitializeComponent.
Now, for my next question,
Is each UserControl exactly the same? or all they all different?
Because if they are all the same, you can dynamically add them to the
page which would save you a great deal of time.
Gummy wrote:
dkode,
Once again, thanks so much for the very detailed reply and link.
It is Scenario 1. Right now when a change is made to the UserControl, I have
that event in the UserControl and it is wired up in the ASPX.
Specifically, do I need to have every single UserControl wired in the ASPX
page? In the code below, the rblCodeDescrChanged is the Event in the
UserControl. So do I need to add the line for each UserControl (ucLocation,
ucDepartment, etc.)?
private void InitializeComponent(){
this.Load += new System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
By the way, the code compiles just fine, but I do get the error saying that
the rblCodeDescrChanged event does not exist (or something like that), when
obviously it does. Any thoughts on that?
What if I have multiple events in the UserControl? One for a button click,
one for a dropdownlistbox, do I need to wire the user control for each
event. My hope and assumption is that I can use the Delegates for that (I'll
read the link you sent).
I really appreciate you taking the time to answer my questions so
thoroughly. You have helped me so much and I've learned a great deal. Thank
you.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Ok,
That gives me a better idea of what you are trying to do. Next
question:
Is the data that is changed in one UserControl change the data to be
displayed in other UserControls?
Secnario 1:
If you only need to change one UserControls data, then keep you all of
your processing within the UserControls on that level, don't bother
handling anything within the ASPX page, this will only make your
processing more complicated and unnecessary. In this sense, what you
would do is wire up the SelectedIndexChanged event, and handle it
within the appropraite UserControl
Secnario 2:
If one change on one UserControl changes data on all/other UserControls
on the page, it depends on what type of change is taking place.
If you need to reload/modify only a couple of UserControls it might be
best to have methods in your ASPX page that one UserControl calls and
then it can change other UserControls. If you need to reload ALL the
UserControls you could have a delegate setup in your ASPX page that all
of your usercontrols can subscribe to, then when one change is made,
you could fire the delegate that would in turn call methods on other
usercontrols. (this would be the true OOP approach to your problem,
using a multicast delegate)
Heres a tutorial on multicast delegates: http://en.csharp-online.net/index.ph...tes_and_Events
Gummy wrote:
dkode,
Thank you for responding..
I think I may have mislead you by having the
ReLoadControls((Selection)sender) method. It should be more like
PutInNewDataBasedOnRadioButtonChoices((Selection)s ender). So I am not
reloading each UserControl, they are placed statically on the page, I am
just reloading or changing the data that appears in the specific
UserControl.
Being new to this, I am not exactly sure what the difference is between
wiring up the Events in the UserControl or on the ASPX page. My
assumption
is that I need to have an event in the UserControl that is raised when an
RadioButtonList is selected. Then that Event can only be recognized in
the
ASPX page if I wire it, for each an every UserControl. To me, it seems
like
there is a better way to do it (not that I have any clue). For example,
if a
button is clicked on a UserControl, I thought the Event is raised and the
ASPX page should know that something was clicked on it and then be able
to
find the specific UserControl that was clicked. All that without actually
having to manually wire each Event in the ASPX page. Maybe I am taking
OOP
too far?
So if I understand you correctly, I may be doing this right. Right?
The issue, so to speak, was that I was talking to a programmer and he
only
gave hints about ViewStates and other methodologies to be more in line
with
proper OOP. For now, I figure it works and as I learn more I can improve
upon it.
Thanks again so much for the information.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Is all you have to do is reload all the UserControls on the aspx page?
In this case, there is no need to wire up all of these controls on your
aspx page, you should defer these events into the UserControl itself.
Otherwise you have to wire up each and every event like you are doing.
If you wire the events within the UserControl, and have each of them
call a method on the aspx page to "ReloadControls" then that should do
the trick.
What advantage are you getting out of wiring the events on the aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong please.
Thanks
Sean
Gummy wrote:
Hello,
I created a user control that has a ListBox and a RadioButtonList (and
other
stuff). The idea is that I put the user control on the ASPX page
multiple
times and each user control will load with different data (locations,
departments, etc.).
When I click the RadioButtonList the Event is raised on the user
control
and
I can consume(?) it on the ASPX page. However, I needed to give each
user
control its own ID, add the "protected UserControlType userControlID"
to
the
declarations, and then wire each of them to an Event to get them to
work
or
to even recognize their ID when the Event is raised.
It works, but my understanding that this is a poor way of doing
things.
Is
there a better way to approach this?
Here's some of the code in the ASPX page, to recognize the Event:
private void InitializeComponent(){
this.Load += new
System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged +=
new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
private void ChangedSelectionUCRadioButtons(object sender,
System.EventArgs
e)
{
ReLoadControls((Selection)sender);
}
Thank you for the help.
-Gummy
I think they are exactly the same - sometimes.
Each one has two listboxes, an ImageButton pointing to the right and one to
the left. The one on the left is populated by a datatable. The user selects
an item(s) in the left and clicks the right arrow to move the item to the
right listbox. Once the items are moved (in each UserControl) the user
clicks a button (on the ASPX) and a Where statement is made of all the
items, in each UserControl.
There are also radiobuttons that sometimes appear above the left listbox so
the user can choose how they want to see the data they want to select. By
either the code or the description.
So when each UserControl is created, I set about three properties to the
UserControl: radio buttons to choose code or description, the DataTable to
be used, the name of the field that the where statement will be queried on.
I thought about the dynamic adding of controls, but I can't figure out how
to do that if each one is loaded by a separate DataTable.
Thank you.
"Sean Chambers" <dk****@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Ok,
If changes inside one UserControl only affect that UserControl, then
you should have no event wiring in the aspx page. Keep all of your
event related wiring within the UserControl.
In each UserControl you will have to wire the events for that
UserControl via InitializeComponent.
Now, for my next question,
Is each UserControl exactly the same? or all they all different?
Because if they are all the same, you can dynamically add them to the
page which would save you a great deal of time.
Gummy wrote:
>dkode,
Once again, thanks so much for the very detailed reply and link.
It is Scenario 1. Right now when a change is made to the UserControl, I have that event in the UserControl and it is wired up in the ASPX.
Specifically, do I need to have every single UserControl wired in the ASPX page? In the code below, the rblCodeDescrChanged is the Event in the UserControl. So do I need to add the line for each UserControl (ucLocation, ucDepartment, etc.)?
private void InitializeComponent(){ this.Load += new System.EventHandler(this.Page_Load); ucLocation.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons); ucDepartment.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons); }
By the way, the code compiles just fine, but I do get the error saying that the rblCodeDescrChanged event does not exist (or something like that), when obviously it does. Any thoughts on that?
What if I have multiple events in the UserControl? One for a button click, one for a dropdownlistbox, do I need to wire the user control for each event. My hope and assumption is that I can use the Delegates for that (I'll read the link you sent).
I really appreciate you taking the time to answer my questions so thoroughly. You have helped me so much and I've learned a great deal. Thank you.
-Gummy
"dkode" <dk****@gmail.comwrote in message news:11**********************@h48g2000cwc.googleg roups.com...
Ok,
That gives me a better idea of what you are trying to do. Next
question:
Is the data that is changed in one UserControl change the data to be
displayed in other UserControls?
Secnario 1:
If you only need to change one UserControls data, then keep you all of
your processing within the UserControls on that level, don't bother
handling anything within the ASPX page, this will only make your
processing more complicated and unnecessary. In this sense, what you
would do is wire up the SelectedIndexChanged event, and handle it
within the appropraite UserControl
Secnario 2:
If one change on one UserControl changes data on all/other UserControls
on the page, it depends on what type of change is taking place.
If you need to reload/modify only a couple of UserControls it might be
best to have methods in your ASPX page that one UserControl calls and
then it can change other UserControls. If you need to reload ALL the
UserControls you could have a delegate setup in your ASPX page that all
of your usercontrols can subscribe to, then when one change is made,
you could fire the delegate that would in turn call methods on other
usercontrols. (this would be the true OOP approach to your problem,
using a multicast delegate)
Heres a tutorial on multicast delegates: http://en.csharp-online.net/index.ph...tes_and_Events
Gummy wrote: dkode,
Thank you for responding..
I think I may have mislead you by having the ReLoadControls((Selection)sender) method. It should be more like PutInNewDataBasedOnRadioButtonChoices((Selection) sender). So I am not reloading each UserControl, they are placed statically on the page, I am just reloading or changing the data that appears in the specific UserControl.
Being new to this, I am not exactly sure what the difference is between wiring up the Events in the UserControl or on the ASPX page. My assumption is that I need to have an event in the UserControl that is raised when an RadioButtonList is selected. Then that Event can only be recognized in the ASPX page if I wire it, for each an every UserControl. To me, it seems like there is a better way to do it (not that I have any clue). For example, if a button is clicked on a UserControl, I thought the Event is raised and the ASPX page should know that something was clicked on it and then be able to find the specific UserControl that was clicked. All that without actually having to manually wire each Event in the ASPX page. Maybe I am taking OOP too far?
So if I understand you correctly, I may be doing this right. Right?
The issue, so to speak, was that I was talking to a programmer and he only gave hints about ViewStates and other methodologies to be more in line with proper OOP. For now, I figure it works and as I learn more I can improve upon it.
Thanks again so much for the information.
-Gummy
"dkode" <dk****@gmail.comwrote in message news:11**********************@h48g2000cwc.googleg roups.com...
Is all you have to do is reload all the UserControls on the aspx
page?
In this case, there is no need to wire up all of these controls on
your
aspx page, you should defer these events into the UserControl
itself.
Otherwise you have to wire up each and every event like you are
doing.
If you wire the events within the UserControl, and have each of them
call a method on the aspx page to "ReloadControls" then that should
do
the trick.
What advantage are you getting out of wiring the events on the aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong
please.
Thanks
Sean
Gummy wrote: Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.). When I click the RadioButtonList the Event is raised on the user control and I can consume(?) it on the ASPX page. However, I needed to give each user control its own ID, add the "protected UserControlType userControlID" to the declarations, and then wire each of them to an Event to get them to work or to even recognize their ID when the Event is raised. It works, but my understanding that this is a poor way of doing things. Is there a better way to approach this? Here's some of the code in the ASPX page, to recognize the Event: private void InitializeComponent(){
this.Load += new System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons);
ucDepartment.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons);
} private void ChangedSelectionUCRadioButtons(object sender, System.EventArgs e)
{
ReLoadControls((Selection)sender);
} Thank you for the help. -Gummy
Well,
For beginning, you are on the right track, try not to bite off more
than you can chew.
In the future though, when you get more comfortable, you could easily
do what you are trying to do by dynamically adding the controls. You
would have one UserControl, say BaseControl.ascx, you could then assign
a unique id to the control and add it to a placeholder.
Things get more complex here though, you have to wire the events before
Page_Load, otherwise they will not fire on postback. You have to wire
them in Page_Init. there is also other "gotchas" when working with
dynamically created controls.
Like I said though, your on the right track to begin with, just depends
on how much you want to type and how much hair you want to keep =)
Hope I was helpful!
Sean
Gummy wrote:
I think they are exactly the same - sometimes.
Each one has two listboxes, an ImageButton pointing to the right and one to
the left. The one on the left is populated by a datatable. The user selects
an item(s) in the left and clicks the right arrow to move the item to the
right listbox. Once the items are moved (in each UserControl) the user
clicks a button (on the ASPX) and a Where statement is made of all the
items, in each UserControl.
There are also radiobuttons that sometimes appear above the left listbox so
the user can choose how they want to see the data they want to select. By
either the code or the description.
So when each UserControl is created, I set about three properties to the
UserControl: radio buttons to choose code or description, the DataTable to
be used, the name of the field that the where statement will be queried on.
I thought about the dynamic adding of controls, but I can't figure out how
to do that if each one is loaded by a separate DataTable.
Thank you.
"Sean Chambers" <dk****@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Ok,
If changes inside one UserControl only affect that UserControl, then
you should have no event wiring in the aspx page. Keep all of your
event related wiring within the UserControl.
In each UserControl you will have to wire the events for that
UserControl via InitializeComponent.
Now, for my next question,
Is each UserControl exactly the same? or all they all different?
Because if they are all the same, you can dynamically add them to the
page which would save you a great deal of time.
Gummy wrote:
dkode,
Once again, thanks so much for the very detailed reply and link.
It is Scenario 1. Right now when a change is made to the UserControl, I
have
that event in the UserControl and it is wired up in the ASPX.
Specifically, do I need to have every single UserControl wired in the
ASPX
page? In the code below, the rblCodeDescrChanged is the Event in the
UserControl. So do I need to add the line for each UserControl
(ucLocation,
ucDepartment, etc.)?
private void InitializeComponent(){
this.Load += new System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
By the way, the code compiles just fine, but I do get the error saying
that
the rblCodeDescrChanged event does not exist (or something like that),
when
obviously it does. Any thoughts on that?
What if I have multiple events in the UserControl? One for a button
click,
one for a dropdownlistbox, do I need to wire the user control for each
event. My hope and assumption is that I can use the Delegates for that
(I'll
read the link you sent).
I really appreciate you taking the time to answer my questions so
thoroughly. You have helped me so much and I've learned a great deal.
Thank
you.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Ok,
That gives me a better idea of what you are trying to do. Next
question:
Is the data that is changed in one UserControl change the data to be
displayed in other UserControls?
Secnario 1:
If you only need to change one UserControls data, then keep you all of
your processing within the UserControls on that level, don't bother
handling anything within the ASPX page, this will only make your
processing more complicated and unnecessary. In this sense, what you
would do is wire up the SelectedIndexChanged event, and handle it
within the appropraite UserControl
Secnario 2:
If one change on one UserControl changes data on all/other UserControls
on the page, it depends on what type of change is taking place.
If you need to reload/modify only a couple of UserControls it might be
best to have methods in your ASPX page that one UserControl calls and
then it can change other UserControls. If you need to reload ALL the
UserControls you could have a delegate setup in your ASPX page that all
of your usercontrols can subscribe to, then when one change is made,
you could fire the delegate that would in turn call methods on other
usercontrols. (this would be the true OOP approach to your problem,
using a multicast delegate)
Heres a tutorial on multicast delegates: http://en.csharp-online.net/index.ph...tes_and_Events
Gummy wrote:
dkode,
Thank you for responding..
I think I may have mislead you by having the
ReLoadControls((Selection)sender) method. It should be more like
PutInNewDataBasedOnRadioButtonChoices((Selection)s ender). So I am not
reloading each UserControl, they are placed statically on the page, I
am
just reloading or changing the data that appears in the specific
UserControl.
Being new to this, I am not exactly sure what the difference is
between
wiring up the Events in the UserControl or on the ASPX page. My
assumption
is that I need to have an event in the UserControl that is raised when
an
RadioButtonList is selected. Then that Event can only be recognized in
the
ASPX page if I wire it, for each an every UserControl. To me, it seems
like
there is a better way to do it (not that I have any clue). For
example,
if a
button is clicked on a UserControl, I thought the Event is raised and
the
ASPX page should know that something was clicked on it and then be
able
to
find the specific UserControl that was clicked. All that without
actually
having to manually wire each Event in the ASPX page. Maybe I am taking
OOP
too far?
So if I understand you correctly, I may be doing this right. Right?
The issue, so to speak, was that I was talking to a programmer and he
only
gave hints about ViewStates and other methodologies to be more in line
with
proper OOP. For now, I figure it works and as I learn more I can
improve
upon it.
Thanks again so much for the information.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Is all you have to do is reload all the UserControls on the aspx
page?
In this case, there is no need to wire up all of these controls on
your
aspx page, you should defer these events into the UserControl
itself.
Otherwise you have to wire up each and every event like you are
doing.
If you wire the events within the UserControl, and have each of them
call a method on the aspx page to "ReloadControls" then that should
do
the trick.
What advantage are you getting out of wiring the events on the aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong
please.
Thanks
Sean
Gummy wrote:
Hello,
I created a user control that has a ListBox and a RadioButtonList
(and
other
stuff). The idea is that I put the user control on the ASPX page
multiple
times and each user control will load with different data
(locations,
departments, etc.).
When I click the RadioButtonList the Event is raised on the user
control
and
I can consume(?) it on the ASPX page. However, I needed to give
each
user
control its own ID, add the "protected UserControlType
userControlID"
to
the
declarations, and then wire each of them to an Event to get them to
work
or
to even recognize their ID when the Event is raised.
It works, but my understanding that this is a poor way of doing
things.
Is
there a better way to approach this?
Here's some of the code in the ASPX page, to recognize the Event:
private void InitializeComponent(){
this.Load += new
System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged
+=
new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
private void ChangedSelectionUCRadioButtons(object sender,
System.EventArgs
e)
{
ReLoadControls((Selection)sender);
}
Thank you for the help.
-Gummy
Sean,
You have been amazingly helpful and I really appreciate all the time you
took to respond to all my questions.
I have been biting off way too much (and I think I am going to be sick).
I have now gone down the path of dynamically loading the controls and I've
just started learning about the Page_Init stuff. And you're right, I am
pulling out lots of hair.
I am in the middle of figuring out how when the dynamic controls are
reloaded not to make that so slow.
Thanks again for all your help.
"Sean Chambers" <dk****@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
Well,
For beginning, you are on the right track, try not to bite off more
than you can chew.
In the future though, when you get more comfortable, you could easily
do what you are trying to do by dynamically adding the controls. You
would have one UserControl, say BaseControl.ascx, you could then assign
a unique id to the control and add it to a placeholder.
Things get more complex here though, you have to wire the events before
Page_Load, otherwise they will not fire on postback. You have to wire
them in Page_Init. there is also other "gotchas" when working with
dynamically created controls.
Like I said though, your on the right track to begin with, just depends
on how much you want to type and how much hair you want to keep =)
Hope I was helpful!
Sean
Gummy wrote:
>I think they are exactly the same - sometimes. Each one has two listboxes, an ImageButton pointing to the right and one to the left. The one on the left is populated by a datatable. The user selects an item(s) in the left and clicks the right arrow to move the item to the right listbox. Once the items are moved (in each UserControl) the user clicks a button (on the ASPX) and a Where statement is made of all the items, in each UserControl. There are also radiobuttons that sometimes appear above the left listbox so the user can choose how they want to see the data they want to select. By either the code or the description.
So when each UserControl is created, I set about three properties to the UserControl: radio buttons to choose code or description, the DataTable to be used, the name of the field that the where statement will be queried on.
I thought about the dynamic adding of controls, but I can't figure out how to do that if each one is loaded by a separate DataTable.
Thank you.
"Sean Chambers" <dk****@gmail.comwrote in message news:11**********************@b28g2000cwb.googleg roups.com...
Ok,
If changes inside one UserControl only affect that UserControl, then
you should have no event wiring in the aspx page. Keep all of your
event related wiring within the UserControl.
In each UserControl you will have to wire the events for that
UserControl via InitializeComponent.
Now, for my next question,
Is each UserControl exactly the same? or all they all different?
Because if they are all the same, you can dynamically add them to the
page which would save you a great deal of time.
Gummy wrote: dkode,
Once again, thanks so much for the very detailed reply and link.
It is Scenario 1. Right now when a change is made to the UserControl, I have that event in the UserControl and it is wired up in the ASPX.
Specifically, do I need to have every single UserControl wired in the ASPX page? In the code below, the rblCodeDescrChanged is the Event in the UserControl. So do I need to add the line for each UserControl (ucLocation, ucDepartment, etc.)?
private void InitializeComponent(){ this.Load += new System.EventHandler(this.Page_Load); ucLocation.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons); ucDepartment.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons); }
By the way, the code compiles just fine, but I do get the error saying that the rblCodeDescrChanged event does not exist (or something like that), when obviously it does. Any thoughts on that?
What if I have multiple events in the UserControl? One for a button click, one for a dropdownlistbox, do I need to wire the user control for each event. My hope and assumption is that I can use the Delegates for that (I'll read the link you sent).
I really appreciate you taking the time to answer my questions so thoroughly. You have helped me so much and I've learned a great deal. Thank you.
-Gummy
"dkode" <dk****@gmail.comwrote in message news:11**********************@h48g2000cwc.googleg roups.com...
Ok,
That gives me a better idea of what you are trying to do. Next
question:
Is the data that is changed in one UserControl change the data to be
displayed in other UserControls?
Secnario 1:
If you only need to change one UserControls data, then keep you all
of
your processing within the UserControls on that level, don't bother
handling anything within the ASPX page, this will only make your
processing more complicated and unnecessary. In this sense, what you
would do is wire up the SelectedIndexChanged event, and handle it
within the appropraite UserControl
Secnario 2:
If one change on one UserControl changes data on all/other
UserControls
on the page, it depends on what type of change is taking place.
If you need to reload/modify only a couple of UserControls it might
be
best to have methods in your ASPX page that one UserControl calls
and
then it can change other UserControls. If you need to reload ALL the
UserControls you could have a delegate setup in your ASPX page that
all
of your usercontrols can subscribe to, then when one change is made,
you could fire the delegate that would in turn call methods on other
usercontrols. (this would be the true OOP approach to your problem,
using a multicast delegate)
Heres a tutorial on multicast delegates: http://en.csharp-online.net/index.ph...tes_and_Events
Gummy wrote: dkode,
Thank you for responding..
I think I may have mislead you by having the ReLoadControls((Selection)sender) method. It should be more like PutInNewDataBasedOnRadioButtonChoices((Selection) sender). So I am not reloading each UserControl, they are placed statically on the page, I am just reloading or changing the data that appears in the specific UserControl.
Being new to this, I am not exactly sure what the difference is between wiring up the Events in the UserControl or on the ASPX page. My assumption is that I need to have an event in the UserControl that is raised when an RadioButtonList is selected. Then that Event can only be recognized in the ASPX page if I wire it, for each an every UserControl. To me, it seems like there is a better way to do it (not that I have any clue). For example, if a button is clicked on a UserControl, I thought the Event is raised and the ASPX page should know that something was clicked on it and then be able to find the specific UserControl that was clicked. All that without actually having to manually wire each Event in the ASPX page. Maybe I am taking OOP too far?
So if I understand you correctly, I may be doing this right. Right?
The issue, so to speak, was that I was talking to a programmer and he only gave hints about ViewStates and other methodologies to be more in line with proper OOP. For now, I figure it works and as I learn more I can improve upon it.
Thanks again so much for the information.
-Gummy
"dkode" <dk****@gmail.comwrote in message news:11**********************@h48g2000cwc.googleg roups.com...
Is all you have to do is reload all the UserControls on the aspx
page?
In this case, there is no need to wire up all of these controls
on
your
aspx page, you should defer these events into the UserControl
itself.
Otherwise you have to wire up each and every event like you are
doing.
If you wire the events within the UserControl, and have each of
them
call a method on the aspx page to "ReloadControls" then that
should
do
the trick.
What advantage are you getting out of wiring the events on the
aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong
please.
Thanks
Sean
Gummy wrote: Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.). When I click the RadioButtonList the Event is raised on the user control and I can consume(?) it on the ASPX page. However, I needed to give each user control its own ID, add the "protected UserControlType userControlID" to the declarations, and then wire each of them to an Event to get them to work or to even recognize their ID when the Event is raised. It works, but my understanding that this is a poor way of doing things. Is there a better way to approach this? Here's some of the code in the ASPX page, to recognize the Event: private void InitializeComponent(){
this.Load += new System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons);
ucDepartment.rblCodeDescrChanged += new System.EventHandler(this.ChangedSelectionUCRadioB uttons);
} private void ChangedSelectionUCRadioButtons(object sender, System.EventArgs e)
{
ReLoadControls((Selection)sender);
} Thank you for the help. -Gummy
No problem,
There are quiet a few tutorials on csharp-online.net and
thecodeproject.com as well as msdn.microsoft.com that talk about
dynamically created controls.
That should help you out.
Sean
Gummy wrote:
Sean,
You have been amazingly helpful and I really appreciate all the time you
took to respond to all my questions.
I have been biting off way too much (and I think I am going to be sick).
I have now gone down the path of dynamically loading the controls and I've
just started learning about the Page_Init stuff. And you're right, I am
pulling out lots of hair.
I am in the middle of figuring out how when the dynamic controls are
reloaded not to make that so slow.
Thanks again for all your help.
"Sean Chambers" <dk****@gmail.comwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
Well,
For beginning, you are on the right track, try not to bite off more
than you can chew.
In the future though, when you get more comfortable, you could easily
do what you are trying to do by dynamically adding the controls. You
would have one UserControl, say BaseControl.ascx, you could then assign
a unique id to the control and add it to a placeholder.
Things get more complex here though, you have to wire the events before
Page_Load, otherwise they will not fire on postback. You have to wire
them in Page_Init. there is also other "gotchas" when working with
dynamically created controls.
Like I said though, your on the right track to begin with, just depends
on how much you want to type and how much hair you want to keep =)
Hope I was helpful!
Sean
Gummy wrote:
I think they are exactly the same - sometimes.
Each one has two listboxes, an ImageButton pointing to the right and one
to
the left. The one on the left is populated by a datatable. The user
selects
an item(s) in the left and clicks the right arrow to move the item to the
right listbox. Once the items are moved (in each UserControl) the user
clicks a button (on the ASPX) and a Where statement is made of all the
items, in each UserControl.
There are also radiobuttons that sometimes appear above the left listbox
so
the user can choose how they want to see the data they want to select. By
either the code or the description.
So when each UserControl is created, I set about three properties to the
UserControl: radio buttons to choose code or description, the DataTable
to
be used, the name of the field that the where statement will be queried
on.
I thought about the dynamic adding of controls, but I can't figure out
how
to do that if each one is loaded by a separate DataTable.
Thank you.
"Sean Chambers" <dk****@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Ok,
If changes inside one UserControl only affect that UserControl, then
you should have no event wiring in the aspx page. Keep all of your
event related wiring within the UserControl.
In each UserControl you will have to wire the events for that
UserControl via InitializeComponent.
Now, for my next question,
Is each UserControl exactly the same? or all they all different?
Because if they are all the same, you can dynamically add them to the
page which would save you a great deal of time.
Gummy wrote:
dkode,
Once again, thanks so much for the very detailed reply and link.
It is Scenario 1. Right now when a change is made to the UserControl,
I
have
that event in the UserControl and it is wired up in the ASPX.
Specifically, do I need to have every single UserControl wired in the
ASPX
page? In the code below, the rblCodeDescrChanged is the Event in the
UserControl. So do I need to add the line for each UserControl
(ucLocation,
ucDepartment, etc.)?
private void InitializeComponent(){
this.Load += new System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
By the way, the code compiles just fine, but I do get the error saying
that
the rblCodeDescrChanged event does not exist (or something like that),
when
obviously it does. Any thoughts on that?
What if I have multiple events in the UserControl? One for a button
click,
one for a dropdownlistbox, do I need to wire the user control for each
event. My hope and assumption is that I can use the Delegates for that
(I'll
read the link you sent).
I really appreciate you taking the time to answer my questions so
thoroughly. You have helped me so much and I've learned a great deal.
Thank
you.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Ok,
That gives me a better idea of what you are trying to do. Next
question:
Is the data that is changed in one UserControl change the data to be
displayed in other UserControls?
Secnario 1:
If you only need to change one UserControls data, then keep you all
of
your processing within the UserControls on that level, don't bother
handling anything within the ASPX page, this will only make your
processing more complicated and unnecessary. In this sense, what you
would do is wire up the SelectedIndexChanged event, and handle it
within the appropraite UserControl
Secnario 2:
If one change on one UserControl changes data on all/other
UserControls
on the page, it depends on what type of change is taking place.
If you need to reload/modify only a couple of UserControls it might
be
best to have methods in your ASPX page that one UserControl calls
and
then it can change other UserControls. If you need to reload ALL the
UserControls you could have a delegate setup in your ASPX page that
all
of your usercontrols can subscribe to, then when one change is made,
you could fire the delegate that would in turn call methods on other
usercontrols. (this would be the true OOP approach to your problem,
using a multicast delegate)
Heres a tutorial on multicast delegates: http://en.csharp-online.net/index.ph...tes_and_Events
Gummy wrote:
dkode,
Thank you for responding..
I think I may have mislead you by having the
ReLoadControls((Selection)sender) method. It should be more like
PutInNewDataBasedOnRadioButtonChoices((Selection)s ender). So I am
not
reloading each UserControl, they are placed statically on the page,
I
am
just reloading or changing the data that appears in the specific
UserControl.
Being new to this, I am not exactly sure what the difference is
between
wiring up the Events in the UserControl or on the ASPX page. My
assumption
is that I need to have an event in the UserControl that is raised
when
an
RadioButtonList is selected. Then that Event can only be recognized
in
the
ASPX page if I wire it, for each an every UserControl. To me, it
seems
like
there is a better way to do it (not that I have any clue). For
example,
if a
button is clicked on a UserControl, I thought the Event is raised
and
the
ASPX page should know that something was clicked on it and then be
able
to
find the specific UserControl that was clicked. All that without
actually
having to manually wire each Event in the ASPX page. Maybe I am
taking
OOP
too far?
So if I understand you correctly, I may be doing this right. Right?
The issue, so to speak, was that I was talking to a programmer and
he
only
gave hints about ViewStates and other methodologies to be more in
line
with
proper OOP. For now, I figure it works and as I learn more I can
improve
upon it.
Thanks again so much for the information.
-Gummy
"dkode" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Is all you have to do is reload all the UserControls on the aspx
page?
In this case, there is no need to wire up all of these controls
on
your
aspx page, you should defer these events into the UserControl
itself.
Otherwise you have to wire up each and every event like you are
doing.
If you wire the events within the UserControl, and have each of
them
call a method on the aspx page to "ReloadControls" then that
should
do
the trick.
What advantage are you getting out of wiring the events on the
aspx
page?
Maybe I'm missing something. Someone correct me if I am wrong
please.
Thanks
Sean
Gummy wrote:
Hello,
I created a user control that has a ListBox and a
RadioButtonList
(and
other
stuff). The idea is that I put the user control on the ASPX page
multiple
times and each user control will load with different data
(locations,
departments, etc.).
When I click the RadioButtonList the Event is raised on the user
control
and
I can consume(?) it on the ASPX page. However, I needed to give
each
user
control its own ID, add the "protected UserControlType
userControlID"
to
the
declarations, and then wire each of them to an Event to get them
to
work
or
to even recognize their ID when the Event is raised.
It works, but my understanding that this is a poor way of doing
things.
Is
there a better way to approach this?
Here's some of the code in the ASPX page, to recognize the
Event:
private void InitializeComponent(){
this.Load += new
System.EventHandler(this.Page_Load);
ucLocation.rblCodeDescrChanged
+=
new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
ucDepartment.rblCodeDescrChanged += new
System.EventHandler(this.ChangedSelectionUCRadioBu ttons);
}
private void ChangedSelectionUCRadioButtons(object sender,
System.EventArgs
e)
{
ReLoadControls((Selection)sender);
}
Thank you for the help.
-Gummy This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jason Huang |
last post by:
Hi,
Would someone explain the following coding more detail for me? What's the
( ) for?
CurrentText = (TextBox)e.Item.Cells.Controls;
Thanks.
Jason
|
by: Rachel Suddeth |
last post by:
What is the difference between a managed/unmanaged resource, and how do you
tell which is which? I'm trying to understand how to write some Dispose()
methods, and we are supposed to put code that...
|
by: AFN |
last post by:
I was just dropped into someone else's code (isn't that always so fun?).
I can't figure out why a custom validation control's server event function
is executing. There is nothing (that I see)...
|
by: |
last post by:
I have an app that retrieves data from an Access database. At the moment I
have the SQL string as a Const in my app. I understand this is not best
practice. I don't want the user to have access to...
|
by: BK |
last post by:
We've got a fairly large scale development process under way in .NET
2003. We are about a month away from go-live for phase 1, second phase
is rather short and all work should be completed in the...
|
by: Xah Lee |
last post by:
in March, i posted a essay “What is Expressiveness in a Computer
Language”, archived at:
http://xahlee.org/perl-python/what_is_expresiveness.html
I was informed then that there is a academic...
|
by: Rich |
last post by:
Hello,
I have a search application to search data in tables in a database (3 sql
server tables). I populate 2 comboboxes with with data from each table. One
combobox will contain unique...
|
by: jdp |
last post by:
I've created a custom login control with values that are not used in
the Membership table. I created these other fields through the
<profiletag in the web config. I'm able to get a new member...
|
by: AndiSmith |
last post by:
Hi guys,
I wondered if anyone could help me with this problem, or even shed some light on the direction I need to take to resolve it? I'm using .NET 2.0 (C# flavor) to build a large user-based...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
| |