Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

surfluds

@surfluds
About
Posts
6
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Show position of a chartingToolkit:LineDataPoint in a collection
    S surfluds

    I have set up the following tooltip to show the x and y values of datapoints within a WPF linechart, what I would also like to do is show the index within the collection that the point uses. How do I show this please?

    <Style x:Key="ToolTipDataPointStyle" TargetType="chartingToolkit:LineDataPoint">
    <Setter Property="Background" Value="Green"/>
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="chartingToolkit:LineDataPoint">
    <Grid x:Name="Root" Opacity="1">
    <ToolTipService.ToolTip>
    <StackPanel Margin="2,2,2,2">
    <ContentControl Content="{Binding HoleSize}" ContentStringFormat="Hole Size: {0}" />
    <ContentControl Content="{Binding PulseWidth}" ContentStringFormat="Pulse Width: {0}"/>
    <!--<ContentControl Content="{Binding Path.[0]}" ContentStringFormat="Data = {0}"/>-->
    </StackPanel>
    </ToolTipService.ToolTip>
    <Ellipse StrokeThickness="{TemplateBinding BorderThickness}" Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}"/>
    </Grid>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>

    WPF wpf question csharp css database

  • Returning data with a bound listbox
    S surfluds

    Yes thanks Luc, seen that finally, all works as it should. Tired. :sigh:

    .NET (Core and Framework) database

  • Returning data with a bound listbox
    S surfluds

    Ok thanks for the reply, got it sorted, stupidly didnot use the correct variable in the foreach loop to reference the dataveiwrow. Couldn't see for looking.

    .NET (Core and Framework) database

  • Returning data with a bound listbox
    S surfluds

    Thanks for that reply, I see that and have ammended my code as such, I am making headway though. I can now return the corect amount of selected items but it only returns the top item that many times. Any ideas from virewing my code.

    //Method used to add data to newly inserted rows
    private void AddData(System.Data.DataRow row, System.Data.DataRow row2)
    {
    StringBuilder strb = new StringBuilder();
    string str1 = "";

            object missing = System.Type.Missing;
            if ((checkBox1.Checked) || (checkBox2.Checked))
            {
                MessageBox.Show("There are no rows to insert");
            }
            else
            {
                //Add data from data row to the table
                Microsoft.Office.Interop.Word.Selection selection = Globals.ThisDocument.Application.Selection;
                int count = Globals.ThisDocument.Tables.Count;
                if (selection.Tables.Count > 0)
                {
                    Microsoft.Office.Interop.Word.Row newRow = Globals.ThisDocument.Tables\[count\].Rows.Add(ref missing);
    
                    newRow.Range.Font.Bold = 0;
    
                    newRow.Range.ParagraphFormat.Alignment =
                        Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphLeft;
    
                    newRow.Cells\[2\].Range.ParagraphFormat.Alignment =
                        Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphRight;
    
                    newRow.Cells\[1\].Range.Text = row\["HSActionPlanSubHeader"\].ToString();
                    foreach (DataRowView itm in this.itemDescriptionListBox.SelectedItems)
                    {
                        //newRow.Cells\[2\].Range.Text = row2\["ItemDescription"\].ToString();
                        str1 = row2\["ItemDescription"\].ToString();
                        strb.Append(str1);
                    }
                    newRow.Cells\[2\].Range.Text = strb.ToString();
                    
                }
                else
                {
                    MessageBox.Show("Cursor must be within a table.",
                        "Actions Pane", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
    
        }
    
    .NET (Core and Framework) database

  • Returning data with a bound listbox
    S surfluds

    I have a form with a listbox bound to a sql database. I use a dataset to fill the listbox. I need to have it multiselect and return the data selected. Trying to test this in a messagebox it returns dataview objects and mot the data selected. Any ideas Mike

    .NET (Core and Framework) database

  • Input date as UK format
    S surfluds

    I have a WPF app with sqlserver 2008 database. I have several textboxes bound to date fields in the database as so : TextBox Height="28" Name="textBoxApprovedDate" Width="120" Text="{Binding Path=ApprovedDate,StringFormat=dd/MM/yyyy} The output from the database is fine, but it will not allow me to input a date in UK format ie dd/MM/yyyy. How can I solve this? TIA Mike

    WPF wpf question csharp database wcf
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups