Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6931705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:36:44+00:00 2026-05-27T11:36:44+00:00

I am developing a Silverlight web part for Sharepoint 2010. I have a button

  • 0

I am developing a Silverlight web part for Sharepoint 2010. I have a button in a datagrid as follows

<sdk:DataGridTemplateColumn Width="80" >
   <sdk:DataGridTemplateColumn.CellTemplate>
      <DataTemplate>
         <Button x:Name="MarkBilledButton" Content="Mark Billed"  VerticalAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" Click="MarkBilledButton_Click" />
      </DataTemplate>
   </sdk:DataGridTemplateColumn.CellTemplate>
</sdk:DataGridTemplateColumn>

private void MarkBilledButton_Click(object sender, RoutedEventArgs e)
{
   Button btn = sender as Button;
   //string buttonContent = btn.Content.ToString();
   MedwaiverTimeLog timeLogObj = btn.DataContext as MedwaiverTimeLog;
   MedwaiverViewModel MedwaiverViewModelObj = new MedwaiverViewModel();
   MedwaiverViewModelObj.ChangeBillingStatus(timeLogObj.ListItemId, "Billed");
   btn.IsEnabled = false;
}

I want the make the button disable on button click which is happening on button click event. But when I click on that disable button it gets enabled. I don’t want to enable the button once it is disabled. How to do this? Can you please tell me where I am going wrong ? Or can you please provide me any code so that I can solve the above issue ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:36:45+00:00Added an answer on May 27, 2026 at 11:36 am

    I think you can achieve this by introducing binding of Button’s IsEnable property to a boolean property in your ModelView. On MarkBilledButton_Click, set that property to FALSE, and even if refresh happened of the control, due the internal WPF framework message pumping, or due the some programming (which is not visible here), IsEnable property of the button will be read from ModelView.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing silverlight web part for sharepoint 2010. I have an xml file
I am developing silverlight web part for sharepoint 2010. In my project I have
I am developing silverlight web part. I have a one List Entry log. In
I am developing silverlight web part by using the client object model. I am
I'm a .Net developer and want to get into developing Silverlight applications. I have
I am developing a Silverlight app using VS2008 Express. I have just implemented a
I'm developing a small web application using Microsoft Silverlight 3. I'm using Microsoft Expressin
At the moment I'm developing a web based application using Silverlight 3.0. For the
I am developing a web app using silverlight. I read that Microsoft offers 10
I have been developing a Silverlight application using WCF. The problem is that sometimes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.