Gridview Control

GridView Control is graphical user interface which displays the values of a table.


There are a few things which you should pay attention to a Gridview control :
  • Asking datasource control to generate CRUD statements (create, retrieve, update, delete statements)
  • Opening Fields dialog box to customize gridview
  • Using the eventhandler named SelectedIndexChanged to select data from a gridview.
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            TableCell mycell=GridView1.SelectedRow.Cells[2];

            Label1.Text = mycell.Text;

        }
  • Two grids can pass parameter with each other by the property named  SelectedValue in a datasource  
                <SelectParameters>
                    <asp:ControlParameter ControlID="GridView1"  Name="IdArticles" PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
Share on Google Plus

About Chien

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments:

Post a Comment