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 8524431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:41:05+00:00 2026-06-11T07:41:05+00:00

i’ve defined an initial Table with three rows and 9 Column in Datagrid. right

  • 0

i’ve defined an initial Table with three rows and 9 Column in Datagrid. right now button should be visible only if i select a row and then press another button that i defined in my Ribbon-Tab after that my Button will be Visible. sofar everything works well, but the Problem is after saving my Table, closing it and open the Table again the button is not there anymore. I set the Visibility based on if the DataGridCell.IsSelected, also a BooleanToVisibilityConverter to convert the boolean value to a Visibility one.
can anyone help!

XAML:

<DataGrid.Resources>
   <BooleanToVisibilityConverter x:Key="BoolToVisConverter" />
</DataGrid.Resources>
<DataGridTemplateColumn x:Name="subgraphtyp" Header="H." Width="50">
   <DataGridTemplateColumn.CellTemplate>
     <DataTemplate>
       <Button Name="btnTable" Visibility="{Binding Path=Hinterlegung, Converter=  
               {StaticResource BoolToVisConverter}}"  Height="20" Width="25" 
               Click="Button_Table_Click">
         <Image Height="16" Source="Subgraph.png" Stretch="Fill" Width="16"/>
       </Button>
     </DataTemplate>
   </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

C#:
public bool Hinterlegung { get; set; }

private void Button_StartTableModus(object sender, RoutedEventArgs e)
{
  if (DataGrid1.SelectedItem != null && tabItem1.IsSelected)
  {
    TableDataRowStringItem item = (TableDataRowStringItem)DataGrid1.CurrentItem;
    string wert = item.ObjectType;
    string rowName = item.Name;
    if (wert == "Function" || wert == "Process")
    {
      item.Hinterlegung = true;
      if (!tabControl.Items.Contains(tabItem2))
      {
        tabControl.Items.Add(tabItem2);
        tabItem2.Focus();
        tabItem2.IsSelected = true;
        tabItem2.Header = rowName;
        TableTab.Visibility = Visibility.Visible;
        openTabs++;
        DataGrid2.IsReadOnly = false;

        starting_Table_Mod_at_start2V();
      }
    }
  }
}

//this my initial Table
private ObservableCollection<TableDataRowStringItem> tableobject = new      
ObservableCollection<TableDataRowStringItem>();

private void starting_Table_Mod_at_start2V()
{
  List<TableDataRowStringItem> rowstringList = new List<TableDataRowStringItem>();
  TableDataRowStringItem item = new TableDataRowStringItem();
  item.RowNumber = 1; item.saveFlag = true; item.ObjectType = "E"; item.Name = "E"; 
  item.PredecessorRowNumber = "0"; rowstringList.Add(item);
  item = new TableDataRowStringItem();
  item.RowNumber = 2; item.ObjectType = "Function"; item.Name = "Function";       
  item.PredecessorRowNumber = "1"; rowstringList.Add(item);
  item = new TableDataRowStringItem();
  item.RowNumber = 3; item.ObjectType = "E"; item.Name = "E";   
  item.PredecessorRowNumber = "2"; rowstringList.Add(item);


  for (int i = 0; i < rowstringList.Count; i++)
  {
    tableobject.Add(rowstringList[i]); 
  }
  DataGrid2.ItemsSource = tableobject;
}
  • 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-06-11T07:41:07+00:00Added an answer on June 11, 2026 at 7:41 am

    Your button’s visibility is bound to your Hinterlegung variable which has a default value of false. So as best as I can tell, you change it to true in this method – Button_StartTableModus. But, when you reinitialize, the value reverts to false, so you need to set it to true.

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

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.