Yep, I moved where the text box was in the wpf stack and all is right with the world. :)
jhoga
Posts
-
disabling a textbox at intialization in wpf/C# -
disabling a textbox at intialization in wpf/C#I guess I should have been more detailed in explaining the issue. The code in the two programs are almost identical. I have used this report writer wpf window many times and never had this issue. The xaml code for the checkbox is apparently setting the text box before it is getting initialized in wpf. "OOPs" I think I might have just answered my on question. I hate when that happens. :)
-
disabling a textbox at intialization in wpf/C#I'm stumped I have two programs. I'm using the same code in both. It works in one and not in the other. Anybody have any idea what could be causing this? error: System.NullReferenceException: 'Object reference not set to an instance of an object.' tbQ2 was null. code:
private void Btn1_Checked(object sender, RoutedEventArgs e)
{Qtype = "LIKE"; Qpre = " '"; Qpost = "%'"; tbQ2.IsEnabled = false; }
THE XAML code for the wpf is.
And:
-
A Career in Programming which way to go!As a 60+ I say your generalization of old programs is incorrect. I don't maintain legacy code, and have not been impressed with most of the "young" programmers I meet. There is a lot of soft skills required for software development that only come with experience.
-
A Career in Programming which way to go!One thing I would suggest. Is get involved. Local user groups and Code Camps are great places to meet contacts. Write software for nonprofits, or find a local small business and solve their problems free. Afterward blog about the experience. Writing code is really about learning, and the best way to learn is to do.
-
Self-directed learningSomething I have learned to do. Stop considering you books as books and start considering them as daily calisthenics. I do several pages every day usually after my daily deletion of spam. It takes a long time to finish a book. But you will finish. I like the "in easy steps" books because the layout makes it easy to just a little bit at a time.
-
Items collection must be empty before using ItemsSource.Thanks Mark, I tried that with no luck. I found the issue the value of Alert_Level was not numeric. Once I changed it to an int everything worked fine. Thanks for your help. :)
-
Items collection must be empty before using ItemsSource.Thanks mark, That took care of my error. I still can not get the background to show a color base on a value. But that is a complete separate issue. Thanks for your help ;)
-
Items collection must be empty before using ItemsSource.I keep getting this error. I kind of new to wpf and not sure what the issue is. Here is my code:
<DataGrid AutoGenerateColumns="False" Height="770" Name="DataGrid1" Width="1506" ItemsSource="{Binding}">
<Style TargetType="{x:Type DataGridRow}" >
<Style.Triggers>
<DataTrigger Binding="{Binding Alert_Level}" Value="1">
<Setter Property="Background" Value="LightYellow" />
</DataTrigger>
</Style.Triggers>
</Style><DataGrid.Columns>
<DataGridTextColumn Header="ID" Binding="{Binding TicketID}" IsReadOnly="True" Width="70" FontSize="24" />
<DataGridTextColumn Header="Date" Binding="{Binding Date_Entered}" IsReadOnly="True" Width="100" FontSize="24" />
<DataGridTextColumn Header="Input By" Binding="{Binding Requestor}" IsReadOnly="True" Width="200" FontSize="24"/>
<DataGridTextColumn Header="Telephone" Binding="{Binding Requestor_telep}" IsReadOnly="True" Width="120" FontSize="24"/>
<DataGridTextColumn Header="Status" Binding="{Binding Status}" IsReadOnly="True" Width="120" FontSize="24"/>
<DataGridTextColumn Header="Alert" Binding="{Binding Alert_Level}" IsReadOnly="True" Width="40" FontSize="24"/>
<DataGridTextColumn Header="Assigned" Binding="{Binding Assigned_To}" IsReadOnly="True" Width="200" FontSize="24"/>
<DataGridTextColumn Header="Issue" Binding="{Binding Problem_detail}" IsReadOnly="True" Width="300*" FontSize="24"/>
</DataGrid.Columns></DataGrid>
Thanks
-
I'm Starting to Miss Tangible MediaWhat I really miss is my MTV. You know the one of the eighties.
-
Setting a textbox based on listbox selection.Thats good info, but I really do not want to databind that textbox. I'm binding back to SQl already I just want to give the user an easy way to populate/change the field value. The combo works, but a list box looks much better. I'm making it visilble from a click event. Thanhks for the info.
-
Setting a textbox based on listbox selection.This should be easy but I can't get to work. I just want to set the value of a textbox when the select value in a list box changes. Here's how it works in a combobox. Category.Text = ComboBox1.Text How does it work in a list box in vb.2010 (WPF)? :confused:
-
What's everyone working on?Microsoft Speech Server application to take water bill payments on the telephone. X|
-
Need some helpCome on now read documentation? Who does that? No your right under the pressure of an angry ap clerk I did not research class well. Since I have been doing this since vb3 you'd think I'd know beter by now. :-O
-
Need some helpok I found a solution this method from the MSDN worked. I'm not sure why at this point. When I figure it out I'll let you know. Using sr As StreamReader = New StreamReader("TestFile.txt") Dim line As String Do line = sr.ReadLine() Console.WriteLine(Line) Loop Until line Is Nothing sr.Close() End Using
-
Need some helpI'm in need of a quick answer to a problem. I am trying to parse a tab delimited file for the purpose of feed it to a check printer. I am using a stream reader and the issue is that the reader is dropping the first char of each line. Here's the code: Do While strRead.Read <> strRead.EndOfStream strTest = strRead.ReadLine strWrite = strTest.Replace("""", "") ListBox1.Items.Add(strWrite) Loop Can anybody help? Thanks:confused:
-
VB.NETIt's probably the formatting property in your crystal report. Since the variable is Boolean, the formatting in the report will determine "Yes" or "Y".
-
printing a different reportUse the PrintPreviewdialog if you want to print something not allready on the screen, otherwise use the printform control, you can download it from microsoft. It's in the vb.net powerpack.
-
Developer's Age !Why does this post always come from young coders? Is there something that makes them uneasy about the future of programming? I was told in 1980, that in the near future programming would be unnecessary. That prof is probably dead now.:)
-
New LaptopI work for a small city doing desktop and web applications. Mostly database programs, speech server, allot of integration with commercial software. I use my laptop mostly at my desk, but I love taking it to the clients office and making changes to the apllication I'm working on there. We do have a vpn and I could remote-in But I love the moblity of my laptop. Currently using a hp NX9600, a big heavy desktop replacement. We rotate our equipment every 3 years. So I guess I'm looking for power & mobility. I'm really tired of toting this monster around.