|
Yes, i know it, prefomance impact at flush every record is huge, but i write small datapackeges asynchrone from different threads and i will be sure, that this is as much as possible power fail safe ... I vod't wahnt lost last 10k entries in OS bufer.
|
|
|
|
|
That what a Uninterruptible Power Supply is for. Use the correct tool for the job. You can't solve everything in software.
|
|
|
|
|
Hi,
i am using vs2010 with c#.
i have a problem in datagridview,
is it possible that we fixed the position of first column of datagridview,
means all other columns scroll horizontally but first column fixed at his place.
Thanks
|
|
|
|
|
Check did you set anywhere Frozen property as true
in code behind as well as in designer side
else add this in your code
DataGridViewColumn column = dataGridView.Columns[0];
column.Frozen = False;
-RaSu,CAS
|
|
|
|
|
I want to create a procedure to load data from a table using Entity Framework, but without knowing the name of the table until runtime. The idea is that list of table names will be displayed for the user to select. When a table name is selected, the string value of the name is passed into the procedure. Is there a way use a string to reference the table class?
|
|
|
|
|
|
I have a List<accountdataitems> called AllDataItems. An AccountDataItem has a BillingDate. I pull all the AccountDataItems from AllDataItems where the BillingDate equals the SelectedBillingDate.
Now, for each item in AllDataItems, if I didn't find one because that matches the SeletedBillingDate, I need to find the previous one by the BillingDate.
I'd like to do this with Linq, rather than loops, but I'm not sure how to code this. Could someone help with the Linq for this?
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
Linq is loops.
Dictionary<accountId, SortedList<DataItem>> populateMeSortDescending;
|
|
|
|
|
I've got a MVVM WPF app that launches multiple threads via Tasks and I'd like the app to have a basic log UI feature, that is updated asynchronously as the tasks update.
I've been playing with Dispatchers, SyncContexts, various rewrites of ObsverableCollections and basically getting not very far.
I've currently got a ObservableCollection<string>, and each log entry is basically a new item, but I don't care if its just a textblock or anything else if it works .
Updating the collection works async, but it only displays on the ui once all the tasks have finished (and not all the entries are displayed even then, I have to call OnPropertyChanged again...).
Can anyone point me to an working example?
|
|
|
|
|
I answered a question a while back about using log4net to log to the UI. I blogged about how to do it here[^].
|
|
|
|
|
ah, that looks interesting. I'll give that a go, plus it looks like it might provide a base for more larger apps.
Thanks
|
|
|
|
|
|
I am writing a windows desktop application in C# 2008 and i wanna to have select for datatable :
IEnumerable<string> idsInA = dtd.AsEnumerable().Select(row => (string)row["ID"]);
it filters only on one row (ex.ID) but the thing i wanna is for three rows (ex:ID , Title , Path)
Ho i can do that ?
|
|
|
|
|
IEnumerable<string> idsInA =
(from row in dtd
where row["ID"] = idFilter && row["Title"] = titleFilter && row["Path"] = pathFilter
select row["ID"]).AsEnumerable();
But this only returns one column, if you want all the columns, you would use something like this:
var rowsInA =
(from row in dtd
where row["ID"] = idFilter && row["Title"] = titleFilter && row["Path"] = pathFilter
select row);
and then rowsInA is an IEnumerable that contains the row objects.
|
|
|
|
|
thanks in advnaced!
But i wanna to return all cells of my datatable !
(Not filter some !!! [No where])
|
|
|
|
|
Then just remove the where part of the second example I gave.
|
|
|
|
|
I am writing a windows desktop application in C# 2010 that will be calling a windows api. The user will enter some information, hit the submit button, and the windows api will be called.
My question is would you show me code on how to call the windows api, tell the windows api what you are looking for, and return any optional values obtained from the windows api?
|
|
|
|
|
|
classy_dog wrote: show me code on how to call the windows api An impossible task, since the code for each function is unique to that function. Go to MSDN, search for the function you are interested in, and read the documentation.
Use the best guess
|
|
|
|
|
What functions in the Windows API are you wanting to call?
|
|
|
|
|
I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?
|
|
|
|
|
Unless you are working for Microsoft, the other programmer is not writing a Windows API. And yes, you should ask her how her "API" should be called.
|
|
|
|
|
|
classy_dog wrote: Should I ask her how to call the windows api? Let's dub it the "Classy API"
using System.Windows.Forms;
using Microsoft.Win32;
using Classy;
using Classy.Dog;
using Classy.Core;
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to write a C# WPF application using visual studio 2010. I want to be able to allow the user to do the following:
1. enter some data,
2. select a file from a directory path,
3. error message will be displayed if the user enters wrong data,
4. the user will hit the submit button and call a windows api.
Thus can you tell me how to accomplish this goal?
|
|
|
|