|
I am exporting data from A Repeater to Excel sheet and my code works fine.
But I have used 2 repeaters side by side in the table.
When I export to excel I need to get the Excel data in the same mannar as side by side.
But I am getting the other repeater data in anothe line which doesn't look good.
Any body helps me in this
Thanks
Hima
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
Hello,
I m using Visual Studio 2005.Doing windows project in C#.Net.In that
i m using popup window forms.All details in text boxes are getting filled.But combo box and list boxes are not showing correct records?
bubuli
|
|
|
|
|
What records do ou expect them to have ? What code is setting these values for you ? you've given us nothgn to go on
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I m taking records from database (sql server 2000) depending on the id of selected record from the datagrid.I m using Binding navigator.On that i have taken command button.On click event of that button i m displaying another form,in that form i m getting above explained problem.
bubuli
|
|
|
|
|
Have you tried debugging the application to ensure the value you're sending to the database is the correct one?
Kay Lee
-Just your average coder
|
|
|
|
|
Hi,
I am trying to write an windows application which needs to capture the text selected from other applications as well.
I would like to know how we can capture a text that gets selected when we double click on the mouse. When any text is selected in any of the applications (not only the application that i use to capture the Text value), i need to capture the text. For example when we select a text in the notepad, and double click the mouse on the application that i have created, then the text selected in the Notepad should be captured and displayed in my application. Is there a way to do this ...
Thanks in advance
CSharpbeginer
|
|
|
|
|
There's a windows API called WindowFromPoint. If you p/invoke that, you can call GetWindowText ( another p/invoke ) to get the text of the window your mouse is under. How far that will get you, I don't know.
It's odd to me, I know of no commercial software that does this, but it gets asked for so often.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Everyone,
I have some problem with override of background in an TextBox.
The text don't merge with background, lock at code below.
Many thanks in advance.
/Gywox
<br />
using System;<br />
using System.Drawing;<br />
using System.Drawing.Drawing2D;<br />
using System.Globalization;<br />
<br />
namespace System.Windows.Forms<br />
{<br />
public class TextBoxDate : TextBox<br />
{<br />
private DateTime date;<br />
private CultureInfo culture = CultureInfo.CurrentCulture;<br />
private bool validDate = false;<br />
private Brush backgroundBrush = new SolidBrush(SystemColors.Control);<br />
<br />
public TextBoxDate()<br />
{<br />
this.SetStyle(ControlStyles.UserPaint, true);<br />
this.backgroundBrush = new HatchBrush(HatchStyle.DarkDownwardDiagonal, Color.FromArgb(255, 128, 128), this.BackColor);<br />
}<br />
<br />
public CultureInfo Culture<br />
{<br />
get<br />
{<br />
return this.culture;<br />
}<br />
set<br />
{<br />
this.culture = value;<br />
}<br />
}<br />
<br />
public DateTime DateTime<br />
{<br />
get<br />
{<br />
return new DateTime(this.date.Year, this.date.Month, this.date.Day, this.culture.Calendar);<br />
}<br />
}<br />
<br />
protected override void OnTextChanged(EventArgs e)<br />
{<br />
base.OnTextChanged(e);<br />
Parse();<br />
}<br />
<br />
protected override void OnLeave(EventArgs e)<br />
{<br />
base.OnLeave(e);<br />
if (this.Text != string.Empty && this.validDate)<br />
{<br />
this.Text = this.DateTime.ToString(this.culture.DateTimeFormat.ShortDatePattern, this.culture);<br />
}<br />
}<br />
<br />
protected override void OnPaintBackground(PaintEventArgs pevent)<br />
{<br />
base.OnPaintBackground(pevent);<br />
if (this.Text != string.Empty)<br />
{<br />
if (!this.validDate)<br />
{<br />
pevent.Graphics.FillRectangle(this.backgroundBrush, this.ClientRectangle);<br />
}<br />
}<br />
}<br />
<br />
private void Parse()<br />
{<br />
DateTime resultDate;<br />
<br />
this.validDate = false;<br />
if (DateTime.TryParse(this.Text, this.culture, DateTimeStyles.AllowWhiteSpaces, out resultDate))<br />
{<br />
this.date = resultDate;<br />
this.validDate = true;<br />
}<br />
this.Invalidate();<br />
}<br />
}<br />
}
|
|
|
|
|
A textbox is a very nasty control. It draws itself outside it's paint message, so it's very hard to change how it looks.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i want to list all Computer Name, and Ip Address for the Domin "WLINKTECH". i use the following code but get an error like this, so plz help me about the problem.
--------------------
using System;
using System.DirectoryServices;
namespace IPAddressof_RemoteComputer
{
public class Class1
{
public Class1()
{
//
// TODO: Add constructor logic here
//
}
public void getIpCName()
{
DirectoryEntry entry = new DirectoryEntry("LDAP://wlinktech");
DirectorySearcher mySearcher = new DirectorySearcher(entry);
mySearcher.Filter = ("(objectClass=computer)");
Console.WriteLine("Listing of computers in the Active Directory");
Console.WriteLine("============================================");
foreach(SearchResult resEnt in mySearcher.FindAll())
{
Console.WriteLine(resEnt.GetDirectoryEntry().Name.ToString()); }
Console.WriteLine("=========== End of Listing =============");
}
}
}
---------------
Error like this
------------------
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in system.directoryservices.dll
Additional information: The server is not operational
Sanjit.rajbanshi@wlinktech.com
|
|
|
|
|
Hi Sanjit.rajbanshi,
I have tested your code in Window Application (C#) after changing my AD name (sync.net). It's working fine. I have no problem with it. maybe. you are getting this error cuz you dont have the permission or you might put wrong AD name.
If your application is web application then you need to impersonate ur account.
|
|
|
|
|
I am using Client-server Architeture for my c#.net Window base Application.
For that I am using TCP Remoting.
How can I preserve Connection object?
means Only once Connection will establish while log in.and it will available
me through life time of application.
Hallo
|
|
|
|
|
Singleton Pattern?
Been a while since I learned about it, but as I remember, it does the trick
|
|
|
|
|
Hello,
May be you can try to store that object using binary serialization and use it any time you want.
This is just one idea I want to share with you.
nishu
|
|
|
|
|
It's dangerous to assume that the connection will always be there throughout the life of your application. What happens if the machine at the other end is restarted? Your connection is no longer valid, and operations on it will fail.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi all
I am working in c#.net
in my project i need create report using dynamic sql (i.e. parameter is passed at run time )
e.g
select * from employee where m_month = "runtimepara1" and m_year= "runtimepara2"
can anyone help me
thanks for your time
|
|
|
|
|
Build your query like this:
string sql = "SELECT * FROM Employee WHERE m_month = @month AND m_year = @year";
SqlCommand cmd = new SqlCommand(sql, connection);
cmd.Parameters.Add("@month", theMonth);
cmd.Parameters.Add("@year", theYear);
Also, SELECT * is inefficient. You should specify the columns that you want to return.
|
|
|
|
|
But I think it's used in Crystal ReportGeneration
i USED Reportviewer control in C#.net(InBuild not Crystal report)
Is their are solution to pass parameter dynamically or same Solu is also used
plz reply me
Thank's
|
|
|
|
|
The example you were given, shows you how to pass parameters dynamically. Or, do you mean, pass which parameters to select, dynamically ? In that case, if you're building SQL, you just need to conditionally add the columns you want.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi all!
I want to change the height of a combobox in flat style, but I can't, Visual Studio 2005 resets the value back on a value depending on the used font size.
On a TextBox I can change the height (when property Multiline is false)
Has anybody an idea how I can afford this problem easily?
Thanks a lot
Jörg
|
|
|
|
|
Why you want a higher combobox?
You can create a new custom control... You have to put inside a Panel (with black borders), and inside the panel a combobox(properly aligned), and set no borders in the combo... Obviously, the background color of the panel and the combo has to be same. If you don't wanna to write a lot of properties, directly put only one property of type combobox(the combo) to access it from the form.
|
|
|
|
|
I want to reduce the height of the combobox, so that they are in the same style as my other controls.
I solved it with a user control. I put a textbox with a button on the right side over a hidden combobox. When I click on the button, the item list of the combobox is shown and I can choos an Item. When the Item is selected, the value is written in the textbox and the itemlist is hidden.
But I was looking for a way to avoid a user control, and use the system controls.
|
|
|
|
|
Hy guys,
I am trying to develop a lighting control application. I know that there are a lot out there but I like programming and I like lighting equipment.
But I want to put my command controlling to my controller in a second app to get the load off my UI. Does anyone know how to do something like this. The command controller app needs to expose events and data.
I hope someone can give me a hint or something.
-- modified at 6:53 Tuesday 13th February, 2007
|
|
|
|
|
I'd use some preferences file or registry to store some arguments for another app.
Use first one to process.start(app2);
Or even create a service that will handle it, while managing preferences file/registry with gui app1.
|
|
|
|
|
How can you create a service and how does is work. Do you know a good article about it or something? Or example?
|
|
|
|