Welcome to the Xceed Community | Help
Community Search  
More Search Options

Howto manually handling the insertion with LINQ SQL ?

Sort Posts: Previous Next
  •  07-02-2009, 5:44 AM Post no. 22206

    Howto manually handling the insertion with LINQ SQL ?

    Hi,

    I have a table with a varbinary column to store a photo. User will be able to select an image and i will need to handle the insertion manually. I need to convert the image into linq binary type.

    Here is my xaml code for that column.

    <xcdg:Column.CellEditor>
    <xcdg:CellEditor>
    <xcdg:CellEditor.EditTemplate>
    <DataTemplate>
    <StackPanel Orientation="Vertical">
    <TextBox x:Name="photoSource" />
    <Button x:Name="browseButton"
    Width="50"
    Content="Browse..."
    Click="browseButton_Click" />
    </StackPanel>
    </DataTemplate>
    </xcdg:CellEditor.EditTemplate>
    </xcdg:CellEditor>
    </xcdg:Column.CellEditor>

    I am using OpenFileDialog to select the image file.
    I have some problem :
    - I would like to display the selected file to textbox "photoSource", how can access this textbox ?
    - On CommittingNewItem event handle what the type e.CollectionView.SourceCollection. I cant
    get the right type therefore i can update the propperty photo of my table.
    - is there any better way to accompolish my task. Basicly i just want user to be able to upload image.

    Tq.
    Regards,
    Amdys








  •  07-06-2009, 11:01 PM Post no. 22299 in reply to 22206

    Re: Howto manually handling the insertion with LINQ SQL ?

    Hi, 

    Forget this post. Found the solution. 


    Tq

    Regards,

    Amdys

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.