|
Yeah, I try this too, but I look my problem is with the MappingName, into my TableStyle I can't choose anything, and if type something the datagrid isn't works, like I know the MappingName is the table to used (a DataMember), but I'm working with a DataView, so don't use DataMember, and I can't use a Mapping Name
I must try to develop the datagrid form again from zero or what??
----
hxxbin
|
|
|
|
|
try
tableStyle.MappingName = dataView.Table.TableName;
|
|
|
|
|
I got it, I made the datagrid works with a DataTable
Now I will try with the DataView
Thanks, I'll try your comment.
----
hxxbin
|
|
|
|
|
it's works with a DataView, I'm happy now, THANKS!!!!
----
hxxbin
|
|
|
|
|
hello,
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?
thx in advance!
|
|
|
|
|
Overriden CurrenttCellChanged event of DataGrid and get/set the changes there.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
sorry but i don't really understand what you mean
|
|
|
|
|
Does anyone know how to change the backgroud color of the entire Menu Bar?
Thanks in advance!
|
|
|
|
|
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.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Could you give me a little hint on how to do the Owner Draw on the form and fill in different color for the whole Menu Bar area?
|
|
|
|
|
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.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi!
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
WHERE cu.UserID=u.UserID
Does anyone have a suggestion on how i can solve this?
|
|
|
|
|
You could change the query so it returns the combined first and last names.
SELECT DISTINCT u.UserID, Firstname + ' ' + Lastname
FROM [User] u, Course_User cu
WHERE cu.UserID=u.UserID
If I had a better memory I would remember more.
|
|
|
|
|
I was going to suggest the very same thing that Suzanne did as this is a quick work around. I have also used an ArrayList to help display the two db columns of data.
Great article suggested by Heath!
Goals are dreams with dates attached.
|
|
|
|
|
Thanks Suzanne!
It worked great!

|
|
|
|
|
What Suzanne said is a good idea. If you want columnar data, however, take a look at Multi-Column ComboBox[^] here on CP. It should give you some ideas and seems to already be data-bindable.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I'd like to write a simple program that starts by itself when the computers is starting, without user intervention.
How can I do that ?
Thanks
|
|
|
|
|
You can just drop the program in your startup folder if your running windows.
C:\Documents and Settings\user\Start Menu\Programs is a typical location of the startup folder.
|
|
|
|
|
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 ?
Thanks
|
|
|
|
|
That would be your best bet. Unless you want to start your program from the Run key in the Registry and set your forms ShowInTaskBar property to false.
RageInTheMachine9532
|
|
|
|
|
bsargos wrote:
undergroundly
I learned me a knew werd to day!
---------------------------
He who knows that enough is enough will always have enough.
-Lao Tsu
|
|
|
|
|
It's not funny
I would prefer you answer my question !
|
|
|
|
|
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.
|
|
|
|
|
Thank you very much
|
|
|
|
|
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?
Roj
|
|
|
|