Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have an asp:DataGrid in my page and it is just like a text area...

I can't click any cell, is this supposed to be like this?

if not, how can i add an event to my asp:DataGrid?

 

this is the code behind:

 

void Page_Load(object sender, EventArgs e)

{

conn= new OleDbConnection(str_conn);

conn.Open();

cmd = new OleDbCommand("select * from items", conn);

dg1.DataSource = cmd.ExecuteReader();

dg1.DataBind();

conn.Close();

}

 

and this..

<asp:datagrid ID="dg1" align="center" Runat="server" class="grid" width="80%" >

 

<HeaderStyle CssClass="header"></HeaderStyle>

<ItemStyle CssClass="item"></ItemStyle>

<AlternatingItemStyle CssClass="alt_item"></AlternatingItemStyle>

 

 

 

</asp:datagrid>

 

 

Advance thank you for your help.,.,

:cool: :cool: :cool:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...