Click here to Skip to main content
15,914,780 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Is there a way to restrict the user from changing virtual directory name Pin
Sebastian T Xavier25-Apr-12 18:46
Sebastian T Xavier25-Apr-12 18:46 
QuestionSeeking good ad hoc reporting tool. Pin
aglenwood17-Apr-12 17:43
aglenwood17-Apr-12 17:43 
AnswerRe: Seeking good ad hoc reporting tool. Pin
Richard MacCutchan17-Apr-12 21:30
mveRichard MacCutchan17-Apr-12 21:30 
QuestionAjax GridView Pin
Sajuz17-Apr-12 2:03
Sajuz17-Apr-12 2:03 
AnswerRe: Ajax GridView Pin
ZurdoDev17-Apr-12 5:42
professionalZurdoDev17-Apr-12 5:42 
AnswerRe: Ajax GridView Pin
Sajuz18-Apr-12 19:06
Sajuz18-Apr-12 19:06 
AnswerRe: Ajax GridView Pin
ZurdoDev19-Apr-12 6:47
professionalZurdoDev19-Apr-12 6:47 
GeneralRe: Ajax GridView Pin
Sajuz19-Apr-12 18:36
Sajuz19-Apr-12 18:36 
Actually when i call add new row function in the text box change ,For every enter event outside the grid also adding row to the grid.I did the row adding by using data table .The code is posted below
private void AddNewRowToGrid()
{

int rowIndex = 0;



if (ViewState["CurrentTable"] != null)
{

DataTable dtCurrentTable = (DataTable)ViewState["CurrentTable"];

DataRow drCurrentRow = null;
int i;

if (dtCurrentTable.Rows.Count > 0)
{

for (i = 1; i <= dtCurrentTable.Rows.Count; i++)
{

//extract the TextBox values

DropDownList drp1 = (DropDownList)Gridview1.Rows[rowIndex].Cells[1].FindControl("drpptype");
//TextBox box1 = (TextBox)Gridview1.Rows[rowIndex].Cells[1].FindControl("TextBox1");


TextBox box2 = (TextBox)Gridview1.Rows[rowIndex].Cells[2].FindControl("txtpnumer");

//TextBox box3 = (TextBox)Gridview1.Rows[rowIndex].Cells[3].FindControl("TextBox3");



drCurrentRow = dtCurrentTable.NewRow();

drCurrentRow["Sl.No"] = i + 1;

drCurrentRow["Column1"] = drp1.SelectedValue;

drCurrentRow["Column2"] = box2.Text;

//drCurrentRow["Column3"] = box3.Text;



rowIndex++;

}

//add new row to DataTable

dtCurrentTable.Rows.Add(drCurrentRow);
//removing first row...

//Store the current data to ViewState

ViewState["CurrentTable"] = dtCurrentTable;



//Rebind the Grid with the current data

Gridview1.DataSource = dtCurrentTable;

Gridview1.DataBind();

DropDownList drp = (DropDownList)Gridview1.Rows[i - 1].Cells[1].FindControl("drpptype");
bindGridviewdrop(drp);

}


}

else
{

Response.Write("ViewState is null");

}



//Set Previous Data on Postbacks

SetPreviousData();

}

And in the page load i'm setting the initial row to the grid..And the setpreviousData() function will set the previous data.In this way i'm adding row.So every post back function adding the new. So can u suggest me a solution for this
QuestionLogout control hide in login page using master page Pin
rakeshs31217-Apr-12 1:29
rakeshs31217-Apr-12 1:29 
AnswerRe: Logout control hide in login page using master page Pin
Bilal Ahmed Lilla17-Apr-12 2:07
Bilal Ahmed Lilla17-Apr-12 2:07 
GeneralRe: Logout control hide in login page using master page Pin
rakeshs31217-Apr-12 2:24
rakeshs31217-Apr-12 2:24 
GeneralRe: Logout control hide in login page using master page Pin
prateeksinghgangwar17-Apr-12 7:57
prateeksinghgangwar17-Apr-12 7:57 
AnswerRe: Logout control hide in login page using master page Pin
jkirkerx17-Apr-12 10:05
professionaljkirkerx17-Apr-12 10:05 
GeneralRe: Logout control hide in login page using master page Pin
jkirkerx17-Apr-12 16:10
professionaljkirkerx17-Apr-12 16:10 
AnswerRe: Logout control hide in login page using master page Pin
Not Active17-Apr-12 12:41
mentorNot Active17-Apr-12 12:41 
AnswerRe: Logout control hide in login page using master page Pin
vvashishta24-Apr-12 19:05
vvashishta24-Apr-12 19:05 
QuestionLinkButton onclick event is firing twice Pin
indian14316-Apr-12 7:07
indian14316-Apr-12 7:07 
AnswerRe: LinkButton onclick event is firing twice Pin
Not Active16-Apr-12 7:45
mentorNot Active16-Apr-12 7:45 
GeneralRe: LinkButton onclick event is firing twice Pin
indian14316-Apr-12 9:45
indian14316-Apr-12 9:45 
GeneralRe: LinkButton onclick event is firing twice Pin
Not Active17-Apr-12 12:46
mentorNot Active17-Apr-12 12:46 
QuestionAvoid page rendering multiple times Pin
indian14316-Apr-12 6:00
indian14316-Apr-12 6:00 
AnswerRe: Avoid page rendering multiple times Pin
Not Active16-Apr-12 7:43
mentorNot Active16-Apr-12 7:43 
Questionsoap headers are not added Pin
anandsurya16-Apr-12 0:04
anandsurya16-Apr-12 0:04 
Questionhow to add soap headers to the xml generated from webservice Pin
anandsurya16-Apr-12 0:00
anandsurya16-Apr-12 0:00 
QuestionHow to get values from Ajax Editor control inside the Details view??? Pin
Shivanand Arur15-Apr-12 21:23
Shivanand Arur15-Apr-12 21:23 

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.