|
Excelent! I knew there had to be a way to do this but was not readily finding it.
Works perfect!
|
|
|
|
|
Glad to help you
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hi, my application works in different cultures i.e. in french, german and english in C#. Now, the problem is, I shud add a support e-mail which shud be different for each culture. Is that is possible to dirrectly add in web config file? or there any other methods that can be performed?
Thankx
|
|
|
|
|
If you put the information in a configuration file it would mean you having a copy of the configuration file for each culture or finding a way to change the configuration setting as part of the installation of the application. Perhaps it is easier to add the culture specific email address as a string in a resource file.
|
|
|
|
|
Good Afternoon Everyone
i have a book explaining the Smart Clients, and the Feutures are beautifull. i need to Understand something about Smart Client. in Visual Studio. There is an Option that says Smart Device under neath
"Pocket PC","Smart phone","Windows CE", What i want to know is that, When designing the Smart Client which one do we use , is we want to Build a Desktop application. when i open the above option, i only see palm top like , templates, cant we geta normal form that looks like a windows application when designing a normal Application.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi,
Are looking to build an application that will run primarily on a windows desktop? Do you want it accessible on a browser? What version of the .NET Framework/Visual Studio are you using?
|
|
|
|
|
Hi
Yes am looking for an Application that will run primarily on Windows desktop, and i want it to be accessible on a browser too and am using 2.0 on Visual Studio 2005 C#
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa,
"Smart Device" in VS is talking about mobile devices. It sounds like you just want to create a normal windows application.
Regards,
Gareth.
|
|
|
|
|
yes, that has smart client Capabilities
can it be done?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
How to hide the particular column in Listview?
i set columnName.width=0; But user can Easly Resize the column width. how to avoid this?
Thanka in Advance.
-Mohan
|
|
|
|
|
if you dont want the column to be used why have it on the list view?
I cant see any obvious way through the properties so all i can suggest is you create the columns at run time before populating the list view.
Sorry to not be much use.
|
|
|
|
|
Hmmm... Not actually sure... Just a possible hint...
If you can use ".Width", can't you go ".Visible = false;" or ".Enabled = False;" linked with the ".Width = 0;"
?
Just my 2c worth....
|
|
|
|
|
Thats the first thing I tried, I just put a list view on a form added some columns to it and then in the forms constructor tried to do:
listView.Columns[0].Visible (no such property)
listView.Columns[0].....
Then I went back up to the list view control and tried to see if there was anything you could set on there but no luck.
In my work I use infragisitics controls which allows this behaviour and I use it a lot so this query intrigued me as its suprising you cant do it on a win forms control.
anyway good luck.
|
|
|
|
|
The WinForms listview is pretty worthless for dynamic data. It doesn't support databinding or hiding columns.
I wrote my own hodge-podge listview a while back to support binding at design time as well as customized embeded controls, in-line field editing column filtering and grouping but it's pretty feeble... not to mention buggy.
One of these days I'll whip out Reflector and see just what's under the hood for the DataGridView and modify my control to be more similar.
What would really make sense would be a ListView with all the functionality of a DataGridView. Which is why, I suppose, there are so many custom listviews that have said features on the market.
How do you like Infragistics anyway? Maybe I can get my boss to spend some money on a useful control.
|
|
|
|
|
hey
sorry for the delay
Infragisitics is OK, I would like to say good but the thing that brings that down to an OK standard is the hill you have to climb to learn and understand the controls, it can feel like walking up everest some times!
Of course every control set has an inital learning curve but this is the biggest one i have had the pleasure of going through.
(Warning: A little rant!)
Take the other day i had a list view in Details mode, by default each item in the list view gets a "i dont know the item type" icon. So of course i wanted to remove this icon, sounds easy huh....
Step 1: I checked out the "Image" property - this was set to (none) so fair enough not that one then
Step 2: The imageSize property - this was set to (-1, -1)
Step 3: I looked through every other property imaginable to do with appearances and image settings and no luck.
so after a few hits of coffee and a few trawls through the forums etc I had a brain wave - i went to the image size propery which was set to (-1,-1) and set it to (0,0) and hey presto no image! (pure luck that was, i still to this day cant see why 0,0 means no image and -1,-1 means display a default image)
All said and done though they are very configurable and very usable, they do provide a lot more functionality than win forms so i cant fault the controls themselves too much. Overall I would recommend them to be honest but they should come with some sort of health warning like "we like the game hide and seek, we hope you do too".
|
|
|
|
|
All is understood.
Thanks for letting me know.
|
|
|
|
|
Don't put the column in the ListView. Write your code to setup only the columns you need in the ListView and populate only those columns.
|
|
|
|
|
Hi Guys. I have the below code to create a user. I want to check if the user exist first and if he does not exist then create else show message box that the user already exist. Can somebody please help me with this? Below the code I have. This data is stored in an Access DB.
try
{
if (txtboxPassword.TextLength <= 6)
{
MessageBox.Show(this, "Please re-enter a password longer than 6 charcaters", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
conn.Open();
m_daDataAdapter =
new OleDbDataAdapter("Select * From [Users]", conn);
OleDbCommandBuilder m_cbCommandbuilder =
new OleDbCommandBuilder(m_daDataAdapter);
m_daDataAdapter.Fill(m_dtPassword);
DataRow dr = m_dtPassword.NewRow();
dr["UserName"] = txtboxUserName.Text;
dr["Pwdchk"] = cipherText;
m_dtPassword.Rows.Add(dr);
m_daDataAdapter.Update(m_dtPassword);
txtboxUserName.Text = "";
txtboxPassword.Text = "";
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
finally
{
conn.Close();
}
|
|
|
|
|
Kwagga,
Firstly, id recommenced you read this:
http://www.codeproject.com/KB/database/SqlInjectionAttacks.aspx[^]
If you want to check whether or not a user is there, just do a:
select userId from [Users] where userName = theUsername;
And then check on the dataset you have filled has rows. eg:
dataSet.Table[0].Rows.Count > 0
And then just do whatever else you want.
Regards,
Gareth.
|
|
|
|
|
Does someone know how can i get the owner of my application(Desktop maybe is the owner but how can i retrieve this owner)
best regards
dghdfghdfghdfghdgh
|
|
|
|
|
The owner of what aspect? The desktop does house the application, but the forms of the application are not parent to any other process execpt your application. (Technically speaking may be different, either way).
Why do you want the owner?
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
hello,
when i open an extended desktop the open file dialog of my application open in the other screen.
how can i do to open the dialog and the appplication in the same desktop
10x regards
dghdfghdfghdfghdgh
|
|
|
|
|
Hi,
Does anyone have code to loop through data displayed in a datagrid and display that data in a new Excel spreadsheet?
Thanks in advance.
Mvelo Walaza
Developer
Telkom SA
|
|
|
|
|
Microsoft.Office.Interop.Excel._Application _appClass = new ApplicationClass();<br />
_appClass.Visible = true;<br />
_appClass.Caption = "Excel custom title";<br />
Microsoft.Office.Interop.Excel.Workbook wbk = _appClass.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);<br />
Worksheet obj = (Worksheet)wbk.ActiveSheet;<br />
Range r = (Range)obj.Cells;<br />
for (int i = 0; i < ((GridView)this.lsvDocumentList.View).Columns.Count; i++)<br />
{<br />
r[1, i + 1] = ((GridView)this.lsvDocumentList.View).Columns[i].Header.ToString();<br />
((Range)r.Cells[1, i + 1]).Font.Bold = true;<br />
}
The above code is using a XAML listview, so it may be slightly different with WinForms. You need to also make sure to reference the Excel dll.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hi,
Thanks for the answer, but I tried to convert it and it works but strangely it only shows the headings of the datagrid. Can you tell me what causes this. Here is my code:
Microsoft.Office.Interop.Excel._Application _appClass = new ApplicationClass();
_appClass.Visible = true;
_appClass.Caption = "Excel custom title";
Microsoft.Office.Interop.Excel.Workbook wbk = _appClass.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);
Worksheet obj = (Worksheet)wbk.ActiveSheet;
//Range r = (Range)obj.Cells[this.lsvDocumentList.Items.Count + 1, ((GridView)this.lsvDocumentList.View).Columns.Count + 1];
Range r = (Range)obj.Cells;
for (int i = 0; i < ((DataGridView)this.dgOutput).Columns.Count; i++)
{
r[1, i + 1] = ((DataGridView)this.dgOutput).Columns[i].HeaderText.ToString();
((Range)r.Cells[1, i + 1]).Font.Bold = true;
}
Mvelo Walaza
Developer
Telkom SA
|
|
|
|