|
Nobobody 100% perfect in any language except you. If you donot know , please donot reply.
|
|
|
|
|
Dear CodeFriend!
At the first sorry for my English!
If it's possible could you help me with small problem?
In Details:
Normally result of the operation ToOADate we have
"2012-01-01 12:00:00".ToOADate() = 40909.5
"2012-01-01 12:00:01".ToOADate() = 40909.5000115741
"2012-01-01 12:00:02".ToOADate() = 40909.5000231481 etc
when I running DirectX device on the application I have
"2012-01-01 12:00:00".ToOADate() = 40909.5
"2012-01-01 12:00:01".ToOADate() = 40909.5
"2012-01-01 12:00:02".ToOADate() = 40909.5
DirectX - I mean Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing,....
Lost DateTime precision is problem for me because Teechart controls don't plot correctly (old Lite and the newest). Additional operations based on ToOADate are not correcty.
I have not got any idea to resolve this problem . Please help.
With Regards! Sebastian
modified 23-Feb-12 16:38pm.
|
|
|
|
|
My datagridview consists 6 column and the record has already filtered on some condition. Now I want to sort three column . For example datagridview consists
Catagory, Description, Rank, Mark.
I want to sort first Catagory , Seconed Rank and then Mark. But it should not affect filter condition. Please anybody help me with code
Pol
|
|
|
|
|
If the DataGridView is databound to BindingSource, which is a common way of data binding, then you can set
BindingSource1.Sort = "Category, Rank, Mark"
or if the DataGridView is databound to DataView then you can set
DataView1.Sort = "Category, Rank, Mark"
|
|
|
|
|
Many thanks for the reply . Please can you advice how to impliment custom multiple column filter in c# . The user will select the columns to sort
for example if the datagridview has code, name , rank it is filtered . and the user will give the priority of the column to sort
Either user will first sort rank then name and code . He will decide the order
Please advice how I can impliment
|
|
|
|
|
Are you writing code for a living here. It sounds like you are trying to get us to write all your code for you. At some point you are either going to have to learn this stuff for yourself, or admit you are in the wrong career.
|
|
|
|
|
I am admitting that , I am getting wrong reply and in appropriate answer .
I am also admitting that I am learning and also I am trying to use C# effectively with the advice from C# experts . If you dodnt want , you can ignore my question. I understand, all support forum is also other way of learning suit.
|
|
|
|
|
I want to know how to use udp protocol in creating video chatting project using c#
|
|
|
|
|
Don't. Use TCP. A chat session is intrinsically a persistent and streamed connection, and is perfectly suited for TCP. If you use UDP you'll just have to rewrite most of TCP.
|
|
|
|
|
A chat session in text would be, but no one streams video over TCP. Ok some do, but they are wrong. The dropped packets represent an irrelevant couple of millisecond, or at worst a slight hickup, a retransmission would introduce an epic lag. Certainly not suited for TCP.
The OP would have to rewrite most of RTP though .. or use RTP. (over UDP of course)
|
|
|
|
|
i am creating a list like this
vd.Department = (from dept in vd.Employees
select new Department
{
DepartmentID = dept.DivisionID,
DepartmentShortName = dept.Division
}).Distinct();
DepartmentShortName will have multiple values [Accounts, Production, Technical etc..]
What i want to do is to change the values so if it is Accounts =1, Production = 2.
How can i change this without doing foreach loop?
|
|
|
|
|
Set up a map:
Map<string, int> divisions = { "Accounts" => 1, "Production" => 2, ... etc };
(you can do this once, probably in a static initialiser)
and then use it in the query:
vd.Department = (from dept in vd.Employees
select new Department
{
DepartmentID = dept.DivisionID,
DepartmentShortName = dept.Division,
DivisionIndex = divisons[dept.Division]
}).Distinct();
|
|
|
|
|
Bob, please excuse my ignorance here, but is this Map code SQL ? Or am I hallucinating C# has a type of object similar to Dictionary I've never heard of before ? At first I thought "VB," but, then, the presence of semi-colons in both OP's, and your code, ruled that out.
Please enlighten.
thanks, Bill
"Every two days we create as much information as we did from the dawn of civilization up until 2003". Eric Schmidt of Google.
|
|
|
|
|
Hi all,
first thing , Sorry for posting my question again as another thread.
ResultFilterExpression = this.DataGridViewColumn.DataPropertyName + "not IN (" + FilterValue + @")";.
The above filter is working fine but only the problem , I have to give the filter parameter as NOT IN('CATAGORYA,'CATAGORYB') instead of NOT IN (CATAGORYA, CATAGORYB)
How I can modify the above filter condition for that
Pls help
Pol
|
|
|
|
|
if i understand the question you want to convert "CATAGORYA, CATAGORYB" to "'CATAGORYA,'CATAGORYB'" (i.e. wrap the individual values in single quotes)
try
string[] values = FilterValue.Split(',');
StringBuilder bldr = new StringBuilder();
bool isFirst = true;
foreach (string s in values)
{
if (!isFirst)
{
bldr.Append(",");
}
bldr.Append(string.Format("'{0}'", s));
isFirst = false;
}
FilterValue = bldr.ToString();
Pedis ex oris
Quidquid latine dictum sit, altum sonatur
|
|
|
|
|
|
Anybody can help me to sort out this problem
When I give multiple value , it doesnot filter for example
case "in":
ResultFilterExpression = this.DataGridViewColumn.DataPropertyName + " IN ('" + FilterValue + @"')";
break;
It works only one parameter . After comma it will not work
For example the catagory column, When I give
in('CatagoryA') - it will work but
in('CatagoryA, CatagoryB) - it doesnot work
Pls you or anybody can give a solution it would be appreciate.
With Thanks
Pol
|
|
|
|
|
You've already asked the question. Repeating questions does not guarantee a quicker response. See my response to your other post.
|
|
|
|
|
|
Hi
I want to add 'IN' and 'NOT IN' condition along with following program to filter datagridview
case "LIKE": ResultFilterExpression = this.DataGridViewColumn.DataPropertyName + " LIKE '%" + FilterValue + "%'"; ResultFilterCaption += "\n = '.." + FilterValue + "..'"; break;I want to add the condition 'IN' and 'NOT IN' filter cindition with datagridview Please help
FilterValue = 'A','B'
case filter = "IN"
ResultFilterExpression = this.DataGridViewColumn.DataPropertyName + " IN + FilterValue + ";
case filter = "NOT IN"
ResultFilterExpression = this.DataGridViewColumn.DataPropertyName + "not IN + FilterValue + ";
Please how I can impliment the filter 'IN' condition with datagridview.
With Thanks
|
|
|
|
|
Try ResultFilterExpression = this.DataGridViewColumn.DataPropertyName + "not IN (" + FilterValue + @")"; .
Here filtervalue is should be a list of comma separated values e.g 1,2,3,4.
|
|
|
|
|
Thats not working I given your code as follows. It should be string
case "in":
ResultFilterExpression = this.DataGridViewColumn.DataPropertyName + " IN ('" + FilterValue + @"')";
break;
It works only one parameter . After comma it will not work
For example the catagory column, When I give
in('CatagoryA') - it will work but
in('CatagoryA, CatagoryB) - it doesnot work
Pls you or anybody can give a solution it would be appreciate.
With Thanks
Pol
|
|
|
|
|
Member 3708190 wrote: in('CatagoryA, CatagoryB)
should be
Member 3708190 wrote: in('CatagoryA', 'CatagoryB')
|
|
|
|
|
I tried by both
"CatagoryA"
'CatagoryA'
but not working
|
|
|
|
|
Very Sorry It is working fine, Many Many Thanks.
Please
How the condition in code can be modified by way to avoid the giving string notation " " in filter .
Just we need to give like CatagoryA, CatagoryB. not 'CatagoryA','CatagoryB'
Many Many Thanks
Pol
|
|
|
|