I'm using an Xml-file to fill my dataset and I place the dataset in my datagrid. My problem is that when I click a row in the datagrid, I want the data in text and/or checkboxes that are placed below the datagrid. Then I want to change the data in the text and checkboxes and then the row that was selected in the datagrid has to be replaced with what has changed in the textboxes
Is this possible or to difficult?
You must either change your system colors (applies to all applications) or owner-draw your entire main form and paint a different fill color in the area occupied by the menu. The MainMenu is not a control and cannot be drawn individually.
See the Control.OnPaint method documentation in the .NET Framework SDK. Override this in your form. If you don't know how to perform owner drawing, then you better do a search here on CodeProject. It's not trivial.
I'm having a problem whit my page. I have a sql db, and I want to combine to columns, "lastname" and "firstname", from my "user" table. I want to put the the combined two colums in one dropdownlist. This is my sql query:
SELECT DISTINCT u.UserID, Firstname, Lastname
FROM [User] u, Course_User cu
Does anyone have a suggestion on how i can solve this?
Yes, that's an idea; but it's not what I expected.
In fact, I want to write an underground program, running like an anti-virus or an alarm. Suppose, to make simple, that it is an alarm.
When the computer is turning on, the alarm-program is starting (undergroundly). And each hour, it makes a sound (with no interface).
How can I do that. Must I build a Windows service ?
You'll have to create a windows service. If you're using VS.NET you can create a new project by selecting Windows Service to get you started. You'll need to add your code to the OnStart and OnStop methods in the class it creates for you. From the design view of the class right click and select Add Installer. This makes it possible to use installutil.exe to install the service on the target machine. Read about Windows Service Applications[^] for more information.
I've just copied the sample DataGridTimePickerColumn style from the VS help, and used it on a few DateTime columns in a DataGrid (in the constructor, I set it to the short date format). What a mess! You'd have to pay people a lot of money to make them use it!!
Pressing 'Tab' seems to move across the columns as expected, until after you click on one of the columns to give it focus. Then 'Tab' takes you to every other column! Plus if the DateTimePicker is on a form, you can use the up and down arrow keys to scroll the parts of the (short) date. In the DataGrid, all they do is move up and down the columns of the grid.
Has anyone seen an example anywhere showing how to do this properly?
The keyword is example. There are several implementations of various DataGridColumnStyle derivates here on CodeProject and on MSDN[^], but you could always read the documentation and create your own.
The arrow keys are intepreted differently because of the control being hosted in the DataGrid. It's not so easy to make these behave as you'd expect for the hosted control - in this case a DateTimePicker.
i want to know that there is three loops for matrix multipltication for instance
know if i want to know abt how i should enter the value in an array and what is the function of theird loop how should i input the value in array
If you're declaring a multi-dimensional array (as opposed to a jagged array), then you could do something like this:
double[,,] matrix = new double[3,3,3];
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
for (int k = 0; k < 3; k++)
matrix[i, j, k] = i * j * k; // Or whatever
A jagged array wouldn't be a whole lot different, but you'd declare it as double and reference elements as matrix[i][j][k]. A multi-dimensional array is recommended in this case. You can read more information about the difference by reading about Arrays[^] in the C# Language Specification.