cyber_bafu Posted May 25, 2009 Posted May 25, 2009 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: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.