0
votes

I want to ask that when i come to page where i have my gridview control i need to update according to one specific id.for example i have my gridview control on control page1.ascx i have some other gridview control on page2.ascx where there can be many rows; when i select row from page 2.ascx it should give me same selected row data on gridview on pag1.ascx. Gridview on page1.ascx will have only one specific row against id of row of gridview on page2.ascx.

how to do it what is the event of gridview to do this? i am using webuser control...

1

1 Answers

0
votes

I added parameters and receive that parameters in form of on related control page and checked value in that page.

page.AddUserControl(PageType.Template_SearchSection, new object[] { new KeyValuePair("Key", true) });

and on respected control i have coded as:

if (((KeyValuePair)(parameters[0])).Key.Equals("Key")) {

                bool s = ((KeyValuePair<string, bool>)(parameters[0])).Value;
                if (s == true)
                 ToolBar1.ShowSelectAndClose = true;

                else 
                 ToolBar1.ShowSelectAndClose = false;
             }