|
Where on the MS website can I find the merge module? I have typed in different combination of the words merge module, .net framework, and dotnetfx.exe, but can't find anything relevant. After I have the merge module, do I just added it to my installer project? Thanks.
|
|
|
|
|
This[^] is probably your best source of info
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for the help Christian, I got it to work.
|
|
|
|
|
i've a list view with large icon view.
i've to select multy objects and make a drop into another one.
How?
|
|
|
|
|
Hi Everyone,
I am making an application for language specification and using satallite assembly.
If we use satallite assembly means there is no need to recompilation of application.
What I am doing that is given below step by step.
1. Created file like string.txt,string.de-DE.txt,string.ja.txt
2. compile all txt file with "resgen.exe" at command prompt like "resgen string.de-DE.txt string.de-DE.resources.
3. Again compile all resources file with "al.exe" like "al /t:lib /embed:strings.de-DE.resources /culture:de /out:myApp.resources.dll"
4. Created folder in my application for different language specification like "de-DE","ja"(Folder name)
5. Put file in this folder like for "de-DE" folder for myApp.resources.dll,string.de-DE.resources,string.de-DE.txt
6. In coding part "myapp.cs"
a) //static ResourceManager rm = new ResourceManager("myapp.string", Assembly.GetExecutingAssembly());//myapp is "namespace"
static ResourceManager rm = new ResourceManager("myapp.string",(typeof(Class1).Assembly));//string is "base name"
b) cultureinfo and switch case
7. Question is that if i don't make these resource file as satallite assembly then it works fine but if i make these resource file as
satallite assembly and put the resource file and dll in folder then it doesn't work.
8. If i run this application it pick up default one english language specification but not pick up german or any other language.
9. I am following each step that is given in MSDN.
Thanks
|
|
|
|
|
I am new to C# and am trying to find a way to change the text displayed in a given ColumnHeader in a DataGrid. I would like to display text that is "human understandable" rather than some of the cryptic field names some folks have put in the Database. That I can determine the Columns Collection doesn't have a property that allows this. I am probably just missing it somewhere. If anyon can point me in the right direction, I would appreciate it.
Thanks
Ken Jinks
|
|
|
|
|
|
I am not an expert by any mean but the method worked best for me and was fairly easy was to use alias in the select statement, something like this:
SELECT UID as [User ID], UNAME as [User Name], UADD as [User Address]
FROM tblUserInfo
Hope it will help.
|
|
|
|
|
jinksk wrote:
I would like to display text that is "human understandable" rather than some of the cryptic field names some folks have put in the Database.
u could put column styles for the columns
then give the header name as anything u want.
|
|
|
|
|
I have a dataGrid in my windows app which i have a colum name amount and a column named Total.
I need to show Total after every transaction. Can someone tell me how can I do that at run time?
ID | Date--| Description | Transaction Amount | Total<br />
01--1/1/01-----xyz--------------10---------------10<br />
02--1/2/01-----xyz------------(-05)--------------05<br />
03--1/3/01-----xyz--------------25 --------------30
Very similar to a check book register. Hope that helped.
Best Regards,
Rob
|
|
|
|
|
Is this a web or windows app ? If web, then handle the itemdatabound event, and store a running total. Otherwise, I'm not sure if winforms has this event, if not, you could always add it to your data table before binding.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
This is a windows app. Can you help me with that I am not much knowldgeable when it comes to working with windows datagrid. Sure would appreciate it . Thanks.
|
|
|
|
|
The windows grid doesn't have such an event. I think you need to add a column to your grid, then use foreach to step through each row, and insert your running total. Then the grid will display the total like any other column.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks a lot for your reply. Could you please post as to what the for each statement would look like? like I said I am really illiterate when it comes to working with datagrids
Once again I do appreciate your replies.
Best Regards,
Rob
|
|
|
|
|
if you had a datagrid with a row called price, and a new row called total:
int total = 0;
foreach( DataRow row in myGrid.Rows)
{
total += Convert.ToInt16(row["price"]);
row["total"] = total;
}
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you very much, you are always a great help.
|
|
|
|
|
I'm doing this piece of code which should copy the non-null elements in btnArray to the tempArray. Afterwards it should copy the elements of tempArray back to btnArray in order to get rid of the null elements and restructure the array.
However i'm getting the following exception:
"Specified argument was out of the range of valid values."
"Parameter name: Index was out of range. Must be non-negative and less than the size of the collection."
I can ofcourse interpret this, but i can't see where i'm making the mistake, i even tried doing the calculations manually and they seem to fit.. or else i'm doing something wrong
If anyone could point out the mistake i'm making i'd be very thankful
private void CopyArray()<br />
{<br />
try<br />
{<br />
if(btnArray.Count > 0)<br />
{ <br />
int iCounter = 0;<br />
<br />
for (int iButtonIndex = btnArray.Count; iButtonIndex > 0; iButtonIndex--)<br />
{<br />
if (btnArray[iButtonIndex-1] != null)<br />
{<br />
tempArray[iCounter] = btnArray[iButtonIndex-1];<br />
iCounter++;<br />
} <br />
}<br />
<br />
for (int iButtonIndex = 0; iButtonIndex < tempArray.Count; iButtonIndex++)<br />
{<br />
btnArray[iButtonIndex] = tempArray[iButtonIndex];<br />
}<br />
}<br />
<br />
else<br />
{<br />
MessageBox.Show("(COPY) ARRAY IS EMPTY");<br />
}<br />
}<br />
<br />
catch(Exception ex)<br />
{<br />
MessageBox.Show("ERROR: " + ex.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error,MessageBoxDefaultButton.Button1);<br />
}<br />
}
|
|
|
|
|
Where is tempArray created ? You'd do better to shove them into an arraylist, then call the ToArray method to get out an array that is the right size.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Can you show us the code where you declared
tempArray.
|
|
|
|
|
The tempArray and ButtonArray comes from here in the main form
<br />
ButtonArray btnArray;<br />
ButtonArray tempArray;<br />
<...><br />
private void Form1_Load(object sender, System.EventArgs e)<br />
{<br />
btnArray = new ButtonArray(this);<br />
tempArray = new ButtonArray(this);<br />
}<br />
Both ButtonArrays come from this class
using System;<br />
<br />
namespace ButtonArray<br />
{<br />
public class ButtonArray : System.Collections.CollectionBase<br />
{<br />
private readonly System.Windows.Forms.Form HostForm;<br />
<br />
public System.Windows.Forms.Button AddNewButton()<br />
{<br />
System.Windows.Forms.Button aButton = new System.Windows.Forms.Button();<br />
<br />
this.List.Add(aButton);<br />
<br />
HostForm.Controls.Add(aButton);<br />
<br />
aButton.Top = Count * 25;<br />
aButton.Left = 100;<br />
aButton.Tag = this.Count;<br />
aButton.Text = "Button " + this.Count.ToString();<br />
<br />
<br />
aButton.Click += new System.EventHandler(ClickHandler);<br />
<br />
return aButton;<br />
}<br />
public ButtonArray(System.Windows.Forms.Form host)<br />
{<br />
HostForm = host;<br />
this.AddNewButton();<br />
}<br />
<br />
public System.Windows.Forms.Button this [int Index]<br />
{<br />
get<br />
{<br />
return (System.Windows.Forms.Button) this.List[Index];<br />
}<br />
<br />
set<br />
{<br />
this.List[Index] = value;<br />
}<br />
}<br />
<br />
public void RemoveX(int iRemoveX)<br />
{<br />
if (this.Count > 0)<br />
{<br />
HostForm.Controls.Remove(this[iRemoveX-1]);<br />
this.List.RemoveAt(this.Count-1);<br />
}<br />
}<br />
<br />
public void RemoveButton()<br />
{<br />
if (this.Count > 0)<br />
{<br />
HostForm.Controls.Remove(this[this.Count -1]);<br />
this.List.RemoveAt(this.Count -1);<br />
}<br />
}<br />
<br />
public void FlushArray()<br />
{<br />
if (this.Count > 0)<br />
{<br />
for(int iButtonIndex = this.Count; iButtonIndex > 0; iButtonIndex--)<br />
{<br />
HostForm.Controls.Remove(this[iButtonIndex-1]);<br />
this.List.RemoveAt(iButtonIndex-1);<br />
}<br />
}<br />
}<br />
<br />
public void ClickHandler(Object sender, System.EventArgs e)<br />
{<br />
System.Windows.Forms.MessageBox.Show("You have clicked button " + <br />
((System.Windows.Forms.Button) sender).Tag.ToString());<br />
}<br />
}<br />
}
|
|
|
|
|
Hi,
I'm trying to develop a publisher-subscriber scenario using the loosely coupled events (LCE). I would like to see my subscribers able to filter on a particular publisher id.
After reading the good article written by Natty Gure (COM+ and .NET - A practical approach - Part 3),i learned how to set the publisher id filter. Unfortunatly, in that example, we don't use the filter and the id was empty.
My question is how to know/get the id of my publishers on which i want to filter?
Any help is welcome
Thanks.
- Frédéric -
|
|
|
|
|
Ok, so I’m a month into my first programming job, and I’ve run into a little problem, hopefully I’ll be able to get help here (its worked before for a school project).
I’m manipulating a SQL database in C# (using the latest 2005 releases of .NET and SQL Server, if that helps), and I’m having some problems updating the Tables correctly.
I’m manipulating a Form, which can have multiple versions. Each form has an ID (“Key”) and each version has an ID as well (“VersionKey”). One Key can relate to multiple VersionKeys, but each VersionKey is unique and only corresponds back to one Key.
The two important tables are organized as follows:
BaseTable:
*Key
Latest Version (the version to load on startup)
(Other nonimportant stuff)
VersionTable:
*VersionKey
Key
(Other nonimportant stuff)
My problem is in creating a new “version”. Here’s simplified code:
1: VersionRow dr = (VersionRow)myDataSet.VersionTable.NewRow();
(Assign the other entries in the row)
2: myDataSet.VersionTable.Rows.Add(dr);
3: myDataSet.Basetable.FindbyKey(currentKey).LatestVersion=dr.VersionKey;
4: (Save function)
#1 generates a new (unique)VersionKey, #2 adds the row to the set, and #3(should) assign the new row's versionkey to it's Key's latestVersion key so the newest version that we're making now will load at startup on the next run.
The problem (and I know the cause) is that the value given to dr.VersionKey is not necessarily the value it will be saved as in the database on the server. At the moment, if I start running off the current partially filled database, displaying dr.VersionKey in a messagebox gives me 15, but that row is saved to a number in the 70’s(it goes up one each time I save to the database). Ordinarily, this wouldn’t be a problem, but I want to set the Latest Version parameter, and I cannot set it with the wrong value that my database generates.
Any ideas on how to retrieve what primary key value the datarow was given?
-- modified at 15:48 Monday 19th September, 2005 (Aparrantly a college degree doesn't make me typo any less)
|
|
|
|
|
A few things:
While the VersionKey field is unique, your VersionTable really should have both Key and VersionKey as primary key fields.
It sounds like the database is on a remote servier somewhere, which means you could run into multi-user problems when the LatestVersion is updated. I think the best thing is to write a stored procedure directly at the database level; that way there's less traffic across the network, as well as less chance for multi-user contention.
Hope this helps.
Jim Stanley
|
|
|
|
|
Hello,
I override the Paint method for datagrid, and I am using this peice of code (numberFormatInfo object is defined):
if (rowNum < 4) {<br />
this.Format = "n";<br />
this.FormatInfo = numberFormatInfo;<br />
} else {<br />
this.Format = "c";<br />
this.FormatInfo = numberFormatInfo;<br />
}
But when the grid loads it constantly flickers, and other controls on the form do not load unless I move the form. However, if this portion ov the method is removed everything is fine. Anybody has any ideas, why this happening?
Thank you.
|
|
|
|
|
Without seeing the reset of your painting code, it's impossible to tell you what's going on.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|