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
M

Member 8225180

@Member 8225180
About
Posts
13
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • newtonsoft.json parser - how to deploy a CLR to SQL Server 2008 R2?
    M Member 8225180

    I have created a CLR which uses the newtonsoft json parser. I need to deploy the CLR. I have created an assembly for the parser dependency: CREATE ASSEMBLY [Newtonsoft.Json] FROM 'C:\share\Release\Newtonsoft.Json.dll' WITH PERMISSION_SET = UNSAFE The above statement throws an error: Assembly 'Newtonsoft.Json' references assembly 'system.runtime.serialization, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(failed to retrieve text for this error. Reason: 15105)). Please load the referenced assembly into the current database and retry your request. I am using version 7.xx of the parser. I am targeting .NET 3.5 What is the proper procedure for deploying the CLR to sql server 2008 r2?

    Database database json question announcement csharp

  • Sending email via Intent
    M Member 8225180

    yes, I did try startActivity. Same effect.

    Android question help workspace

  • Sending email via Intent
    M Member 8225180

    I have found a solution. The initial activity's onresume method is called after the email is sent. What I do is intercept it and perform a startactivity to load the activity which was responsible for sending the email.

    Android question help workspace

  • Sending email via Intent
    M Member 8225180

    I have and app which requires sending emails with attachments. This app contains many activities. Within one activity, I send an email using the following intent: startActivityForResult(Intent.createChooser(emailIntent, "Email"), EMAIL_REQUEST); This works fine. The email is sent. The problem: After email is sent, the app loads/goes to the startup activity, not the activity from which the email was sent. (Also note: onActivityResult is never called) How can I return to the activity which sent the email? Code fragment:

        Intent emailIntent = new Intent(Intent.ACTION\_SEND);
        emailIntent.putExtra(Intent.EXTRA\_EMAIL, new String\[\]{to});
        emailIntent.putExtra(Intent.EXTRA\_SUBJECT, subject);
        emailIntent.putExtra(Intent.EXTRA\_TEXT, message);
        emailIntent.setType("message/rfc822");
    
        File publicFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY\_PICTURES);
        File inFile = new File(publicFolder, "snapshot.PNG");
        if (inFile.exists() && inFile.canRead()) {
    
            Uri uri = Uri.fromFile(inFile);
            emailIntent.putExtra(Intent.EXTRA\_STREAM, uri);
    
            try {                startActivityForResult(Intent.createChooser(emailIntent, "Choose an Email client :"), EMAIL\_REQUEST);
                isSuccess = true;
            }
            catch (Exception e) {
                Toast.makeText(getApplicationContext(), "startActivity() exception thrown while sending email", Toast.LENGTH\_SHORT).show();
           }
        }
    
    Android question help workspace

  • CHtmlEditCtrl - Overriding printer dialog and use with modeless dialogs
    M Member 8225180

    Reference: http://stackoverflow.com/questions/8982965/printing-in-mfc-application[^] Question #1: I have a Dialog based app using sample code taken above. App runs fine. I want to avoid having the popup printer selection window appear once the print job is started (i.e. when PrintDocument() is called). I just want to print to the default printer. How can I do this? Issue #2: This dialog app itself creates numerous other new dialog windows depending on user's selection. There is a need to have many of the features provided by this dialog application implemented as command line features. What did I do? ... Upon app started, I created a modeless dialog object with the intent not to display the dialog (unless absolutely necessary). Some of the dialog methods do function. The method that handles the printing does not work. The code fragment that causes a problem is CBatchResultsDlg::WaitForComplete() - because of AfxPumpMessage(). The owner of the CHtmlEditCtrl object is the Desktop window because setting the dialog window creating the object as owner fails. How can I fix this such that my printing will work.

    C / C++ / MFC help question c++ com career

  • Working with WPF
    M Member 8225180

    Ed, This sorts the columns visually but the DataTable data bound to the grid is not sorted. Thank-you for your reply, I'll open a new subject.

    .NET (Core and Framework) csharp wpf css database linq

  • Working with WPF
    M Member 8225180

    Ed, Would you be able to provide some guidance to this problem: I have a DataGrid which is bound to a DataTable. Relevant XAML & code ('<' intentionally left off at start of each line): DataGrid Name="dataGrid1" IsReadOnly="True" ItemsSource="{Binding}" DataGrid.Columns> DataGridTextColumn Header="Name" Binding="{Binding Path=Name}" /> DataGridTextColumn Header="Path" Binding="{Binding Path=Path}" /> /DataGrid.Columns> dataGrid1.DataContext = gridData.dt; // this is a DataTable with 3 columns. The 3rd dt column is not shown on the grid. The data table is sorted on the first column and contents are displayed. The user can sort on either of Name or Path columns/headings by clicking on them. My question, what is the best approach to update the grid data upon a user sorting on one of the columns? (This requires sorting the DataTable once again on the proper column) This is what I have observed: 1. Adding a Click event handler on DataGridColumnHeader does fire the event. I have observed that the value of columnHeader.SortDirection (in sender) is the CURRENT value, not the target value. Is it correct to say that a given column sort order goes through these phases: null --> ascending descending --> ascending ascending to descending I.E. By knowing the current state, the next state is determinable. 2. I can place a trigger in the DataGridColumnHeader's SortDirection property looking for Ascendiing/Descending/null but then what? Can I execute code against this? If so, can you show me a code fragment. Your thought on the above 2 approaches. Furthermore, what is the proper way of solving this issue in your opinion? Thank-you.

    .NET (Core and Framework) csharp wpf css database linq

  • Working with WPF
    M Member 8225180

    I placed a trigger on property IsSelected. Works fine. Thank-you.

    .NET (Core and Framework) csharp wpf css database linq

  • Working with WPF
    M Member 8225180

    Sorry for the late reply. I was away from home the last 3 days. Yes, I was thinking on the line of something like this. For the moment, until I study recommended practices and patterns, this is not important. There is one item that is bothering me though. Why is it that when a given grid row is selected via code, the background is not highlighted in the same manner as when selecting the row via a mouse click. For instance: dataGrid1.SelectedIndex = 0; The background row is highlighted in a light-grey color. But clicking the row, the row is highlighted in blue. I've determined this is a focus issue. If the grid is forced to have the focus, the row is highlighted blue. If it loses focus, it changes to grey. In my particular case, it would be great to maintain the blue background on the row even if focus is lost. What would be the best way to do this?

    .NET (Core and Framework) csharp wpf css database linq

  • Working with WPF
    M Member 8225180

    Thank-you for the reply. For the purpose of having the DataGrid events exist within the MyDataGrid object rather than my main window. Would this be a bad approach?

    .NET (Core and Framework) csharp wpf css database linq

  • Working with WPF
    M Member 8225180

    I am currently learning WPF and require some assistance in understanding some main concepts... My XAML contains numerous GUI elements, one being a DataGrid called 'dataGrid1' The DataGrid is populated in the main window using the following code fragment: MyDataGrid gridData = new MyDataGrid(); gridData.PopulateData(); dataGrid1.DataContext = gridData.dt; MyDataGrid is a class that is composed of a DataTable exposed through dt. PopulateData() performs a LINQ query on an EF context. The code above works fine and the grid shows the query results. What if I wanted to create a class which derives from DataGrid. How would such a class be accessible/linked/represented in the XAML?

    A reader from Montreal, Canada

    .NET (Core and Framework) csharp wpf css database linq

  • Entity Framework - Updates with eSQL
    M Member 8225180

    I figured it out eventually. I agree with you. Better to use LINQ. Thank-you for the reply.

    .NET (Core and Framework) database help question learning

  • Entity Framework - Updates with eSQL
    M Member 8225180

    I am currently learning EF and I am coding a Windows app as part of the learning process. Given this code fragment: using (var context = new MovieList_EFEntities()) { string esql = "select value m from Movies as m Where m.MovieId = " + Convert.ToInt32(movieId) + ""; var Movies = context.CreateQuery< Movie>(esql); foreach (var movie in Movies) { movie.Name = tbTitle.Text; context.SaveChanges(); } } SaveChanges throws an exception - New transaction not allowed. The Movie entity maps to the equivalent database table composed of 2 fields, the PK (identity) and the Name field. I want to change the Name. Why is the above not permitted? As a workaround, I created a Movie object with the 2 field values assigned. I did not get the desired effect. My db record was not updated, rather, EF inserted a new record. I will figure this out eventually. Was hoping someone can help me out before I do. Thank-you.

    .NET (Core and Framework) database help question learning
  • Login

  • Don't have an account? Register

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