15,887,869 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by BuBa1947 (Top 32 by date)
BuBa1947
9-Dec-14 22:34pm
View
can you please give an example?
BuBa1947
9-Dec-14 16:17pm
View
The exception is because the web method GetMyEmployeeId() returns an array containing the user ID's but i am trying to return the method's array of user ID's as integer. Pls suggest instead of integer what should I declare the property employeeID?
BuBa1947
9-Dec-14 14:50pm
View
pls see my improved question, have added the function
BuBa1947
2-Dec-14 13:59pm
View
How to pass the ID's to the webmethod?
BuBa1947
7-Mar-13 10:08am
View
yes, my problem is the selecteditem-row stays idle only for those 5 secs, after 5 secs, my datagrid loads the selecteditem of the first row automatically. could you pls suggest tell me how..
BuBa1947
4-Mar-13 18:12pm
View
No, i haven't..
BuBa1947
4-Mar-13 18:03pm
View
I am sorry for the confusing the question, it is how to move from one tab to another tab item wen a user selects a row on the datagrid.
BuBa1947
26-Feb-13 10:37am
View
I have already tried using breakpoint at top of the method. everything works fine until I select the item in the second datagrid, there it takes a pause for 3-4 secs and an exception occurs at da.Fill(row) :(
http://s23.postimage.org/shhz62bjf/Soerror2.png
I suspect here,
do I have to create a separate property again for <PersonDetails> as
private ObservableCollection<PersonDetails> personDetails;
public ObservableCollection<PersonDetails> Details
{
get { return personDetails; }
set { this.SetProperty<observablecollection<persondetails>>(ref this.personDetails, value); }
}
but this creates duplicate for Details.
did u have a look at my MainViewModel. is everything ok there Mr.Jason. what do u think?
BuBa1947
26-Feb-13 9:28am
View
Hello Mr.Jason,
i am trying to work on this selecteditem on three datagrid's now. but i am stuck with a silly error. if u have time pls have a look over this post - http://www.codeproject.com/Questions/553025/Selectedplusitemplusforplusmutilpleplusdatagrid-27
Thank you
BuBa1947
25-Feb-13 9:50am
View
Hello Mr.Jason,
actually this explanation is quite confusing. is it possible to explain with some example.
BuBa1947
20-Feb-13 9:18am
View
Hello Mr.Jason,
First of all, let me thank u.. I tried this above Model and finally I got the output which i needed. I will post the solution down. This time I have used my Person database which has two tables, Persons and Persondetails, where it should display the data in the Persondetails datagrid when a row is selected on the Persons Datagrid.
I have created class for Person and PersonDetail, One ViewModel as MainViewModel and a View which is present already. but I dont know where to place the Timer here ( as you have mentioned above "don't place the timer in the Model, but rather in ViewModel"). But I am afraid to touch my code which is running perfectly now.
the need for timer is to update my grid every 3 seconds because I have many incoming new data in my database. kindly have a look at my updated solution & output. ( this works fine without the Timer). Kindly have a look at Solution 3.
BuBa1947
19-Feb-13 9:57am
View
Jason, kindly have a look at my edited question. I have added new code blocks. is this approach ok ?
BuBa1947
19-Feb-13 9:19am
View
I am gonna try and get back to you Jason. Thanks a lot for taking effort to explain.. I actually saw this reply very late, as i got many e-mails and thought it was a spam.
BuBa1947
7-Feb-13 4:49am
View
Many Thanks for your reply Jason.
but I have a query, each of the datagrid ( for eg. here is HOST and LOG file) has to select the items from their respective tables from the database. how can I implement it when I have one ViewModel ?
BuBa1947
9-Jan-13 17:17pm
View
Hello Mr.Sanjeev Singh,
I am facing the similar issue, I have to auto refresh a WPF page for every 60 seconds ( after updating a record). Please help me with issue.
BuBa1947
9-Jan-13 8:52am
View
@Sandeep Mewara: Kindly check my code above. is that the right way ?
BuBa1947
9-Jan-13 7:37am
View
Thank you sanjay, I have refereed these links already. But in both links, they have binded the Itemsource from list , not from a database. my question is , how to bind Pie Chart datacontext to a DataBase
BuBa1947
13-Dec-12 5:24am
View
is it this way ?
dataGrid1.ItemsSource = ds.Tables[0].DefaultView;
BuBa1947
13-Dec-12 5:24am
View
is it this way ?
dataGrid1.ItemsSource = ds.Tables[0].DefaultView;
BuBa1947
13-Dec-12 4:58am
View
Thanks!
BuBa1947
12-Dec-12 11:45am
View
but it is highlighting the starting of the row , but not the exact cell..
BuBa1947
12-Dec-12 11:44am
View
Deleted
but it is highlighting the starting of the row , but not the exact cell.. here is my XAML code :
<datagrid.columns>
<datagridtextcolumn binding="{Binding Col1}">
<datagridtextcolumn.elementstyle>
<Style TargetType="{x:Type TextBlock}">
<setter property="Background" value="Green">
<Style.Triggers>
<datatrigger binding="{Binding Result}" value="Pass">
<setter property="Background" value="Green">
<datatrigger binding="{Binding Result}" value="Fail">
<setter property="Background" value="Red">
</Style.Triggers>
</Style>
<datagridtextcolumn binding="{Binding Col2}">
BuBa1947
12-Dec-12 11:44am
View
Deleted
but it is highlighting the starting of the row , but not the exact cell.. here is my XAML code :
<datagrid autogeneratecolumns="True" height="120" horizontalalignment="Left" margin="123,75,0,0" name="dataGrid1" verticalalignment="Top" width="220">
<datagrid.resources>
<local:myconverter x:key="SomeConverter">
<datagrid.columns>
<datagridtextcolumn binding="{Binding Col1}">
<datagridtextcolumn.elementstyle>
<Style TargetType="{x:Type TextBlock}">
<setter property="Background" value="Green">
<Style.Triggers>
<datatrigger binding="{Binding Result}" value="Pass">
<setter property="Background" value="Green">
<datatrigger binding="{Binding Result}" value="Fail">
<setter property="Background" value="Red">
</Style.Triggers>
</Style>
<datagridtextcolumn binding="{Binding Col2}">
BuBa1947
12-Dec-12 11:43am
View
Deleted
but it is highlighting the starting of the row , but not the exact cell.. here is my XAML code :
<datagrid autogeneratecolumns="True" height="120" horizontalalignment="Left" margin="123,75,0,0" name="dataGrid1" verticalalignment="Top" width="220">
<datagrid.resources>
<local:myconverter x:key="SomeConverter">
<datagrid.columns>
<datagridtextcolumn binding="{Binding Col1}">
<datagridtextcolumn.elementstyle>
<Style TargetType="{x:Type TextBlock}">
<setter property="Background" value="Green">
<Style.Triggers>
<datatrigger binding="{Binding Result}" value="Pass">
<setter property="Background" value="Green">
<datatrigger binding="{Binding Result}" value="Fail">
<setter property="Background" value="Red">
</Style.Triggers>
</Style>
<datagridtextcolumn binding="{Binding Col2}">
BuBa1947
12-Dec-12 11:42am
View
Yes,I have already tried something..
I created a converter that gets the cell value, for instance Value='Stopped'
and it highlights as red.
public class myConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string cellvalue = value.ToString();
return cellvalue = ("Stopped");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return false;
}
}
BuBa1947
12-Dec-12 11:35am
View
I have already setup'd a monitoring agent that looks over my server statuses.
My database is already defined and is running well. Now I have to bring this to a presentation layer, to display the server status.
So I decided to display in a form of traffic signal (RED-stopped, Green-running and Yellow for critical). But I don't have much knowledge in WPF animation.
BuBa1947
12-Dec-12 11:32am
View
I visited this link already. anyways thanks for the effort :)
BuBa1947
11-Dec-12 4:57am
View
Thanks a lot. It worked finally and I got a better understanding..
Cheers :)
-Indhira
BuBa1947
11-Dec-12 4:56am
View
Deleted
Thanks a lot. It worked finally and I got a better understanding..
Cheers :)
-Indhira
BuBa1947
10-Dec-12 12:51pm
View
Do I have to add the Converter class as a part of the MainWindow.xaml.cs class or add a new class naming Converter and then mapping it to the MainWindow.xaml.cs class ?
Because on the first try, I added the as a part of Mainwindow.xaml.cs on the first try, then my Intellisense didn't detect, but when I added a separate class as Converter.cs , my Intellisense detects but I dont know the way to map to my Mainwindow.xaml.cs class :(
Converter.cs
public class Converter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string cellvalue = value.ToString();
return cellvalue = ("Pass");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return false;
}
MainWindow.xaml.cs
namespace BlinkApplication
{
public partial class MainWindow : Window
{
SqlConnection cn;
SqlDataAdapter da;
DataSet ds;
public MainWindow()
{
InitializeComponent();
DataContext = this;
cn = new SqlConnection(@"Data Source=CZC0239ZWZ\SQLEXPRESS; Initial Catalog =Student; Integrated Security=true");
cn.Open();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
da = new SqlDataAdapter("select * from dbo.View_StudentResults",cn);
ds = new DataSet();
da.Fill(ds);
dataGrid1.ItemsSource=ds.Tables[0].DefaultView;
}
}
}
BuBa1947
10-Dec-12 12:50pm
View
Deleted
Do I have to add the Converter class as a part of the MainWindow.xaml.cs class or add a new class naming Converter and then mapping it to the MainWindow.xaml.cs class ?
Because on the first try, I added the as a part of Mainwindow.xaml.cs on the first try, then my Intellisense didn't detect, but when I added a separate class as Converter.cs , my Intellisense detects but I dont know the way to map to my Mainwindow.xaml.cs class :(
Converter.cs
<pre lang="cs">public class Converter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string cellvalue = value.ToString();
return cellvalue = ("Pass");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return false;
}</pre>
MainWindow.xaml.cs
<pre>mespace BlinkApplication
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
SqlConnection cn;
SqlDataAdapter da;
DataSet ds;
public MainWindow()
{
InitializeComponent();
DataContext = this;
cn = new SqlConnection(@"Data Source=CZC0239ZWZ\SQLEXPRESS; Initial Catalog =Student; Integrated Security=true");
cn.Open();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
da = new SqlDataAdapter("select * from dbo.View_StudentResults",cn);
ds = new DataSet();
da.Fill(ds);
dataGrid1.ItemsSource=ds.Tables[0].DefaultView;
}
}
}</pre>
BuBa1947
10-Dec-12 12:50pm
View
Deleted
I am using VS2010.. yes, sometimes have to refresh the Intellisense cache.
Show More