.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

add/delete row & colom in Gird View using java script

Posted By:      Posted Date: October 23, 2010    Points: 0   Category :ASP.Net

 Dear Frs,

I create a gridview with text box and Dropdown control.

so that user can select value from dropdown(populate item from DB) and enter text on text boxx.

I bind this grdview with empty DB on page load.


Now i want that as user hit enter tab on text box a new row create with dropdown and text box.

i want do this only using Java script. because i dont want to go server side for add ing and deleting row.


i tryed this one http://geekswithblogs.net/dotNETvinz/archive/2009/06/04/adding-dynamic-rows-in-gridview-with-textboxes.aspx but not as i want.


I want add /delete row/com of gridview using java script only


Its very urregent dear so please fast reply if some one having solution. please copy/paste a ccomplete code for this

Thanks in advance


View Complete Post

More Related Resource Links

Register Java-Script Events on SharePoint 2010 Gantt View



did someone of you already try to implement dragging and dropping items in Gantt View for SharePoint 2010?

I was trying to register some JavaScript-Events on the vml-Elements (<v:shape class="jsgrid-vml".../>) representing events in the gantt-view. The problem is that i can not access theese items through DOM... Theese Elements are also not included in the html-code of the page (right click-> view source)...

Before I start to write a SilverLight-WebPart I just wanted to ask, if there are better Ideas...:-)



write a java script to show a msg wan to colse yes or no

 write a java script to show a msg wan to colse yes or no.if user select yes then another function is call then he select no then nothing happend

ssrs 2008 R2 - report parameter with no default set throws java script error

We have recently upgraded from SQL Server 2008 to SQL Server 2008 R2....I am experiencing a problem with my report parameters on my SSRS reports. It seems that my report parameters that I do not have a specified 'default' value throws a java script error when I try and run/render the report under R2.  As soon as I put a 'default' value on the report param, everything is fine.  However, that is not the behavior we need for our reports...the user needs to pick their selection. Can anyone shed some light on this, it seems to be an AJAX problem...I need to be able to have report parameters with a list of values, but no 'default' value on the parameter.

Receive/Delete Multiple FTP Files based on condition using SCRIPT(VB) TASK

I am trying to receive and delete multiple FTP files from a remote FTP server using Script task Below is the code   Dim FTPConnMgr As ConnectionManager FTPConnMgr = Dts.Connections("FTP Connection Manager") Dim FTPClientConn As FtpClientConnection = New FtpClientConnection(FTPConnMgr.AcquireConnection(Nothing)) Dim FileTimeStampNew As String = "20100913021807" Dim remoteFileNames(0) As String remoteFileNames(0) = Dts.Variables("FtpRemoteDirectory").Value & "*" & FileTimeStampNew & ".*" 'Below hardcoded FileName works good. But the problem is there are lots of file in the FTP folder that I dont want to receive 'remoteFileNames(0) = Dts.Variables("FtpRemoteDirectory").Value & "Company_alpha_Full_20100913021807.xml" Dim localPath As String = Dts.Variables("FtpLocalDirectory").Value FTPClientConn.Connect() FTPClientConn.ReceiveFiles(remoteFileNames, localPath, False, False) FTPClientConn.Close() Dts.TaskResult = ScriptResults.Success End Sub End Class If i specifically mention the RemotefileNames this works fine but, when I say *.* it executes succefully but doesn't receives the file. Please advice how to receive multiple file based on a variable BR, AWM

accesing controls on cotent pages using java script

i had a webform which used javascript for calander <head> <script language="javascript" src="Calendar.js" type="text/javascript"></script> </head> . . . <asp:TextBox ID="txtDateLeaving" runat="server" Enabled="false"></asp:TextBox> <a onclick="showCalendarControl(txtDateLeaving);" href="#"> <img src="calendar.gif" style="width: 20px; height: 20px" border="0" alt="cal" /></a> it was wrking perfectly . .but i am not able to run it using master pages.. when i try to access control on the content pageit says txtDateLeaving is not defined..can anybdy tell me how shld i achieve the same functionality using master n content pages..

grid view image delete problem

i have a grid in which i am showing a record with image, when user delete the record the image also deleted and when it again enter the record it upload the new image but display the deleted image from the cache example: name.jpeg upload, then deleted, a different file with the name.jpeg upload, it showing the deleted one. 

Calendar.aspx page Refresh only Once + Java Script

Hi Experts, Following script works perfect (refresh only once after 5 seconds and stops but for some reason if somebody clicks next month then it keeps refreshing for 5 seconds. Can you please put the following code in your calendar.aspx page and check if you can get rid of the continuous refresh if somebody selects next month otherwise it works fine. Please provide the updated script <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>Refresh test</title> <script type="text/javascript">   window.onload=function(){     url = window.location.href;     qIndex = url.indexOf("?");     if( qIndex != -1 ){       getData = url.substr(qIndex+1, url.length-1);       if(getData != "refreshed=1"){         refresh();       } else {         myDiv = document.getElementById('content');         myDiv.innerHTML = "This is the second and final time the page loaded.";       }    

java script problem !

hi.i have this code : <asp:TextBox ID="TextBox1" runat="server" Width="92px"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="ok" Width="64px" /> <asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatDirection="Horizontal"> <asp:ListItem Value="1"></asp:ListItem> <asp:ListItem Value="2"></asp:ListItem> <asp:ListItem Value="3"></asp:ListItem> </asp:CheckBoxList> and in button i have this code : If TextBox1.Text.Contains("1").ToString Then CheckBoxList1.Items.Item(0).Selected = True Else CheckBoxList1.Items.Item(0).Selected = False End If If TextBox1.Text.Contains("2").ToString Then CheckBoxList1.Items.Item(1).Selected = True Else CheckBoxList1.Items.Item(1).Selected = False End If If TextBox1.Text.Contains("3").ToString Then CheckBoxList1.Items.Item(2).Selected = True Else CheckBoxList1.Items.Item(2).Selected = False End If how i can do this code with javascript instead of vb code ?

Problem with java script basic script constraint.

 hi my code isfunction checkValue(){ if(''==document.getElementById ('textbox1').value) { alert('Please enter a value'); } }   and i am calling it on a button click event but its not responding. html code:  <asp:Button ID="btnButton" runat="server" Text="Button" onclick="checkValue()"/>   please help.

how to check one time java script file download not every session

how to check one time java script file download not every session

Grid view delete problem

i hav a problem with delete in gridview.my backend is oracle 10g.it throws a ORA-01036 exception when i press delete button.here's my link to code. using System; using System.Collections; using System.Configuration; using System.Data; using System.Data.Odbc; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Data.OracleClient; public partial class Default2 : System.Web.UI.Page { OracleConnection con = new OracleConnection("Data Source=XE;User ID=SYSTEM;Password=****;Unicode=True"); OracleCommand cmd; DataSet ds = new DataSet(); OracleDataAdapter oda; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { getdata(); } } protected void Button1_Click(object sender, EventArgs e) { cmd = new OracleCommand("insert into petitioner values("+ TextBox6.Text +",'"+ TextBox1.Text +"',"+ TextBox2.Text +","+ TextBox3.Text +","+ TextBox4.Text +","+ TextBox5.Text +")", con); cmd.Connection.Open(); cmd.ExecuteNonQuery(); cmd.Connection.Close(); getdata();

form sliding using java script

how can we use sliding forms in asp.net

How to properly configure permissions so users can view, add, edit, and delete list items, but not w

I am trying to figure out how to properly setup security so that it can be configured at the top-level, and then inherited all the way through. Here is what I would like to do: Each user can view, add, edit, and delete list items - but, users cannot modify or delete web part pages. The only way I know how to do this is set Contribute from the top-down, and then go into each Site Pages library and set Read access. The problem is that I have 100 sites, and I was hoping there was a way I could set security at the top, and inherit downward. Rather than having to go into all 100 Site Pages library and set Read access. Is there a way to do this? Thanks in advance.

delete using boung field value inside grid view

I want to delete data using boung field value inside grid view, I am doing this...but it is not finding bound field value<asp:BoundField DataField="nsid" HeaderText="nsid" SortExpression="nsid" Visible="false" />protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)    {        string sid = GridView1.DataKeys[e.RowIndex]["nsid"].ToString();        SqlCommand cmdx = new SqlCommand("delete from blogreply where sid='"+sid+"'",con);        con.Open();        cmdx.ExecuteNonQuery();        con.Close();please anyone tell me how to find bound field value..

java script to call serverside function

hi i want java script by which i can call my asp.net (vb) function which i have written in aspx.vbi just using the vb function to change and check value of hiddenfild and other controln dont want to use ajax control toolkit , i wat to perform some action after spefic time interval

How to call java script in grid rowdatabound event

Guys I want some help on this issue my code goes like this protected void grdResults_RowDataBound(object sender, GridViewRowEventArgs e)    {        if (e.Row.RowType == DataControlRowType.DataRow)        {                       TextBox txtQty = e.Row.Cells[1].FindControl("txtQty") as TextBox;            Label lblTWeight = e.Row.Cells[9].FindControl("lblTWeight") as Label;            Label lblTMHRS = e.Row.Cells[10].FindControl("lblTMHRS") as Label;            Label lblTLabor = e.Row.Cells[11].FindControl("lblTLabor") as Label;            Label lblTMaterial = e.Row.Cells[12].FindControl("lblTMaterial") as Label;            Label lblTCost = e.Row.Cells[13].FindControl("lblTCost") as Label;            string onComp = "getTotalComplete(document.getElementById('" + txtQty.ClientID + "'));&q

Wizard Control and Java Script

Hi!Does enyone know if it is possible to get wizards next active step (that can be allso previous step when going back) width and height values in JavaScript?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend