Posts

Showing posts from June, 2025

Repeater Control

  Ø  Repeater Control:- 1.  Display data in row format. Ex:- first html changes like adding item templates and all and giving control in it           < asp : Repeater   ID ="Repeater1"   runat ="server">                  < ItemTemplate >                      < b >                         ROll                      </ b >                      < asp : Label   ID ="Label1"   runat ="server" ...

Pageing notes (missing)

DISPLAY IMAGE IN GRIDVIEW CONTROL

  ·  DISPLAY IMAGE IN GRIDVIEW CONTROL :- IN THIS CONCEPT WE HAVE TO USE IMAGE-FIELD PROPERTY .   ·  PROPERTY OF IMAGE FIELD :- 1)  DATA-IMAGE-URL-FIELD = COLUMN NAME 2)  DATA-IAMEG-URL-FORMAT-STRING = LOCATION (~/PIC/{0}) 0 REPRESENTING FOLDER INDEX 3)  HEADER-TEXT   ·  HOW TO SET IMAGE FIELD ELEMENT (HEIGHT AND WIDTH) IN THIS CONCEPT WE USE CONTROL-STYLE-TAG <>

Event handling outside the gridview (FOR EACH LOOP)

  Ø  Event Handling using for loop This concept we used outside gridview       // event handling outside control the grid view control          // using for each loop            foreach  (GridViewRow obj   in  GridView1.Rows)         {                // find control                // control obj =(control)rowobject.findcontrol("controlid");               TextBox objtext = (TextBox)obj.FindControl( "TextBox4" );               Response.Write(objtext.Text); }    

Event handling inside gridview

Ø  Grid view event handling (Controls which are inside the grid view ) 1.  Perform eventhandling  inside the grid view control(naming container method) 2.  Naming container method in which we need to create gridviewrow object Syntax:- GridViewRow obj =((control)sender).naming containeer as GridViewRow     GridViewRow objg1 = ((Button)sender).NamingContainer as  GridViewRow   For creating onclick function in inside of grid control we need on click keyword OnClick ="Button5_Click"         3.  We need to Use find control after the  naming container Syntax :- Control obj = (control)rowobject.findcontrol(controlid) Code :- TextBox objtxtname = (TextBox)objg1.FindControl( "TextBox4" );         Response.Write(objtxtname.Text);  

Grid view footer

  Ø  Grid view footer :- We have to use showfooter key word for this. Note:-First column name no. Is 0.   < asp : GridView   ID ="GridView1"   runat ="server"   AutoGenerateColumns ="False"   ShowFooter ="true">     Ø  Displaying data in grid view footer . In this method we need to use footer row property.  

how to insert control inside the gridview

  Ø  How to insert control inside the grid view S1 :- Use template felid Template field property- headertext S2:- Using <item template>  tag inside the template field     Ø  How to display data base column to template control In this we have to use Eval() function   Syntax: -   ‘<%#Eval(“columnname”) %>’   Ex:- <%#Eval(“name”)%> <%#Eval(“email”)%>   Code :-   < ItemTemplate >                              < asp : TextBox   ID ="TextBox4"   runat ="server"   Text =' <% #  Eval( "name" ) %> '></ asp : TextBox >                          </ ItemTemplate >            ...

Bound Control (Data control)

  ·  DATA CONTROL :- DATA CONTROL IS USED FOR REPORTING CONCEPT.   ·  PROPERTY OF DATA CONTROL :- 1)  DATA SOURCE – DR 2)  DATA BIND – ()   ·  PROPERTY WITH NAME IS ERROR WHICH MEANS COLUMN NAME DOES NOT MATCH WITH GRID VIEW COLUMN.     THERE ARE FOLLWING DATA CONTROL 1)  GRID VIEW  :- A)  DISPLAY DATA IN TABULAR FORMAT B)  GRID VIEW INDEX STARTING FROM 0----N . C)  GRID VIEW IMPLEMENTATION a.  BASIC BINDING – STEP = SEARCH GRID VIEW à   CLICK ARROW à  EDIT COLUMN à  SELECT BOUND FIELD à  ADD   PROPERTY OF BOUND FIELD 1)  HEADERTEXT 2)  DATAFIELD – NAME OF COLUMN   HOW TO REMOVE EXTRA COLUMN   AUTO GENERATE CHECKBOX UNSELECT.   Ø  CODE OF BASIC BINDING Ø              //OPEN CONNECTION Ø               string  PATH = @...