Click here to Skip to main content
15,922,894 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: what is the advantage of URL rewritting Pin
minhpc_bk16-Apr-06 20:10
minhpc_bk16-Apr-06 20:10 
QuestionAdd param to web service Pin
hung_ngole16-Apr-06 18:07
hung_ngole16-Apr-06 18:07 
AnswerRe: Add param to web service Pin
minhpc_bk16-Apr-06 20:12
minhpc_bk16-Apr-06 20:12 
QuestionHelp for publish server file to remote server Pin
Kenzy8616-Apr-06 17:38
Kenzy8616-Apr-06 17:38 
AnswerRe: Help for publish server file to remote server Pin
minhpc_bk16-Apr-06 20:27
minhpc_bk16-Apr-06 20:27 
GeneralRe: Help for publish server file to remote server Pin
Kenzy8617-Apr-06 16:04
Kenzy8617-Apr-06 16:04 
GeneralRe: Help for publish server file to remote server Pin
minhpc_bk17-Apr-06 19:49
minhpc_bk17-Apr-06 19:49 
QuestionCan't get DataGrid editable Pin
Brosten16-Apr-06 9:29
Brosten16-Apr-06 9:29 
I've just started playing around with ASP.NET. I run into problem with the datagrid. My intention is to use the "EditItemIndex" feature to get one of the rows converted into edit-boxes instead of plain test.

My problem is that I can't seem to get edit-boxes, instead the row to be edited remains in plain text.

I am using the "create columns automatically at run-time" option. Could this be the problem? I have tried both to handle the event when the "Edit" button is pressed and to set the EditItemIndex = 1 from start. Neither of it seem to work.

Here is the code of the example where the EditItemIndex is set to one from start:

-------- HTML ----------------------------------------------
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Test1.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:DataGrid id="dgResult" style="Z-INDEX: 101; LEFT: 280px; POSITION: absolute; TOP: 104px" runat="server" Width="328px" Height="392px" EditItemIndex="2"></asp:DataGrid>
</form>
</body>
</HTML>
-------------- END OF HTML ------------------------------------------------


--------- CODE BEHIND -------------------------------------------
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace Test1
{
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid dgResult;

private void Page_Load(object sender, System.EventArgs e)
{
string sqlQueary;
string connectionString = "server=localhost; database=Northwind; uid=sa; pwd=xxxxx;";
SqlConnection conn = new SqlConnection(connectionString);
sqlQueary = "SELECT CustomerID, CompanyName FROM customers";
SqlCommand sqlCom = new SqlCommand(sqlQueary, conn);
conn.Open();
dgResult.DataSource = sqlCom.ExecuteReader();
dgResult.DataBind();
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
--------- END OF CODE BEHIND ------------------------------------


Any idea of what could be wrong is appreciated!
AnswerRe: Can't get DataGrid editable Pin
minhpc_bk16-Apr-06 19:55
minhpc_bk16-Apr-06 19:55 
GeneralRe: Can't get DataGrid editable Pin
Brosten16-Apr-06 21:40
Brosten16-Apr-06 21:40 
QuestionProblems with Web Services :( Pin
atzakas16-Apr-06 9:26
atzakas16-Apr-06 9:26 
Questionhow can i add media Pin
waleed9916-Apr-06 7:45
waleed9916-Apr-06 7:45 
AnswerRe: how can i add media Pin
minhpc_bk16-Apr-06 19:59
minhpc_bk16-Apr-06 19:59 
QuestionCustomising browser Pin
metbinu2003@yahoo.com16-Apr-06 2:35
metbinu2003@yahoo.com16-Apr-06 2:35 
AnswerRe: Customising browser Pin
Guffa16-Apr-06 2:40
Guffa16-Apr-06 2:40 
AnswerRe: Customising browser Pin
Darpan Gogia18-Apr-06 23:55
Darpan Gogia18-Apr-06 23:55 
QuestionCurrency Pin
RX Maverick16-Apr-06 0:50
RX Maverick16-Apr-06 0:50 
AnswerRe: Currency Pin
Mircea Grelus16-Apr-06 3:23
Mircea Grelus16-Apr-06 3:23 
AnswerRe: Currency Pin
Guffa16-Apr-06 3:50
Guffa16-Apr-06 3:50 
AnswerRe: Currency Pin
minhpc_bk16-Apr-06 20:40
minhpc_bk16-Apr-06 20:40 
QuestionCreate Search Engine Pin
vijender kumar15-Apr-06 21:24
vijender kumar15-Apr-06 21:24 
QuestionInvisible by defult Pin
2hdass15-Apr-06 15:17
2hdass15-Apr-06 15:17 
GeneralRe: Invisible by defult Pin
Guffa15-Apr-06 18:33
Guffa15-Apr-06 18:33 
AnswerRe: Invisible by defult Pin
Darpan Gogia18-Apr-06 23:58
Darpan Gogia18-Apr-06 23:58 
Questionnamespace? i dont see my classes? Pin
2hdass15-Apr-06 13:37
2hdass15-Apr-06 13:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.