diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml new file mode 100644 index 0000000..48a24dd --- /dev/null +++ b/.github/workflows/gitleaks.yaml @@ -0,0 +1,38 @@ +name: Secret Value found! +on: + push: + public: +jobs: + scan: + name: gitleaks + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install the gitleaks + run: wget https://github.com/zricethezav/gitleaks/releases/download/v8.15.2/gitleaks_8.15.2_linux_x64.tar.gz + shell: pwsh + - name: Extract the tar file + run: tar xzvf gitleaks_8.15.2_linux_x64.tar.gz + - name: Generate the report + id: gitleaks + run: $GITHUB_WORKSPACE/gitleaks detect -s $GITHUB_WORKSPACE -f json -r $GITHUB_WORKSPACE/leaksreport.json + shell: bash + continue-on-error: true + - name: Setup NuGet.exe + if: steps.gitleaks.outcome != 'success' + uses: nuget/setup-nuget@v1 + with: + nuget-version: latest + - name: Install the dotnet + if: steps.gitleaks.outcome != 'success' + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '3.1.x' + - name: Install the report tool packages + if: steps.gitleaks.outcome != 'success' + run: | + nuget install "Syncfusion.Email" -source "https://nexus.syncfusion.com/repository/nuget-hosted/" + dir $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1 + dotnet $GITHUB_WORKSPACE/Syncfusion.Email.1.0.0/lib/netcoreapp3.1/Email.dll "citeam@syncfusion.com" "$GITHUB_REF_NAME" ${{ secrets.NETWORKCREDENTIALS }} ${{ secrets.NETWORKKEY }} "$GITHUB_WORKSPACE" + exit 1 diff --git a/ComboBoxAdv_DataBinding_SelectedItem/Image/Bind SelectedItems.png b/ComboBoxAdv_DataBinding_SelectedItem/Image/Bind SelectedItems.png new file mode 100644 index 0000000..4aaf45a Binary files /dev/null and b/ComboBoxAdv_DataBinding_SelectedItem/Image/Bind SelectedItems.png differ diff --git a/ComboBoxAdv_DataBinding_SelectedItem/Image/Programatically SelectedItem.png b/ComboBoxAdv_DataBinding_SelectedItem/Image/Programatically SelectedItem.png new file mode 100644 index 0000000..7a74461 Binary files /dev/null and b/ComboBoxAdv_DataBinding_SelectedItem/Image/Programatically SelectedItem.png differ diff --git a/README.md b/README.md index ab9cb0d..28f4edf 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ # How-to-bind-SelectedItem-property-in-Winforms-SfComboBox -This session explains how to  bind SelectedItem property in Winforms SfComboBox +This example demonstrates how to bind the Winforms SfComboBox's SelectedItem property. +You can select the item programmatically in MultiSelectionComboBox control by using SelectedItem or SelectedItems property. + +# C# + + public Form1() + { + InitializeComponent(); + ViewModel viewModel = new ViewModel(); + sfComboBox1.DataSource = viewModel.Items; + sfComboBox1.DisplayMember = "LongName"; + sfComboBox1.ValueMember = "ShortName"; + sfComboBox1.DataBindings.Add(new Binding("SelectedItem", viewModel,"Selected",true, DataSourceUpdateMode.OnPropertyChanged)); + } + +![Programatically SelectedItem](ComboBoxAdv_DataBinding_SelectedItem/Image/Programatically%20SelectedItem.png) + +For more details please refer [How to bind SelectesItem property in SfComboBox](https://www.syncfusion.com/kb/11866/how-to-bind-selecteditem-property-of-sfcombobox-to-another-property)