Click here to Skip to main content
15,895,462 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Database Problem Pin
WoutL28-Feb-07 8:35
WoutL28-Feb-07 8:35 
AnswerRe: Database Problem Pin
balu chettri28-Feb-07 6:38
balu chettri28-Feb-07 6:38 
AnswerRe: Database Problem Pin
Guffa28-Feb-07 8:36
Guffa28-Feb-07 8:36 
AnswerRe: Database Problem Pin
Vasudevan Deepak Kumar28-Feb-07 12:31
Vasudevan Deepak Kumar28-Feb-07 12:31 
QuestionIIS 5.0 to IIS 6.0 Upgrade Pin
No-e28-Feb-07 4:18
No-e28-Feb-07 4:18 
AnswerRe: IIS 5.0 to IIS 6.0 Upgrade Pin
Vasudevan Deepak Kumar28-Feb-07 12:32
Vasudevan Deepak Kumar28-Feb-07 12:32 
AnswerRe: IIS 5.0 to IIS 6.0 Upgrade Pin
Guffa28-Feb-07 21:18
Guffa28-Feb-07 21:18 
QuestionInserting a new row. Pin
nclauder28-Feb-07 4:08
nclauder28-Feb-07 4:08 
Hi,
I want to share this problem. I have a datagrid that will help me Insert data into sql database. So I made a button On my form so that when I press the button a new row on datagrid should be created and I could be able to insert data. But with this code below I've failed could someone help me and tell me where I'm going wrong:

private void Page_Load(object sender, System.EventArgs e)
{
if (! IsPostBack)
{

Fill();
Bind();
}
}
DataTable table = new DataTable();
private void Fill()
{
SqlDataAdapter adapter = new SqlDataAdapter("select * from dbo.DashBoard", con);
adapter.Fill(table);
}
private void Bind()
{
dgis.DataSource = table;
dgis.DataBind();
}

private void InsertEmpty()
{
table.Rows.InsertAt(table.NewRow(), 0);
}

private void bttnew_Click(object sender, System.EventArgs e)
{
// inserting
dgis.EditItemIndex = 0;

// modify text
EditCommandColumn ecc = (EditCommandColumn) dgis.Columns[6];
ecc.UpdateText = "Update";

// fill table, insert empty row, bind to datagrid
Fill();
InsertEmpty();
Bind();
}

private void dgis_ItemCommand(object source,System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
// stop editing
dgis.EditItemIndex = -1;

switch (e.CommandName)
{
case "Insert":
break;

case "Update":
break;

case "Cancel":
break;

case "Edit":
// begin editing
EditCommandColumn ecc = (EditCommandColumn) dgis.Columns[6];
ecc.UpdateText = "Insert";
dgis.EditItemIndex = e.Item.ItemIndex;
break;
}

// fill and bind
Fill();
//InsertEmpty();
Bind();
}

Thanks.
QuestionWebpage with Zoom, and Rotate functionality Pin
swjam28-Feb-07 3:07
swjam28-Feb-07 3:07 
AnswerRe: Webpage with Zoom, and Rotate functionality Pin
Vasudevan Deepak Kumar28-Feb-07 12:33
Vasudevan Deepak Kumar28-Feb-07 12:33 
AnswerRe: Webpage with Zoom, and Rotate functionality Pin
badgrs1-Mar-07 0:32
badgrs1-Mar-07 0:32 
QuestionEnsuring Database Security Pin
Meysam Mahfouzi28-Feb-07 2:28
Meysam Mahfouzi28-Feb-07 2:28 
AnswerRe: Ensuring Database Security Pin
Bradml1-Mar-07 0:06
Bradml1-Mar-07 0:06 
GeneralRe: Ensuring Database Security Pin
Meysam Mahfouzi1-Mar-07 9:28
Meysam Mahfouzi1-Mar-07 9:28 
GeneralRe: Ensuring Database Security Pin
Bradml3-Mar-07 15:54
Bradml3-Mar-07 15:54 
QuestionRegular Expression Pin
248912828-Feb-07 2:12
248912828-Feb-07 2:12 
AnswerRe: Regular Expression for validating password strength Pin
andyharman28-Feb-07 6:16
professionalandyharman28-Feb-07 6:16 
QuestionWebconfig Ajax Pin
AnhTin27-Feb-07 21:12
AnhTin27-Feb-07 21:12 
AnswerRe: Webconfig Ajax Pin
badgrs27-Feb-07 22:43
badgrs27-Feb-07 22:43 
QuestionAJAX web app - ScriptResource-Handler failes to load js resources Pin
civilwar27-Feb-07 20:40
civilwar27-Feb-07 20:40 
QuestionHow should we design the programe if we like to add up more detail ? Pin
sdev27-Feb-07 19:41
sdev27-Feb-07 19:41 
AnswerRe: How should we design the programe if we like to add up more detail ? Pin
Paddy Boyd27-Feb-07 23:54
Paddy Boyd27-Feb-07 23:54 
GeneralRe: How should we design the programe if we like to add up more detail ? Pin
sdev28-Feb-07 6:32
sdev28-Feb-07 6:32 
GeneralRe: How should we design the programe if we like to add up more detail ? Pin
sdev28-Feb-07 6:37
sdev28-Feb-07 6:37 
QuestionCookies Pin
Sachin Pimpale27-Feb-07 19:36
Sachin Pimpale27-Feb-07 19:36 

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.