473,785 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to reload data based on condition

I have a combo and a datagrid in a page.
Combo box values are loaded on page_Load.
Datagrid is populated based on values selected in the combo (I am using
selectedIndexch ange event)

I need to make a default value for the combo(first value available) and
populate the datagrid based on this value on page_Load itself.(Applica ble to
many pages in my application)
I tried changing the selectedindex = 1. But the change event is not firing.

How can i achieve this without extra coding(As the system is in production)
Thanks in advance.
Nov 18 '05 #1
3 1393
Setting SelectedIndex will not fire the event. Rather, call the
DropDownList's SelectedIndexCh anged event handler method directly on page
load after setting SelectedIndex.

"Suresh" <Su****@discuss ions.microsoft. com> wrote in message
news:05******** *************** ***********@mic rosoft.com...
I have a combo and a datagrid in a page.
Combo box values are loaded on page_Load.
Datagrid is populated based on values selected in the combo (I am using
selectedIndexch ange event)

I need to make a default value for the combo(first value available) and
populate the datagrid based on this value on page_Load itself.(Applica ble to
many pages in my application)
I tried changing the selectedindex = 1. But the change event is not firing.

How can i achieve this without extra coding(As the system is in production)
Thanks in advance.
Nov 18 '05 #2
Lok
I think u forgot to set the combo box properties "AutoPostba ck" to "true"

1 more thing is the default index for combo should be start from "0"

"Suresh" wrote:
I have a combo and a datagrid in a page.
Combo box values are loaded on page_Load.
Datagrid is populated based on values selected in the combo (I am using
selectedIndexch ange event)

I need to make a default value for the combo(first value available) and
populate the datagrid based on this value on page_Load itself.(Applica ble to
many pages in my application)
I tried changing the selectedindex = 1. But the change event is not firing.

How can i achieve this without extra coding(As the system is in production)
Thanks in advance.

Nov 18 '05 #3
Hi suresh,

As a work around for your problem u can explicitly call the selected
indexchanged event handler as soon as you set the selected index to 1

combobox_Select edIndexChanged( Nothing, Nothing)

Hope this helps
"Suresh" wrote:
I have a combo and a datagrid in a page.
Combo box values are loaded on page_Load.
Datagrid is populated based on values selected in the combo (I am using
selectedIndexch ange event)

I need to make a default value for the combo(first value available) and
populate the datagrid based on this value on page_Load itself.(Applica ble to
many pages in my application)
I tried changing the selectedindex = 1. But the change event is not firing.

How can i achieve this without extra coding(As the system is in production)
Thanks in advance.


Nov 18 '05 #4

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

Similar topics

2
8632
by: Steve | last post by:
I'm working in PHP, but am also using JavaScript, so perhaps there is a better way to do this using more PHP code...... I setup a search screen for my database, the user enters data and submits a form via POST From that I get a results list screen, based on data I submit via a form from the search screen In the results list screen, I have a button next to each record for
66
3911
by: Ellinghaus, Lance | last post by:
> > Other surprises: Deprecating reload() >Reload doesn't work the way most people think >it does: if you've got any references to the old module, >they stay around. They aren't replaced. >It was a good idea, but the implementation simply >doesn't do what the idea promises. I agree that it does not really work as most people think it does, but how
5
5096
by: Mark Broadbent | last post by:
Does anyone know why some genius decided that data based breakpoints are not supported in C#/ vb.net debugging? Is there some technical reason Or has it been done to make breakpointing more fustrating than ever? --
3
1921
by: UJ | last post by:
Is there any way I can have a page reload itself where it will completely reload from scratch. I have a condition where a person click a button and the easiest way to handle it would be to have the button do the DB stuff it needs to do and then load the page from scratch - not post back. I've tried putting in a server.transfer in the routine that does the button click but it seems to get into an infinite loop. TIA - Jeff.
14
3449
by: fdu.xiaojf | last post by:
Hi, I have a program which will continue to run for several days. When it is running, I can't do anything except waiting because it takes over most of the CUP time. Is it possible that the program can save all running data to a file when I want it to stop, and can reload the data and continue to run from where it stops when the computer is free ?
3
2005
by: =?ISO-8859-1?Q?Gregory_Pi=F1ero?= | last post by:
Hi Python Experts, I hope I can explain this right. I'll try. Background: I have a module that I leave running in a server role. It has a module which has data in it that can change. So every nth time a function in the server gets called, I want to reload the module so it has the freshest data. But there's a lot of data so it takes 5-10 seconds to do a reload.
1
1817
by: Pathik | last post by:
Hi All, I have to get the values of "reading" and "value" elements of context Person/Category/Group/ser.These values must be on condition based,means I have to get the values of "reading" and "value" if entity="abc" and value="1" , and entity= "def" and value="2" at the Person/Category/Group/series/Key. My xml source file is as follows.
1
3500
by: Rob | last post by:
I know this is an old one, considering how many posts I found on it but I just wondered if any best practises had popped up recently, especially as Ajax has increased JavaScript and DHTML's importance. I'm writing a database application. I like pop-up boxes so I've implemented one on my webpage using a floating DIV. The logic goes like this: 1. When the page is rendered (on the server), it adds "var DisplayPopup = false;" in the page...
0
10341
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
10155
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...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9954
tracyyun
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...
0
8979
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
7502
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
5383
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...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2881
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.