|
how do can i open an excel chart(Excel2007) in .net with C#?
|
|
|
|
|
Not sure if this is what you want
Process.Start("C:\\Data.xls");
|
|
|
|
|
Hi i am new to vb.net
I am doing one project in vb.net
I want to know how to including Paging concept in vb.net datagrid
There is more records in grid , i want to display 10 records per page and using navigation button user must navigate to all pages
Please help me
|
|
|
|
|
I am guessing you are using ASP.NET wne you say paging??
If yes you can view this article:
http://www.codeproject.com/useritems/Custom_Paging.asp
Even you are in Windows form, you can use the same Stored procedure techniques to get the data for paging.
If you want to do Datagrid inbuilt paging, its easy, the worst part of it is it loads all the data at the same time. Just in DataGrid property say:
paging = true and
pageSize = ?
That will do. I prefer custom paging, good for large data.
|
|
|
|
|
how pass parameter fields of crystal report into crystal report command ?
i create 2 parameter fields in crystal report and how to use it in when i create crystal report command ?
|
|
|
|
|
ReportDocument rpt = new ReportDocument();
string reportPath = Server.MapPath("CrystalReport.rpt");
rpt.Load(reportPath);
CrystalReportViewer1.ReportSource = rpt;
ParameterDiscreteValue discreteVal = new ParameterDiscreteValue();
discreteVal.Value = "parameter value";
rpt.SetParameterValue("MyParameter", discreteVal);
**** just repeat the last two line for your next parameter
xxx
|
|
|
|
|
Where i can find crystal report template for bill (hotel bill, etc.)?
thanks
|
|
|
|
|
hi all,
i am developing a windows application
where in which i need to validate user's Email ID,
i have done this using default validation given in ASP.Net but how can i do for WINDOWS
please help me how to validate in windows
thnx in advance
prashanth
|
|
|
|
|
Try regular expression, there are many for email . Depends how much depth of strictness you are looking for. One of them is below;
^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$
|
|
|
|
|
Add the following using statement to your form:
System.Text.RegularExpressions;
Then use the Regex.IsMatch function like so:
Regex.IsMatch(textBox1.Text, "your regular expression");
This will then determine if what the user has entered into textbox1 matches your regular expression.
I hope this helps.
|
|
|
|
|
to reproduce, run the code.
Observed:
System.ArgumentOutOfRangeException was unhandled
Message="InvalidArgument=Value of '0' is not valid for
'SelectedIndex'.\r\nParameter name: SelectedIndex"
t2.c1 contains legal value.
Why this error occurs ?
How to fix ?
:-Ousing System.Windows.Forms;
using System.Data;
using System;
class testForm : Form {
testForm() {
DataTable t = new DataTable();
t.Columns.Add("displaymember");
t.Columns.Add("valuemember");
t.Rows.Add("lower", "l");
ComboBox comboBox1 = new ComboBox();
comboBox1.DisplayMember = "displaymember";
comboBox1.ValueMember = "valuemember";
comboBox1.DataSource = t;
comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
comboBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
DataTable t2 = new DataTable();
t2.Columns.Add("c1");
t2.Rows.Add("l");
comboBox1.DataBindings.Add("SelectedValue", t2, "c1");
Controls.AddRange(new Control[] { comboBox1 });
}
[STAThread]
static void Main() {
Application.Run(new testForm());
}
}
Andrus
|
|
|
|
|
Hi ,
This is Alim........
I want to conform weather there is a possibility of reading word document using OLEDB provider. If so plz send any document to the following mailingid
alim.shaik@wipro.com
Thanking You
Expecting early
It is very urgent yar....
Alim Basha Shaik
|
|
|
|
|
Alim Basha Shaik wrote: I want to conform weather
A weather control project? Hmmm... Man can't even predict the weather accurately and you want to control it?
On the serious side, no. Word doesn't have an OleDb provider, or any database provider for that matter.
|
|
|
|
|
Dave Kreskowiak wrote: A weather control project? Hmmm... Man can't even predict the weather accurately and you want to control it?
Surely you've heard of Microsoft Weather 2008.
|
|
|
|
|
I think I remember seeing a Beta for that about 10 years back. The launch party must have been a total secret!
|
|
|
|
|
Hi experts,
I have an urgent issue that need to be fixed ASAP. Anyone of you know how to open cash drawer using C#.net 2.0. I'm using Epson receipt printer TM-U220 which is connecting to the cash drawer. The printer is using LPT port.
I found a few resources Eg http://support.microsoft.com/kb/322091 , but still could not make the cash drawer open.
Appreciated if anyone of you could guide and provide me some information regarding this.
Thanking you in advance.
|
|
|
|
|
|
Ok, thank you very much. I'll try to access the information there.
|
|
|
|
|
No problem
I'd have dug up a code sample for you but all my EPOS code is at home
|
|
|
|
|
Really? Thank you very much. Appreciated if you could share with me your code sample ASAP.
|
|
|
|
|
I have several mouse buttons that on a mouse click they call the same function, but I need to know which button was pressed.
Is there are way to determine this?
private: System::Void btnTmOut_Click(System::Object^ sender, System::EventArgs^ e) <br />
{<br />
...Bunch of code...<br />
if(btn1)<br />
x = 0x0001;<br />
else if(btn2)<br />
x = 0x0001;<br />
...<br />
else if(btn8)<br />
x = 0x0008;<br />
...Bunch of code...<br />
}
Thanks
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
earlgraham wrote: I have several mouse buttons that on a mouse click they call the same function, but I need to know which button was pressed.
The sender parameter should hold a reference to the button that caused the event to be raised. You should cast it back to a Button before using it. To follow the psuedocode you have in your question, you would want to make sure each button has a distinguishing name and test the Name property. You could also use the Tag property, but you will still end up doing string comparisons.
What is the reason you have all of the buttons going through the same event handler? If each button does something different you are better off sending them to different event handlers. If there is common code (like logging) that needs to occur, refactor that into a separate method and have each event handler call that method at the appropriate time.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Thanks it works great. Here is my final code. This greatly reduces the variables that have to be shared in the class.
private: System::Void btnTmOut_Click(System::Object^ sender, System::EventArgs^ e) <br />
{<br />
...<br />
Button ^btnLocalOnly = (Button^)sender;<br />
...<br />
if(btnLocalOnly->Name == this->btnTmOut1->Name)<br />
x = IO_1;<br />
else if(btnLocalOnly->Name == this->btnTmOut2->Name)<br />
x = IO_2;<br />
else if(btnLocalOnly->Name == this->btnTmOut3->Name)<br />
x = IO_3;<br />
else if(btnLocalOnly->Name == this->btnTmOut4->Name)<br />
x = IO_4;<br />
else if(btnLocalOnly->Name == this->btnTmOut5->Name)<br />
x = IO_5;<br />
else if(btnLocalOnly->Name == this->btnTmOut6->Name)<br />
x = IO_6;<br />
else if(btnLocalOnly->Name == this->btnTmOut7->Name)<br />
x = IO_7;<br />
else if(btnLocalOnly->Name == this->btnTmOut8->Name)<br />
x = IO_8;<br />
else<br />
{<br />
}<br />
...<br />
}
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Thanks Again Colin Angus Mackay
Im using a grid box that has a date and time format in one of the Columns
Im trying to archive a populate
Using vb.net
I placed a grid box on the form
Then I placed 2 textboxes 1 combo box 2 date pickers
I did a data bind so that when I click on a row the combo box shows the record number (pk) Item no of that row clicked
Below that are the
Name (Text box)
Description (text box)
Start date (date pickers)
End Date (date(picker)
How do I populate the name , desc, stdate , endate fields by just using the Item.index of the combo box then just changing the field to update (Which I Know how to do)
Please assist me wilt the population I really think it is difficult because of the date time picker
|
|
|
|
|
i am using dotnet 2003.i am doing my project in vb.net windows application.i have two form in my project.first form is datagrid .In second form label,textboxes and combobox are avilable to save the entering values in datagrid of first form through this 2nd form.my problem is,i want to search a value using combobox.
for example,
in first form,
there are 4 columns named as name,age,rollno,address in datagrid.
values are ramu for namecolumn,24 for age column,42 for rollno column,cbe for address column.now values in datagrid like below
id name age rollno address
1 ramu 24 42 cbe
2 somu 23 32 che
here id is primary key.
in 2nd form,there are 4 label,4 textbox and 1 combobox.textbox arenamed as nametextbox,agetextbox,rollnotextbox,addresstextbox and 1 combobox named as searchcombobox.
now values of name(ramu,somu) are stored in combobox.
my problem is,
in second form,
if i click the value ramu in combobox means,want to display the values of ramu in textboxes.(ie..want to display automatically ramu in nametextbox,24 in age textbox,42 in rollnotextbox,cbe in address textbox)
during runtime in vb.net windows application.so how i automatically display the values of row in each textbox by clicking the values in combobox.plz help me.
|
|
|
|