|
What version you are using?
If it is 2005 then in the gridview's accessdatasource you can specify the table and in the "where" option you can bind the filter field with the control and select the dropdownlist,
Otherwise if you want to do it in coding write the below coding in the dropdownlist_selectedindexchanged event and don't forget to enable the option "enable Auto post back"
OleDbDataAdapter oda = new OleDbDataAdapter("Select * from Extensions Where FilterByKey = '" + DropDownList1.SelectedItem.ToString() + "'", connect);
connect.Open();
Dataset ds =new Dataset();
oda.fill(ds,"MyTable1");
GridView1.DataSource=ds.Tables[0];
Gridview1.DataBind();
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Thanx.
I will try now and give you the response
kagiso
|
|
|
|
|
Its says Type or Name space 'DataSet' could not be found.
And it says 'Are you using or missing a using directive
kagiso
|
|
|
|
|
DataSet is found in System.Data namespace so you import that namespace.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Don worry.Its working 100%.
Thanx for your time and help.Thanx very very much
kagiso
|
|
|
|
|
Hello
I want to read a XML file that is store on another system.
Reply me asap.
Thanks
Devesh Mishra
|
|
|
|
|
give that machines path and read.. What is the problem here ?
|
|
|
|
|
Thanks for ur reply.
If you can provide me the exact syntax, then it'll be much helpful for me...
Is it necessary that file should be shared in this case ???
If yes, then programmatically how to make that file shared ???
Thanks
Devesh Mishra
|
|
|
|
|
Wow. You want to know if a file needs to be shared before you can read it, and you want to know how to write code to force a file on another machine to be shared ?
Is someone paying you to write this code ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
devesh_code wrote: Reply me asap.
What does it mean ?
You should have reading permission to access that file
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Sandeep Akhare wrote: devesh_code wrote:
Reply me asap.
What does it mean ?
It means "As Soon As Possible".
www.acronymfinder.com [^]
|
|
|
|
|
Using the windows version crystal report, I want to show data without paging. While in ASP.NET,we can set the property of the crystal report viewer as "allow paging=false"; but in windows programs, the crystal report viewer does not provide such a property, how to fulfil such a function by coding.
Thanks, a lot.
|
|
|
|
|
Hi All,
Can anyone suggest me a tool that will display the dependancy between methods of a class. That is, which method calls which other method of the class.
Thanks in advance,
Murali
|
|
|
|
|
Isn't there something on the standard right click menu which does that, for the method selected ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Chris,
U r right.. We can view the references of the methods on right click of them.
However I am in need of a tool that will take a class as input and give me the interdependancy of methods as the output.
Could u please suggest me on that?
Thanks in advance,
Murali
|
|
|
|
|
How about you write a program that does it?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
I think Visual Studio has something called an Outline that will show all that. Not sure, I am almost sure there is something built into Visual Studio though.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
It's the "Find all references" thing.
|
|
|
|
|
Yes, that is one way to do it. I remember something that allowed you to see all the things you referenced, and then where all you did so.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Sir,
I am from VB6 background and new to C#.
I am making a desktop application using the C#.
I have two windows forms say Winfrm1 and Winfrm2.
on Winfrm1 i have a command button named Button1 and also a grid which holds the customer names from the database.
when i click onto the button1, Winfrm2 form shows in modal manner i.e. showDialogue.
On Winfrm2, I fill the data and save it, when i close the Winfrm2 I want to see the newely added customer on
Winfrm1's grid ...
for that i call the fillgrid method on Winfrm1's activated, enter event but unable to get desirable output
when click to the any control on Winfrm1 then enter event is called and this makes me in trouble .
In vb 6 activate event calls whenever form got focus for this what i should do in C#....?
Pankaj Joshi
|
|
|
|
|
Use the forms OnClose event to call the updating code for the datagrid.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
sir ,
how i can call the winform1's fillgrid method from the winform2...?
i have to make it public..?
and also make an object of winform1 for accessing its method...?
hi
i am pankaj
|
|
|
|
|
Sorry To Say Sir,
I Can't Find the OnClose Event of Form in C#.net 2005...?
Regards
Pankaj Joshi
|
|
|
|
|
i would definately take a different approach.
in Winfrm2 create an event. called something like "DataSaved". you'll need to do this...
public delegate void DataSavedEventHandler(object sender, System.EventArgs e);<br />
public event DataSavedEventHandler DataSaved;
when you create an instance of Winfrm2 from within Winfrm1, you need to subscribe to the event with "+="...
Winfrm2.DataSaved += new DataSavedEventHandler(Winfrm2_DataSaved);<br />
private void Winfrm2_DataSaved(object sender, System.EventArgs e)<br />
{<br />
}
you then trigger the event whenever you add something in Winfrm2, by using something like...
if (this.DataSaved != null) this.DataSaved(this, new EventArgs());
|
|
|
|
|
What u need is using asynchronous invokes:
the problem u have is because of the GUI background multitasking:
the solution:
if(Button1.InvokeRequired == true)
{
Button1.Invoke(method1);
}
private void method1()
{
Thread Call to Method2
}
private void Method2()
{
// Here You need to show the form;P
}
Hesham
|
|
|
|