« first day (7 days earlier)      last day (4142 days later) » 

1:07 PM
@Sisyphe don't suppose NWorkbench is online is it? :)
 
Have you had any luck @Maverik?
 
actually yes
something weird!
 
Always better than nothing hehe :p
Also from my experience with this library, my solutions to problems have always been "weird" to some extent
 
when i was using the dll.. if i set width/height to a value - it wouldnt resize
but now.. i'm referencing current source
and it resizes now on value assignment at least
 
o.O
 
1:13 PM
more interesting stuff
if you try to resize from left or top border - it acts like a move
reason? Height is NaN
i'm sure Width is too
 
That only happens when attempting to set the width and height htough
though*
in the example ive got (i.e. untouched), it resizes normally
 
@Maverik Sadly no, it's an internal R&D project only
 
as soon as I set binding.. it ends up with NaN
thats why resize is going to oblivion
 
I may develop my own version as Open source project sometime soon
 
everything ends being a NaN after the logic is done
well i'm not interested in source - just to see what it is
 
1:16 PM
A screenshot would be the best I could show
 
anyways.. this is where you come in Sisyphe
 
it's internal stuff
 
sure.. ss would do
i understand
 
I'll try to get you that, I will have to check some stuffs before
SAP is very very very regarding about security, intellectual property and all
 
This has got to be the most frustrating issue this library has presented so far... possibly even bigger than getting it to play nicely with a custom titlebar
 
1:20 PM
:/
 
@Sisyphe dont worry about it then :)
 
gimem a mail adress
 
o nos
U NO SELL MA MALE ADDRESS
Venomed a;t G!
that made sense?
 
U NO TAKE CANDLE
 
that didn't make sense to me :D
ok my domain is same as your non-sap domain :)
and first word is the rest of address
as room owner - you should probably delete your own address from transcript as well
 
1:42 PM
Have you managed to find anything @Maverik?
 
Aaa.. erm.. sorry I got distracted by office
 
No probs :)
 
anyways - we did find the root cause
the question is how to work around it - @Sisyphe is better person for this probably
yea i've solved it >.>
 
really? but that would be a cause for ":)" rather than ">.>" :P
 
well - its the sort of stuff you shouldn't have to solve
 
1:49 PM
back
yeap I will
delete my adress
 
there are four resize functions in MdiChild.cs
you need to fix them with this gist (copy paste the gist across)
 
U not take candle is a wow reference
 
umm
i know i used them as a priest
but i still dont get it!
 
i'll try it out maverik thanks
 
np
 
1:53 PM
@Maverik sent you a mail
i edited the sc quite a bit
 
damn
that looks much better
the way i'd expect wpf component to be
btw, the gist that i posted as a fix - i learned the principal from you in past few days :)
i've dived into more user controls in past week than i have in two years that i've been doing wpf :D
my problems are generally much simpler!
 
Ok, i've tried it out and it seems to have solved the problem :) Only thing is that it screwed up the windows which pop-out now xD Remember that problem you had helped me with?
 
I wonder when can we have T-shirts with animated gifs on it!
 
the actual NaN one u mentioned before
 
@DotNET yea
i imagine that'll need adjustment for same reason now
 
2:00 PM
if i had to guess, i'd say that that piece of code is using the old height and width values
 
see what i meant when i said ripple effect
yea it is
 
I'm guessing it's just a small issue
 
theoretically yes
change width to actual width
when you get value out
and if you get a NaN then you need the rendersize.width
 
this is the code you had come up with last time: child.SetValue(Canvas.LeftProperty, (double)childTable.GetValue(WidthProperty) + (double.IsNaN((double)childTable.GetValue(LeftProperty)) ? 0.0 : (double)childTable.GetValue(LeftProperty)));
child.SetValue(Canvas.TopProperty, (double.IsNaN((double)childTable.GetValue(TopProperty)) ? 0.0 : (double)childTable.GetValue(TopProperty)) + (double.IsNaN((double)childTable.GetValue(HeightProperty)) ? 0.0 : (double)childTable.GetValue(HeightProperty)) - (double.IsNaN((double)child.GetValue(HeightProperty)) ? 0.0 : (double)child.GetValue(HeightProperty)));
should i change widthProperty to actual width?
nevermind, i think i have an idea :)
Thanks for the help! I'm going to open a question so that you can paste your reply there :)
 
yea
child.SetValue(Canvas.LeftProperty, (double)childTable.GetValue(ActualWidthProperty) +
and similar for Height
 
2:05 PM
thats right :)
 
nah dont worry about question
i learned stuff helping you :)
 
learning > rep
 
aww come on its the least i can do :) just simply post your link and voila
 
back again
 
2:08 PM
wb - and I'm reading through the already posted stuff
wouldn't want to duplicate stuff and appear like a retard :)
 
sorry i had to wipe the window content in the sc ^^
 
Just point out that there's a bug in the library :) and post the link where you arranged the code
 
Once the soft will be out I'll be able to show ^^
 
@DotNET yea i'm posting now
 
Good :)
 
2:21 PM
now i can't get codeplex to open >.>
somethings up with the source-control section
and i need to paste a link to make sure the fix doesn't end up in the wrong revision and blow up at a later date for somebody else
 
you could always just paste the code
 
its working - its just REALLY REALLY slow
what do u see on that link?
assuming its just my connection
 
not loading at all
 
well it finally loaded now
took a few minutes
posted the answer
 
Thanks :)
 
2:33 PM
thanks for the quick accept and upvote!
+15 woo... thats major progress in past two months i think!
ever since i've joined chatrooms - my reps gone static :D
not to mention my office output - but shh
 
hehe :) least i could do
 
correction +25 ! woohoo
bring in more questions then :P
now to finish my lunch
that i started at about 3 hours back :D
 
I've got another one pending if you'd like when you get back :P
 
i'm eating on my desk
shoot away
 
Should be really simple to answer, it's really a wpf-noob issue
rather - i'd know how to do this in ASP.NET, but not in WPF
1
Q: How to set source for only one column

Dot NETI've got a DataGrid whose main purpose is to allow the user to enter data in its cells. However, the first field in this grid should display the contents of a list. How would I go about setting the data source for just one column?

 
2:38 PM
i'll second that that 6k rep guy said
you could either do manual datagrid columns in which case you have explicit bindings at your disposal
or you can create a new viewmodel on top of your ItemsSource collection
 
I didnt really understand that guy though :/
 
that includes what the contents of column 1 need to be
 
bon appetit btw... if i spelled that properly :P
 
its ok we have a french guy here to take care of spellings
oh and cheers :D
 
Now that i re-read the question, i dont think i explained very well
In my head it seems like a simple task, but i just dont know how to approach it
And im not even sure if a datagrid is the component i should use for this
 
2:42 PM
well you can use it to edit stuff
 
for once i was able to give you rep @Maverik
 
@Sisyphe aww thank you
 
yw dude
you deserved that
 
That's the main purpose of the component which I'm after. The user should use it solely to add data. I just want the first column to display the fields of a database table
And the other columns basically should contain cells so that the user can input data to affect the respective database fields
 
I'm trying to resolve an interresting issue
@Maverik interrested ?
 
2:46 PM
@Sisyphe sec, i'm being pulled in office
 
sure ^^
 
@DotNET judging by that description, seems like you're taking the wrong approach with different first column
 
I want something like that
Where the rest of the cells should be filled by the user
 
@DotNET whats the ItemCollection class that you're using?
 
Haven't actually got a collection yet. As it is i've got a list which contains the field names
but thats it
 
2:52 PM
this is actually pretty easy :)
enum SortOrder
{
	Ascending,
	Descending
}

class Model
{
	public string Field {get; set;}
	public SortOrder SortOrder {get; set;}
	public string GroupBy {get; set;}
	public string Having {get; set;}
	public string DisplayOrder {get; set;}
}
set the ItemsSource to a collection of that Model
and in that collection add one entry per database field, populating only the Field property
 
And I just leave the others blank?
 
yea
class Model
{
	public Model(string field) { Field = field; }
	public string Field { get; private set;}
	public SortOrder SortOrder {get; set;}
	public string GroupBy {get; set;}
	public string Having {get; set;}
	public string DisplayOrder {get; set;}
}
this may be better if you are using autogenerated columns
since you don't want the user to be able to modify the field list
think i'll prefer that modification - no need for private field
 
is there an approach i can take without having to create a class though?
 
you must be binding to something.. what is that something?
 
not binding yet, i've literally just created the datagrid and nothing else
i want to take the user's input and interpret it later on
and the only thing i need to retreive as a source is the first column
 
3:07 PM
well you could do all of this in xaml
and while i'm all for xaml - i'd prefer to keep this clean in spirit of mvvm with a model class & binding the collection
actually no i think you can't do this all from xaml
yes stick with model class
enum is just candy - you can avoid it if you want but i'd take that route so use can't typo
 
I asked my question
@Maverik if you have any ideas it will eb welcomed :D
0
Q: Optimizing WPF 4.0 TreeView performance

SisypheIt's been too long since my last question so here is a new one ! I'm having performance issues with a Virtualizing WPF TreeView during scrolling. Let's say I have arbitrary complex controls under my TreeViewItems that can take a long time - let's say 10ms - to be measured. Scrolling down the Tre...

 
you gave up huh?
 
Ok, I'll try doing that. Would it complicate things when i try to read user input though? And will it make a difference if 2 of the fields are combobox fields
 
its the same thing u've been on for a few days isn't it?
@DotNET no, you should be fine
 
Ok thanks, ill give it a try :)
 
3:11 PM
combobox is just a visual - at the end of the day its just a value that you're storing back in model
 
Should i store the combobox values in this class too?
 
what values will there be in combobox?
thats sort of why i used the enum
sortorder is meant to be an auto-generated drop down
 
Thats right
for example ascending/descending will be a combobox with those vlaues
and aggregate function will have values such as sum, min, max, etc
 
no it's a new One @maverik
 
Wish i could help you @Sisyphe but I barely understand the question, let alone be able to provide a solution :)
 
3:15 PM
question is really simple actually :)
put some big items in a treeview
try to scroll
its laggy
:D
 
I've used a treeview in this application im working on, but never had any lag problems so far
Although i havent tried it with large data sets (which the final version should support).. so i may have the same issue later down the line
 
I'm having tens of thousands of nodes, and each node can have hundreds of chidren. Plus these children can be complex (DataGrid especially :) )
actually it's not the number of items that is an issue
it's the complexity of the items
and more precisely the time they take to be measured
and thus rendered
 
Hmm I see... quite an interesting project you must be working on to have a datagrid as a child node :)
 
i very strongly doubt i can help you with that @Sisyphe
 
:D
 
3:20 PM
problem with being high up there in pro list - you're rather alone when it comes to people who can help you with your issues :)
 
@DotNET yeah a very interresting project, it's actually a reporting WYSIWYG editor
its optimization is giving me headaches
@Maverik I wish i was a pro T-T
 
@Sisyphe sign of a TRUE pro! :p
 
lol
i'll try the first answer
might work
 
If you played League of legends I would have honored you :P
that answer does look like the way to go
imma +1 if it works
 
@Maverik - I've created the model like so:
private string field;
private string groupBy;
private string having;
private string displayOrder;

private enum Aggregate
{
Sum,
Minimum,
Maximum,
Average
}

private enum SortOrder
{
Ascending,
Descending
}
except with public modifiers
 
3:34 PM
i'm trying
 
@DotNET ? why do you have private here then?
also why aren't you using automatic properties?
 
started off by doing that (habit i guess), then modified them
 
interesting habit - sounds like you started out from iptables :D
don't worry if that makes no sense to you :)
 
hehe thats just how we've been taught. From day one of my course 3 years ago it was ingrained within us that we should fear public modifiers :p
 
@DotNET well in that case you should start with private and upgrade to internals
not to publics
 
3:40 PM
is this good?
internal class AttributesModel
{
public string Field { get; private set; }
public string GroupBy { get; set; }
public string Having { get; set; }
public string DisplayOrder { get; set; }
public Aggregate Aggregate { get; set; }
public SortOrder SortOrder { get; set; }

public enum Aggregate
{
Sum,
Minimum,
Maximum,
Average
}

public enum SortOrder
{
Ascending,
Descending
}
}
 
well.. i dunno :) i think its a taste thing
how many times do you use your assemblies outside of their project?
do you use linqpad?
oh btw.. yes automatic properties are fine
reason you don't want fields is - if you only go with fields, VS designer won't let you bind them
 
So is that code valid? Or does it cause some random angel to lose its wings?
I see, ok :)
 
well its valid
but kinda silly
an internal class having public members is pointless :)
 
so should i set them to internal?
 
if the class can't be accessed outside your namespace , then its members don't matter at all
yes
 
3:46 PM
ok, ill do that
 
yes .. inner scope should be at most as visible as its outer scope
having said all this, in theory, this is all good
 
So now that i've done this, the next step would be to bind to the DataGrid
 
but if you ever find yourself referencing this assembly from outside your project (as I often do in linqpad experiements) you'll find yourself going for public modifiers anyway
yup
 
Doubt i'd ever need to do that :)
 
theres another problem with your enums
theres no way a user can avoid an aggregate
 
3:48 PM
the enums would need to be bound to combobox fields
 
what if i want the result to be unsorted?
 
Right, i should probably enter a blank entry right?
 
I'd have Unsorted, Asc,Desc (in that order)
 
or 'None'
 
yea you can't have empty (enums can't be null)
 
3:49 PM
Sorted :)
 
and for Aggregate, have None as first entry
(enums default to first value)
 
Thats good to know, thanks
 
you're welcome
hey @JohanLarsson
 
hows the day been going? :)
 
3:51 PM
Been tired, writing ugly code :)
And you?
 
manic friday
disaster in office :)
while half the office is off
(i'm not sure why!)
 
ok, I'm done for the day. now I will continue for free (it is Friday after all)
 

« first day (7 days earlier)      last day (4142 days later) »