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

  • Home
  • SEARCH
  • 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 6622013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:20:55+00:00 2026-05-25T21:20:55+00:00

I have two image buttons that hide and show a radgrid depending on what

  • 0

I have two image buttons that hide and show a radgrid depending on what the client wants to see. When a button is clicked, the grid.visible property is set to true or false. The problem is that when I click the button the first time, the page posts back and does not work. Then I click a couple more times, and it shows only a horizontal line (I assume it is the grid not databound). I click a few more times and the grid shows and hides perfectly. However, when the user navigates away from the page and then comes back to this page, I get the same problem.

Any help would be appreciated.

.aspx

        <div class="RegistrationHistoryGrid" >
            <telerik:RadGrid ID="rgRegistrationHistory" Width="100%"  ShowHeader="true" AutoGenerateColumns="false" OnSelectedIndexChanged="rgRegistrationHistory_SelectedIndexChanged" AllowCustomPaging="true" AllowSorting="True" AllowPaging="True" PageSize="10" runat="server" Gridlines="None" CellSpacing="0" onneeddatasource="rgRegistrationHistory_OnNeedDataSource" >
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="true" EnablePostBackOnRowClick="true">
                    <Selecting AllowRowSelect="True" />
                </ClientSettings>
                <MasterTableView Width="100%" Summary="RadGrid table" DataKeyNames="ClientID, LastName, FirstName, Gender,DateOfBirth,Address">
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Period" Reorderable="false" UniqueName="Period"  DataField="Period"/>
                    <telerik:GridBoundColumn HeaderText="Plate" Reorderable="false" UniqueName="Plate"  DataField="Plate"/>
                    <telerik:GridBoundColumn HeaderText="Comment" Reorderable="false" UniqueName="Comment"  DataField="Comment"/>
                        </Columns>
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="LastName" SortOrder="Ascending" />
                </SortExpressions>
            </MasterTableView>
                <PagerStyle Mode="NextPrevAndNumeric" />
                <FilterMenu EnableImageSprites="False"></FilterMenu>
                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
                </telerik:RadGrid>
        </div>

.cs

protected void rgRegistrationHistory_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    List<int> fakeList = new List<int>();
    rgRegistrationHistory.DataSource = fakeList;
}

protected void imgChevronClosed_Click(object sender, ImageClickEventArgs e)
{
    imgChevronOpen.Visible = true;
    imgChevronClosed.Visible = false;
    rgRegistrationHistory.Visible = false;

}
protected void imgChevronOpen_Click(object sender, ImageClickEventArgs e)
{
    imgChevronOpen.Visible = false;
    imgChevronClosed.Visible = true;
    rgRegistrationHistory.Visible = true;
}
  • 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-25T21:20:55+00:00Added an answer on May 25, 2026 at 9:20 pm

    You have to rebind the grid when you toggle its visibility. See this article on the matter.

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

Sidebar

Related Questions

i have two buttons in menu on mouse over the button change image to
I have a header for a list that contains two image buttons. I want
I have a MasterPage that has two image buttons , and two content pages,
I have two models, Room and Image . Image is a generic model that
I have two methods, one that I use to convert an image to a
Everybody.. How to set animation on button click ? I have two buttons, both
I have a screen with a background image and two buttons at the bottom.
So, I have a DIV full of four HTML buttons that use an image
I have two buttons on a page that trigger two functions that make two
I have a RadGrid that contains a template column in which I've put two

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.