Click here to Skip to main content
15,891,864 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Problem with Gridview Edit Button Pin
Vimalsoft(Pty) Ltd25-Nov-09 21:21
professionalVimalsoft(Pty) Ltd25-Nov-09 21:21 
GeneralRe: Problem with Gridview Edit Button Pin
wr302826-Nov-09 19:18
wr302826-Nov-09 19:18 
GeneralRe: Problem with Gridview Edit Button Pin
Vimalsoft(Pty) Ltd26-Nov-09 19:40
professionalVimalsoft(Pty) Ltd26-Nov-09 19:40 
AnswerRe: Problem with Gridview Edit Button Pin
carlecomm26-Nov-09 15:10
carlecomm26-Nov-09 15:10 
GeneralRe: Problem with Gridview Edit Button Pin
wr302826-Nov-09 19:19
wr302826-Nov-09 19:19 
Questionhow to fill gridView from TextBox value in asp.net using javascript and Xml Pin
Member 359649725-Nov-09 17:33
Member 359649725-Nov-09 17:33 
AnswerRe: how to fill gridView from TextBox value in asp.net using javascript and Xml Pin
Abhijit Jana25-Nov-09 17:35
professionalAbhijit Jana25-Nov-09 17:35 
GeneralRe: how to fill gridView from TextBox value in asp.net using javascript and Xml Pin
Member 359649725-Nov-09 19:27
Member 359649725-Nov-09 19:27 
Sorry The Code is Here.........

********** Java Script Page ***********
var XmlReq;
var ServerPageName = "Handlegriddata.aspx";
function CreateXmlReq()
{
debugger;
try
{
XmlReq = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
XmlReq = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(oc)
{
XmlReq = null;
}
}
if(!XmlReq && typeof XMLHttpRequest != "undefined")
{
XmlReq = new XMLHttpRequest();
}
}


function FetchDGContents(text)
{ debugger ;

var requestUrl = Handlegriddata.aspx + "?Registardata=" + text;

CreateXmlReq();

if(XmlReq)
{
XmlReq.onreadystatechange = HandleResponse;
XmlReq.open("GET", requestUrl, true);
XmlReq.send();
}
}

function HandleResponse()
{
debugger ;
if(XmlReq.readyState == 4)
{
if(XmlReq.status == 200)
{

FillTable(XmlReq.responseXML.documentElement);
}
else
{
alert("There was a problem retrieving data from the server." );
}
}
}


function FillTable(Txtdata)
{
debugger ;

var DsData = scity.getElementsByTagName('dsVal'); //dsval dataset
var tbl = document.getElementById('GridView1').getElementsByTagName("tbody")[0];
for(var i=0;i<DsData.context.childNodes(0).parentNode.childNodes.length;i++)
{
var row = document.createElement("TR");
row.setAttribute("className","text");
row.setAttribute("bgColor","#ECECEC");


for(var j=0;j<DsData.context.childNodes(0).childNodes.length;j++)
{

var cell = document.createElement("TD");

cell.innerHTML = auth.context.childNodes(i).childNodes(j).text;

row.appendChild(cell);
}

tbl.appendChild(row)
}
}

***********Handlegriddata.aspx******************
string XmlString, Regdata ;
string[] split;
DataSet DA= new DataSet("dsVal");

protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
Regdata= Request["Registardata"];
if(Regdata.Length > 0 )
{
Response.Clear();
split=choice.Split(',');
DataTable dt = new DataTable("PresenterInfo");
DBLayer objdblayer = new DBLayer();
dt = objdblayer.getRSetSQL("Select PresenterName,PresenterAddress,InfavorOf,ExecutedBy from USERS..Presenter_Info where 1=2", DBLayer.SqlType.SqlQuery); //For table Structure
dt.Rows.Add();
for(int i=0 ;i<dt.Columns.Count;i++)
{
if(i<split.Length)
dt.Rows[0][i]=split[i].ToString().Trim();
else
break;
}
DA.Tables.Add( dt);
XmlString=DA.GetXml();
Response.Clear();
Response.ContentType = "text/xml";
Response.Write(XmlString);
Response.End();
}
else
{
Response.Clear();
Response.End();
}
}
else
{
Response.Clear();
Response.End();
}

}
************ PRequest.aspx****************
protected void Page_Load(object sender, EventArgs e)
{

if (!IsPostBack)
{

DataTable dtresult = new DataTable();
DBLayer objdblayer = new DBLayer();

dtresult = objdblayer.getRSetSQL("Select PresenterName,PresenterAddress,InfavorOf,ExecutedBy from USERS..Presenter_Info where 1=2", DBLayer.SqlType.SqlQuery);
GridView1.DataSource = dtresult;
GridView1.DataBind();
dtresult.Rows.Add();
ds.Tables.Add(dtresult);
// AddToGrid.Attributes.Add("OnClick", "FetchDGContents()");


}

}

protected void AddToGrid_Click(object sender, EventArgs e)
{

string chString=TxtPName.Text+","+TxtPAdd.Text+","+TxtInf.Text+","+TxtExBy.Text;
AddToGrid.Attributes.Add("OnClick", "FetchDGContents(" + chString + ")");


}
**************************Design******************************

TxtPName TxtPAdd TxtInf TxtExBy (TextBox Fill By User)

ADDBUTTON (after Fill the TextBox When User click on Add Button the txt Value go to Grid and TxtBox will Blank
Notes: on AddButton Its Create One Blank Rows and then add That value to that row)

GRIDView

****************************************************************
When User Click On GridView Row The Seleted Row Value will Display on TextValue (Now i work on it but not yet done)
Questionproblem related to print Pin
Arun k. yadav25-Nov-09 17:20
Arun k. yadav25-Nov-09 17:20 
QuestionHow to handel Session Timeout Pin
Elena200625-Nov-09 15:40
Elena200625-Nov-09 15:40 
AnswerRe: How to handel Session Timeout Pin
Abhijit Jana25-Nov-09 16:10
professionalAbhijit Jana25-Nov-09 16:10 
AnswerRe: How to handel Session Timeout Pin
sashidhar25-Nov-09 22:00
sashidhar25-Nov-09 22:00 
AnswerRe: How to handel Session Timeout Pin
Gamzun25-Nov-09 22:18
Gamzun25-Nov-09 22:18 
Questiongrid view [modified] Pin
Ramkumar_S25-Nov-09 14:53
Ramkumar_S25-Nov-09 14:53 
AnswerRe: grid view Pin
N a v a n e e t h25-Nov-09 14:59
N a v a n e e t h25-Nov-09 14:59 
AnswerRe: grid view Pin
sashidhar25-Nov-09 16:50
sashidhar25-Nov-09 16:50 
GeneralUser Control property not being set. Pin
Brady Kelly25-Nov-09 4:26
Brady Kelly25-Nov-09 4:26 
GeneralRe: User Control property not being set. Pin
Christian Graus25-Nov-09 6:01
protectorChristian Graus25-Nov-09 6:01 
GeneralRe: User Control property not being set. Pin
Abhishek Sur25-Nov-09 8:13
professionalAbhishek Sur25-Nov-09 8:13 
QuestionUpdating Control outside Update pannel Pin
Milind R Chavan25-Nov-09 4:11
Milind R Chavan25-Nov-09 4:11 
AnswerRe: Updating Control outside Update pannel Pin
Christian Graus25-Nov-09 6:02
protectorChristian Graus25-Nov-09 6:02 
AnswerRe: Updating Control outside Update pannel Pin
Abhishek Sur25-Nov-09 8:23
professionalAbhishek Sur25-Nov-09 8:23 
AnswerRe: Updating Control outside Update pannel Pin
Nishant Singh25-Nov-09 19:41
Nishant Singh25-Nov-09 19:41 
QuestionSetting active link bold in html Pin
shankbond25-Nov-09 2:34
shankbond25-Nov-09 2:34 
AnswerRe: Setting active link bold in html Pin
Abhishek Sur25-Nov-09 3:44
professionalAbhishek Sur25-Nov-09 3:44 

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.