|
Thanks neo.
Giving at runtime, its working properly.
thanks once agian
Nana
|
|
|
|
|
How to translate numbers to a different language using c#.net
...............
|
|
|
|
|
Hi,
Rendering numbers to user interface is not managed by the .Net Framework but by the OS. So the number is displayed depending on regional settings.
HTH.
|
|
|
|
|
HI, all
i need help reg. datagridview of C# Windows Application.
please guide me(if possible with a sample), how to get values from an xml in to Datagridview of C#.net2.0WINDOWS APp
thnx in advance,
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
I am not sure But try creating one dataset and using datasets ReadXML method read the XML file you want. Set datasource as this dataset
|
|
|
|
|
Use this Sample.............
I have used DataCaching also in it..........
private void Page_Load(object sender, System.EventArgs e)
{
if(Cache["1"]==null)
{
FileStream fs = new FileStream(Server.MapPath("simple.xml"),FileMode.Open,FileAccess.Read);
CacheDependency cd=new CacheDependency(Server.MapPath("simple.xml"));
DataSet ds=new DataSet();
ds.ReadXml(fs);
DataView xmldata =new DataView(ds.Tables[0]);
Cache["1"]=xmldata;
Cache.Insert("1",xmldata,cd);
}
DataGrid1.DataSource=Cache["1"];
DataGrid1.DataBind();
// Put user code to initialize the page here
}
With Best Regards,
Yogesh
|
|
|
|
|
You may want to try this:
private void cmdGetTrades_Click(object sender, EventArgs e)
{
dsXML.Clear(); // should already be defined else define it here
// allowing user to select file else you can directly hard
// code the file name
openFileDialog1.Filter = "XML Files|*.xml";
openFileDialog1.Title = "Select SWAPs trades' XML file";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
dsXML.ReadXml(openFileDialog1.FileName);
grdTrades.AutoGenerateColumns = true;
grdTrades.DataSource = dsXML;
grdTrades.DataMember = "trade";
grdTrades.Sort(grdTrades.Columns["TradeID"], ListSortDirection.Ascending);
}
}
I am using this so it certainly works! Hope that helps you.
crzYank
|
|
|
|
|
thanx alot,
can u tell me How to retrive images to the same datagridview --[here too my backend storage is XML]
Thnx in advace
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
hi! i want to create a crystal report using stored procedure...
i am using vs 2003..
i want to pass a parameter..
i want one example for passing parameter to crystal report
|
|
|
|
|
You can fill a dataset using your SP and pass it to your app.
First learn about how to fill in a dataset using SPs.
And then, move towards learning how to pass this dataset and a parameter to your report.
|
|
|
|
|
Is there any way to link the active directory with .net . I need to achive this to avoid user creation both in .net and in Active dirctory. Please help me out.
Thank You,
A.Surenth.
|
|
|
|
|
Hi Surenth,
Please dig in to System.DirectoryServices name space in .Net.I will try to create some working code if time allows me today.
Neo
|
|
|
|
|
|
Hello everyone,
In my window application I have a ListView which is populated with the list of websites. I would like to be able to load these website once the item in the ListView is clicked. I have set everying reagarding the ListView but I have no clue how to load the website once the item is clicked.
Can someone be kind enough to tell me what code do I need to use for this? I have no clue what so ever for doing so. I have load at the linklable component, but that is not what I am looking for.
Thank you so much and have a great day.
Khoramdin
|
|
|
|
|
One possibility is to use the Process class.
using System.Diagnostics;
Process myProcess = new Process();
Process.Start("IExplore.exe", "www.codeproject.com");
Hope that helps.
Ben
|
|
|
|
|
Hello Ben,
thanx very much for all your help. you saved mt life, mate. There is one question which I have regarding the website loading. this is exactly what I need but this process opens the website in a New Explorer window. Is there any way I can open the website in a designated area in my window application?
thanx alot for your help and have a great day.
Khoramdin
|
|
|
|
|
There is a web broswer control that you can add to your form. If you are using .net 2.0 you can use the WebBrowser control.
private WebBrowser webBrowser1;
this.webBrowser1.Navigate("http://www.microsoft.com");
There is also a control in .net 1.1. Let me know if you are interested in that one.
Hope that helps.
Ben
|
|
|
|
|
Hello Ben,
Thanx for your help and all the information. I think I am going to use the WebBrowser control available in NET 2.
I was wondering for if you do recal the control available in NET 1.1 Framework from top of your help just for the information so at least I know about it?
Once again, thank you very much and have a great day.
Khoramdin
|
|
|
|
|
It is called AxSHDocVw.AxWebBrowser. It is pretty similar to the .net 2.0 one, but it is an activeX control.
Hope that helps.
Ben
|
|
|
|
|
Hello everyone,
I have a windows application with a tabControl. The tabControl has got 4 pages. I have a click event which I would like as the result the 4th page of my tabControl with index of "Zero" to be appeared just as if I have clicked on the Tab of the 4th page. Currently I can only get into the first page of the cabControl using the following code:
this.tabControl1.SelectedIndex = 0;
Could you tell me how I can make it jump to the page4 of the tab control?
Thank you so much for your help and have a great day.
khoramdin
-- modified at 19:59 Thursday 8th March, 2007
|
|
|
|
|
It is a zero based index. So page four would be 3:
this.tabControl1.SelectedIndex = 3;
Ben
|
|
|
|
|
I’m using webbrowser control in an application I’m developing. It works great accept the view will not update while I’m executing my application. When my application halts the web page imminently updates.
I tried using Application.DoEvents(). It worked with a stand-alone application, but when I integrated into my main application, it caused my code to re-enter at the call point to the webbrowser method. I have tried hard to get it to work without success.
So is there are command or set of C# commands to get a webbrowser object to continue? Paint? Generally update while I’m working? Without DoEvents?
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi Glenn,
Why not try to put the Webpage loading code which sould be something like
this.BrowerControl.Naligate("https://test.test.com")
in the different thread.
Neo
|
|
|
|
|
I need to create a text file that will be tabular. I am not sure on how to accomplish this. I am attaching an example of the output file. You will see what I am talking about and what I am trying to accomplish.
I am using StreamWriter.Writeline(text) at the moment.
Could someone point me in the right direction?
Dang no attachments. Here is the file output:
<br />
St# Cash Check Credit<br />
1 5543.66 416.67 681.86<br />
2 2763.00 316.62 293.65<br />
3 3097.31 344.00 194.81<br />
4 2099.60 301.80 243.10<br />
5 2935.00 797.51 367.87<br />
6 2203.00 361.31 647.81<br />
7 6245.29 0 300.77<br /> (The message builder is ignoring spaces....)
As you can a 0 goofs it up, and when St# becomes 2 digits that pushes the whole row out one more space to the right.
And here's the actual code:
strTextLine = read["IncStoreNum"] + " " + read["IncCash"] + " " + read["IncCheck"] + " " + read["IncCC"];
w.WriteLine(strTextLine);
Thanx in advance!
Jude
|
|
|
|
|
C# has some nice pading functions, so I guess would suggestion pad some spaces to a set width.
So the code is like var.ToString().PadLeft(4) for the St# column unless you are planning on going over 9999 then pad 5 or whatever. You get the idea.
Hope that helps.
Ben
|
|
|
|