[CDNUG] So very very stuck, a little help please?

2 views
Skip to first unread message

millejos

unread,
May 4, 2010, 3:49:54 PM5/4/10
to Corvallis Dot Net User Group
I work in Corvallis and am new to .Net, I'm trying to databind in WPF
and running out of options and out of time, is there anyone who could
talk me through or point me to an example?

My data is in strongly typed DataTables,

I need to reflect the data live in some custom controls, currently
WPF.

I'm trying to bind my custom WPF control to a DataRowView type

It works fine until I update a column in the DataRowView, the changes
are not reflected live

--
You received this message because you are subscribed to the Google Groups "Corvallis Dot Net User Group" group.
To post to this group, send email to cd...@googlegroups.com.
To unsubscribe from this group, send email to cdnug+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cdnug?hl=en.

Rory Plaire

unread,
May 4, 2010, 5:57:39 PM5/4/10
to cd...@googlegroups.com
Hi millejos,
 
Have you tried Stackoverflow.com for this kind of question? Ususally you can find one already posted, or if not, you get get answers pretty quickly.
 
If you still need help, talk to me off list. I have enough WPF experience to help.
 
-rory

Ernesto Borrego

unread,
May 5, 2010, 12:50:45 AM5/5/10
to cd...@googlegroups.com
Millejos,

As Rory noted, I would recommend StackOverflow to get some assistance.

Without knowing about your architecture or the details of your error (would be helpful), it looks like you are using ADO.NET as your data access technology.  If you are able to Read the data, then it seems that your SQL Select statement is working fine.  If you are having difficulties with CUD operations (Create, Update, Delete), then you should check their corresponding SQL statements/procedures.  If you are using Visual Studio as your IDE, press F5 and you should be able to debug through your code.

Hope this helps.

-----------------------------------------------------------------

millejos

unread,
May 5, 2010, 1:39:45 PM5/5/10
to Corvallis Dot Net User Group
Thank you guys for the suggestions. I was able to get things working
using a DataView on my DataTable. (it looks like DataView and
DataRowView implement the INotifyPropertyChanged necessary for data
binding)

To create the DataView I'm now calling the DataTable's DefaultView
property.

On a side note, is it possible to implement some sort of build-loop in
wpf? (sorry, asp programmer here, I know wpf doesn't do loops) The
wpf DataGrid is able to build itself based on rows in a DataTable. My
situation is a bit more complex, I'm displaying a 8x12 grid of custom
controls, where each control is bound to a row.

thank you all for your help,

-Josh

On May 4, 9:50 pm, Ernesto Borrego <ernesto.borr...@gmail.com> wrote:
> Millejos,
>
> As Rory noted, I would recommend StackOverflow to get some assistance.
>
> Without knowing about your architecture or the details of your error (would
> be helpful), it looks like you are using ADO.NET as your data access
> technology.  If you are able to Read the data, then it seems that your SQL
> Select statement is working fine.  If you are having difficulties with CUD
> operations (Create, Update, Delete), then you should check their
> corresponding SQL statements/procedures.  If you are using Visual Studio as
> your IDE, press F5 and you should be able to debug through your code.
>
> Hope this helps.
>
> -----------------------------------------------------------------
>
>
>
> On Tue, May 4, 2010 at 2:57 PM, Rory Plaire <codekai...@gmail.com> wrote:
> > Hi millejos,
>
> > Have you tried Stackoverflow.com for this kind of question? Ususally you
> > can find one already posted, or if not, you get get answers pretty quickly.
>
> > If you still need help, talk to me off list. I have enough WPF experience
> > to help.
>
> > -rory
>
> > On Tue, May 4, 2010 at 12:49 PM, millejos <mille...@gmail.com> wrote:
>
> >> I work in Corvallis and am new to .Net, I'm trying to databind in WPF
> >> and running out of options and out of time, is there anyone who could
> >> talk me through or point me to an example?
>
> >> My data is in strongly typed DataTables,
>
> >> I need to reflect the data live in some custom controls, currently
> >> WPF.
>
> >> I'm trying to bind my custom WPF control to a DataRowView type
>
> >> It works fine until I update a column in the DataRowView, the changes
> >> are not reflected live
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Corvallis Dot Net User Group" group.
> >> To post to this group, send email to cd...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> cdnug+un...@googlegroups.com <cdnug%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/cdnug?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Corvallis Dot Net User Group" group.
> > To post to this group, send email to cd...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > cdnug+un...@googlegroups.com <cdnug%2Bunsu...@googlegroups.com>.
> > For more options, visit this group at
> >http://groups.google.com/group/cdnug?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Corvallis Dot Net User Group" group.
> To post to this group, send email to cd...@googlegroups.com.
> To unsubscribe from this group, send email to cdnug+un...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/cdnug?hl=en.

Rory Plaire

unread,
May 5, 2010, 3:01:04 PM5/5/10
to cd...@googlegroups.com
Josh -
 
In WPF, you just use an ItemsControl + DataTemplate to do build-loops (it's much like an ASP.Net Repeater) control. You should be able to think of a way to model your controls-view with a data object (which can be called a View Model) and then just bind the view to it.
 
Perhaps we should do another WPF CDNUG session, maybe on data binding. Anyone else interested?
 
-r

Mark Boyd

unread,
May 5, 2010, 3:06:29 PM5/5/10
to cd...@googlegroups.com

Re:  WPF CDNUG session – absolutely!

 

Mark

c...@coelo.com

unread,
May 5, 2010, 4:34:12 PM5/5/10
to cd...@googlegroups.com
Rory --

I know almost nothing about WPF.   I'd be interested, and I'd be happy to poll my gang for their interest.    Please let me know if you get enough interest to put this over the top.

    thanks --
    Carl



------- Original Message -------
From : Rory Plaire[mailto:codek...@gmail.com]
Sent : 5/5/2010 12:01:04 PM
To : cd...@googlegroups.com
Cc :
Subject : RE: Re: [CDNUG] Re: So very very stuck, a little help please?
Reply all
Reply to author
Forward
0 new messages