Urgent Help! How to get data from child's gridview to parent's textbox #2

 Hello Sir,

Would you please advise me, how can I get the data from child gridview to parent textbox?

For example, I have select 2 row in child's datagrid the values are "A" and "B" then click add and "A B" appears in the parent's textbox.

 I think this must use JavaScript to make this happen but I have no idea, please help!

Thanks in advance!

0
Novox
11/22/2008 3:50:14 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

21 Replies
1012 Views

Similar Articles

[PageSpeed] 16

 parent page :

 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input id="Button1" type="button" value="page2" onclick="javascript:window.open('page2.aspx');" />
</div>
</form>
</body>
</html>
 
  

 child page :

 

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function Clicked(ID)
{
window.opener.document.getElementById('TextBox1').value+=' ' +ID;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" />
<asp:BoundField DataField="Col1" HeaderText="Name" SortExpression="Col1" />
<asp:BoundField DataField="Col2" HeaderText="Password" SortExpression="Col2" />
<asp:BoundField DataField="Col3" HeaderText="RoleID" SortExpression="Col3" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BaseConnectionString %>"
SelectCommand="SELECT * FROM [Table1]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>

 

child page's code-behind :

 

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Text = "<input type='button' value=\"add\" onclick=\"Clicked('" + e.Row.Cells[0].Text + "')\"/>";
}
}

 This will solve your issue.

Feel free to post back if you have any furthur queries


Regards,
Muhammed Saleem P

---------------------------------------------
Please do not forget to click "Mark As Answer" on the posts that helped you.

Happy Programming !!!

0
muhammedsalimp
11/22/2008 6:48:13 PM

 Not works, when I click internet explorer said "window.opener.document.getElementById(...) is null or not an object.

 Here I have attach my sourcecode.

 

child code behind

    protected void Page_Load(object sender, EventArgs e)
{
getGroup();
}

protected void getGroup()
{
GroupInfoBLL GroupInfo = new GroupInfoBLL();

gridGroup.DataSource = GroupInfo.GetGroup();
gridGroup.DataBind();
}
protected void gridGroup_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Text = "&lt;input type='button' value=\"Add\" onclick=\"Clicked('" + e.Row.Cells[0].Text + "')\"/>";
}
}

  

child aspx

 "text/javascript"> function Clicked(Group_ID) { window.opener.document.getElementById('txtReceiver').value+=' ' + Group_ID; } "form1" runat="server">



"gridGroup" runat="server" CellPadding="4" ForeColor="#333333"
GridLines="None"
style="font-family: Tahoma; font-size: 10pt; text-align: center"
AutoGenerateColumns="False" onrowdatabound="gridGroup_RowDataBound">
"#EFF3FB" />
"#507CD1" Font-Bold="True" ForeColor="White" />
"#2461BF" ForeColor="White" HorizontalAlign="Center" />
"#D1DDF1" Font-Bold="True" ForeColor="#333333" />
"#507CD1" Font-Bold="True" ForeColor="White" />
"#2461BF" />
"White" />

"Group_ID" HeaderText="Group ID" InsertVisible="False" ReadOnly="True" SortExpression="Group_ID" />
"Group_Name" HeaderText="Group Name" SortExpression="Group_Name" />
"Semester" HeaderText="Semester" SortExpression="Semester" />
"Year" HeaderText="Year" SortExpression="Year" />


 
 
 
 
 
Parent aspx ( int parent page I can't create more <form> and I have used a masterpage, so this is the problem?)
<%@ Page Title="" Language="C#" MasterPageFile="~/Modules/SMSMasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Modules_MessageSending_Default" %>
<%@ Register TagPrefix="csc" Namespace="CustomServerControls" %>

<%@ Register assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>

"Content1" ContentPlaceHolderID="head" Runat="Server">
"text/css"> .style1 { font-family: Tahoma; font-size: 10pt; text-align: right; } .style4 { background-color: #507CD1; } .style5 { font-family: Tahoma; font-size: 10pt; font-weight: bold; text-align: left; color: #FFFFFF; background-color: #507CD1; }

"Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

"javascript" type="text/javascript"> function countDisplay() { var lbl = document.getElementById('<%=lblTxtLeft.ClientID%>'); var tb = document.getElementById('<%=TextArea.ClientID%>'); var max = tb.getAttribute("maxlength"); if (tb.value.length > max) { tb.value = tb.value.substring(0, max); } else { lbl.innerText = max - tb.value.length + " characters left"; } } window.onload = countDisplay; function OpenWindow() { var winl = (screen.width - 900) / 2; var wint = (screen.height - 700) / 2; window.open("AddMember.aspx", "mywindow", "menubar=0,resizable=0," + "width=900,height=700,toolbars=0,scrollbars=1,left=" + winl + ",top=" + wint + ""); } function RefreshPage() { window.document.getElementById("RebindFlagSpan").firstChild.Value = "1"; window.document.forms(0).submit(); }


"width: 45%;">
class="style5">
Receiver Info.
class="style4">
 
class="style1">
Receiver:

"txtReceiver" runat="server" style="font-family: Tahoma"
Width="256px" MaxLength="999999">
 "btnAdd" runat="server" style="font-family: Tahoma"
Text="Add list" />


"receiverMode" ID="radioSingle" runat="server"
Checked="True" style="font-family: Tahoma; font-size: 10pt" Text="Single"
value="Single" AutoPostBack="True"/>
"receiverMode" ID="radioGroup" runat="server"
style="font-family: Tahoma; font-size: 10pt" Text="Group" value="Group"
AutoPostBack="True"/>
class="style5">
Message Details
class="style4">
 
class="style1">
Template :

"ddlTemplate" runat="server" Width="256px"
style="font-family: Tahoma" AutoPostBack="True"
onselectedindexchanged="ddlTemplate_SelectedIndexChanged">

class="style1">
Subject :

"txtSubject" runat="server" style="font-family: Tahoma"
Width="256px">
class="style1">
Body :

"TextArea" runat="server" MaxLength="160" Width="256px"
Height="141px">


"lblTxtLeft" runat="server"
style="font-family: Tahoma; font-size: 10pt">
class="style1">
Ordered By :

"ddlOrder" runat="server" style="font-family: Tahoma"
Width="256px">

class="style1">
Sending Method :

"sendMethod" ID="radioSMS" runat="server"
style="font-family: Tahoma; font-size: 10pt" Text="SMS" value="SMS"/>
"sendMethod" ID="radioEmail" runat="server"
style="font-family: Tahoma; font-size: 10pt" Text="Email" value="Email"/>
"sendMethod" ID="radioBoth" runat="server"
style="font-family: Tahoma; font-size: 10pt" Text="Both" value="Both" Checked="true"/>



"lblConnection" runat="server"
style="font-family: Tahoma; font-size: 10pt">




"btnSend" runat="server" style="font-family: Tahoma"
Text="Send" onclick="btnSend_Click" />
"Button1" runat="server" onclick="Button1_Click" Text="Split" />


"Button2" type="button" value="Add Group" onclick="javascript:window.open('AddGroup.aspx');" />
"gridStudent" runat="server" CellPadding="4" ForeColor="#333333"
GridLines="None" style="font-family: Tahoma; font-size: 10pt"
DataKeyNames="Std_ID,Std_MobileNo">
"#EFF3FB" />
"#507CD1" Font-Bold="True" ForeColor="White" />
"#2461BF" ForeColor="White" HorizontalAlign="Center" />
"#D1DDF1" Font-Bold="True" ForeColor="#333333" />
"#507CD1" Font-Bold="True" ForeColor="White" />
"#2461BF" />
"White" />



"RebindFlagSpan">
"RebindFlagHiddenField" runat="server" Value="0" />






  

  
0
Novox
11/25/2008 8:46:33 AM

  hi

Do a small change in above code.

In parent page create a function that accept new value to set to textbox and in child page call that function by passing new textvalue like 

 

parent page :

 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">

function SetVal(newValue)
{
document.getElementById('TextBox1').value+=' ' +newValue;
}
</script>

</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<input id="Button1" type="button" value="page2" onclick="javascript:window.open('page2.aspx');" />
</div>
</form>
</body>
</html>
 
  

 child page :

 

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
    function Clicked(ID)
{
window.opener.SetVal(ID);
}

</script>

</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" />
<asp:BoundField DataField="Col1" HeaderText="Name" SortExpression="Col1" />
<asp:BoundField DataField="Col2" HeaderText="Password" SortExpression="Col2" />
<asp:BoundField DataField="Col3" HeaderText="RoleID" SortExpression="Col3" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BaseConnectionString %>"
SelectCommand="SELECT * FROM [Table1]"></asp:SqlDataSource>
</div>
</form>
</body>
</html>

 


Shashikant Maurya
0
shashiupc25
11/25/2008 9:02:07 AM

Still get the same error but on the parent page.

 Thanks for your help! any idea?

0
Novox
11/25/2008 9:08:53 AM

I got it! change

function SetVal(newValue) {document.getElementById('txtReceiver').value += ' ' + newValue;

}

 

to

 

function SetVal(newValue) {

document.getElementById('<%=txtReceiver.ClientID%>').value += ' ' + newValue;

}

0
Novox
11/25/2008 9:14:25 AM

 This is beacause id of text box can vary on client page if your control is within another content place holder or any other controle other than page is parent to the text box.


Shashikant Maurya
0
shashiupc25
11/25/2008 10:02:50 AM

 Another one question please. According to the above schema. How about the multiple selected gridview instead of using button?

 Here is my code...

 

 

    protected void btnAdd_Click(object sender, EventArgs e)
{
foreach (GridViewRow row in gridStudent.Rows)
{
CheckBox cb = (CheckBox)row.FindControl("chkSelect");
if (cb != null && cb.Checked)
{

blank

}
}

}

  

What is I need to fill it in the blank? How to write the statement that call javascript to passing all data that I have checked in to that textbox?

 How can I write code to call function Clicked() on the aspx page in codebehind??

 

 

Thanks again!

0
Novox
11/25/2008 10:10:34 AM

Modify the Clicked() function so that it accepts an array as input.

Also on button click, add all the selected  values into an array and pass it to that function.


Regards,
Muhammed Saleem P

---------------------------------------------
Please do not forget to click "Mark As Answer" on the posts that helped you.

Happy Programming !!!

0
muhammedsalimp
11/25/2008 10:32:59 AM

 Would you please kindly give me some simple example? because I'm new with ASP.NET.

 

Thanks in advance!

0
Novox
11/25/2008 10:52:41 AM

 

 You shold bind value property of checkbox to desire field of data source and on page behind page add code like this

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
           CheckBox chk=(CheckBox)e.Row.FindControl("CheckboxId");
          chk.Attributes.Add("onclick","Clicked('"+chk.ClientId+"')");

}
}
 Also you should modify Clicked function like this
function Clicked(Id)
{
var obj=document.getElementById(Id);
window.opener.SetVal(obj.value); 
} 

Shashikant Maurya
0
shashiupc25
11/25/2008 11:09:24 AM

 Thanks your code works but only one problem.. It get the value "on" from selected checkbox. How can I retrive the data from column name in gridview?

 

Thanks again!!

0
Novox
11/25/2008 12:05:25 PM

 in this line,

 
  chk.Attributes.Add("onclick","Clicked('"+chk.ClientId+"')");

 
change  'chk.ClientId' with the value you want to pass.
eg :-   
chk.Attributes.Add("onclick","Clicked('"+e.Row.Cells[0].Text+"')");
 

Regards,
Muhammed Saleem P

---------------------------------------------
Please do not forget to click "Mark As Answer" on the posts that helped you.

Happy Programming !!!

0
muhammedsalimp
11/25/2008 12:32:08 PM

Hi,

I have used your code but no value passed. I have used TemplateField in gridview not BoundField, so this is may be an issue?

Another one question, how can I make an event handler on button? In this method when click at checkbox it automatically added into textbox. How can I check, click add button then add to the textbox?

Thanksss

 

EDIT:: Tried to use BoundField but not working

0
Novox
11/25/2008 12:44:01 PM

Somebody help please..

 I'm stuck with this.. If I can pass the selected row (eg., only column Std_ID) in checkbox from child page to textbox in parent page then I can do more in my project.

 Please help!!

0
Novox
11/25/2008 2:32:07 PM

 Here code, The problem is no data passed in Clicked(e.Row.Cells[3].Text) but if using Clicked(chk.ClientID) only "on" value is passed

Child aspx page

 

 function Clicked(Id) {

var obj = document.getElementById(Id);
window.opener.SetVal(obj.value);

}
   
        <asp:GridView ID="gridStudent" runat="server" CellPadding="4" 
ForeColor="#333333" GridLines="None"
Style="font-family: Tahoma; font-size: 10pt" AutoGenerateColumns="False"
DataKeyNames="Std_ID, Std_MobileNo"
onrowdatabound="gridStudent_RowDataBound">
<RowStyle BackColor="#EFF3FB" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" />
</ItemTemplate>
<HeaderTemplate>
<input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" runat="server" type="checkbox" />
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ID">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_ID")) %>
</ItemTemplate>

</asp:TemplateField>
<asp:TemplateField HeaderText="First Name">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_FName")) %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Last Name">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_LName")) %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mobile No.">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_MobileNo")) %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Email">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_Email")) %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
 
 
 Here is child codebehind

 
    protected void gridStudent_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
CheckBox chk = (CheckBox)e.Row.FindControl("chkSelect");
chk.Attributes.Add("onclick", "Clicked('" + e.Row.Cells[3].Text + "')");
}
}
 

Here is parent aspx
 
    function SetVal(newValue) {
document.getElementById('<%=txtReceiver.ClientID%>').value += newValue + ";";
}
                 "txtReceiver" runat="server" style="font-family: Tahoma" 
Width="256px">  

 
Please help, can't do more if I can't solve this problem...

 

Thanks in advance!

0
Novox
11/25/2008 4:25:30 PM

 I'm stuck T_T. Somebody helps me pleaseee.

0
Novox
11/26/2008 1:16:35 AM

 Anybody please help me solve this problem. I'm trying hard to find out but unlucky because I'm new in ASP.NET.. I don't know how to do.

 

Anyone please save my life...

 

Many many thanks!!

0
Novox
11/26/2008 5:01:13 AM

 make a small change and your application will be up and running.

Child aspx page 

 

 function Clicked(Id) 
{
window.opener.SetVal(Id);
}



<asp:GridView ID="gridStudent" runat="server" CellPadding="4"
ForeColor="#333333" GridLines="None"
Style="font-family: Tahoma; font-size: 10pt" AutoGenerateColumns="False"
DataKeyNames="Std_ID, Std_MobileNo"
onrowdatabound="gridStudent_RowDataBound">
<RowStyle BackColor="#EFF3FB" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" />
</ItemTemplate>
<HeaderTemplate>
<input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" runat="server" type="checkbox" />
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ID">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_ID")) %>
</ItemTemplate>

</asp:TemplateField>
<asp:TemplateField HeaderText="First Name">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_FName")) %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Last Name">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_LName")) %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mobile No.">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_MobileNo")) %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Email">
<ItemTemplate>
<%#Convert.ToString(DataBinder.Eval(Container.DataItem,"Std_Email")) %>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
  

 Here is child codebehind

 

 

 protected void gridStudent_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
CheckBox chk = (CheckBox)e.Row.FindControl("chkSelect");
chk.Attributes.Add("onclick", "Clicked('" + ((System.Data.DataRowView)(e.Row.DataItem)).Row.ItemArray[3] + "')");
}
}

  

Here is parent aspx

 

 

    function SetVal(newValue) 
{
document.getElementById('<%=txtReceiver.ClientID%>').value += newValue + ";";
}

"txtReceiver" runat="server" style="font-family: Tahoma"
Width="256px">
  
Regards,
Muhammed Saleem P

---------------------------------------------
Please do not forget to click "Mark As Answer" on the posts that helped you.

Happy Programming !!!

0
muhammedsalimp
11/26/2008 6:29:14 AM

Thank god! You help me solve this terrible problem!!! but how about if I uncheck the checkbox and then it remove that unchecked item in textbox??

Only one last question for the fully complete of my website.

Thank you very much and many thanks for your patient!

Yasagalloh!!

0
Novox
11/26/2008 6:48:30 AM

 Make these changes for your requirement:

Child aspx page  

 

 function Clicked(Id,chk) 
{
var chk=document.getElementById(chk);
if(chk.checked)
{
window.opener.SetVal(Id,'add');
}
else
{
window.opener.SetVal(Id,'remove');
}
}


  

child codebehind

  

            chk.Attributes.Add("onclick", "Clicked('" + ((System.Data.DataRowView)(e.Row.DataItem)).Row.ItemArray[1]+"','"+chk.ClientID+ "')");            

 

parent aspx

 

 

 function SetVal(Id,action) 
{
if(action=='add')
{
document.getElementById('<%=txtReceiver.ClientID%>').value += Id + ";";
}
else
{
var str1=document.getElementById('<%=txtReceiver.ClientID%>').value;
var str2=Id+";";
var str3=str1.replace(str2,'');
document.getElementById('<%=txtReceiver.ClientID%>').value=str3;
}
}

  

All the best for your website.

Also please do not forget to mark the posts that helped you as Answer for the sake of whole community.


Regards,
Muhammed Saleem P

---------------------------------------------
Please do not forget to click "Mark As Answer" on the posts that helped you.

Happy Programming !!!

0
muhammedsalimp
11/26/2008 7:45:20 AM

Many thankssss to you Muhammed Saleem!!!

Thank you for your kindly help me!!

Thanks again!!

0
Novox
11/26/2008 7:55:24 AM
Reply:

Similar Artilces:

Urgent Help! How to get data from child's gridview to parent's textbox
 Hello Sir,Would you please advise me, how can I get the data from child gridview to parent textbox.For example, I have select 2 row in child's datagrid the values are "A" and "B" then click add and "A B" appears in the same parent's textbox. Thanks in advance!   Anyone please help me. How to get the data from gridview on popup page to textbox on the main page. Thank you so much!!!! Hi Novox , Please check my sample :   <asp:GridView ID="GridView1" runat="server" Height="227px" Width...

Replace 1's and 0's in a gridview column with Yes's and No's
Is it possible to change the display of a column in a gridview to show a Yes for all 1's and a No for 0's that display in a particular column of a gridview bound to a database?  If so, can someone share the way with me?  I am using ASP.NET 2.0 with VB Code Behind.  Thanks One way you can do is thrrough  CASE in your select statement: Select YesNoColumn= CASE yourColumn WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' ELSE '' END FROM YourtableLimno <Columns>     <asp:TemplateField HeaderText="yourHeader" SortExpression="yourDataField"> ...

Help! I cannot access the DataGrid's ItemTemplate's LinkButton's Text Atrribute 's Value!!!!!!!!!!!
I write a datagrid's ItemDataBound method as follows:   private void dgTable_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)  {   if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)   {    if(!isRole("Manager"))    {     LinkButton tmp = (LinkButton)e.Item.FindControl("lbPassed");     if(tmp.Text == "Passed")     {      ((LinkBu...

obtain ANY control's (textbox/dropdown) value in GridView's HeaderTemplate
Given this templated GridView column containing either Textbox's or DropDownLists......          <asp:TemplateField >              <HeaderTemplate>                      <asp:TextBox ID="TextBoxWellName" runat="server"  Visible="False" l"></asp:TextBox>           &nb...

Ajaxmodalpopup TextBox's --> TEXT--> GridView's TextBox
  Hi I have A Problem With my javascript,   ERROR: 'txtbox1' is undefine in javascript What i want to achieve: I have 1 textbox in my Gridview and i have Modalpopup, i want to transfer data from modalpopup to Gridview's Textbox like User will enter Text into modalpopup's Textbox and Text should go to Gridview's Textbox  for that i have below code:  CODE BEHIND:  For Each gvr As GridViewRow In GridView2.Rows 'Get a programmatic reference to the CheckBox control 'Dim cb As CheckBox = CType(gvr.FindControl("chkBox1"), Ch...

TabContainer's height doesn't respecting child GridView's height
Well, it's not that complex:I have a TabContainer with 4 tabs. In the first 2 I have different GridViews, but I'm actually only working with the first one.There's no UpdatePanel, no crazy situations, it's a simple GridView with an associated ObjectDataSource, wich will DataBind the GridView in every PostBack (yes, normal, simple, server-side PostBack) based on the value of a TextBox. And this value is only changed on the click of a ImageButton. All of this happens on the Server side.BUT, in the initial load of the page, the GridView is empty, as is the TabPanel. After the fir...

How can I get out of my Mozilla's browser the Winamp browser and get back the Google's or Mozilla's browser.
Please I have got to my browser ( I don't know how.) the Winamp browser he behave like virus stick in.But he doesn't has uninstalation section so I can't do anything to get him away from Mozilla's file. I'm not happy of Winamp's behave its like advertisement against a customer's will. Please is there any way to get him away from Mozilla?Please send me exact direction I have tried many ways but he is deeply inside the systeme so when I install new Mozilla he is always here ready to pester me. Thank you for an answer. Richard ...

The value's length for key 'data source' exceeds it's limit of '128'.
Hii, When I tried to bind dropdownlist to database by declaring connection string in the code behind file I am getting this error: The value's length for key 'data source' exceeds it's limit of '128'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: The value's length for key 'data source' exceeds it's limit of '128'.Source Error: An...

what's the best way to save data if it's 2 webforms/pages data?
I am working on the web application for recruiting, I split the application for employment into 2 web forms.  After user compeleted the first web form, he has to click "continue" to go to 2nd page and fill out the application, then click "Submit" to save data and send out application by fax. The question is : what is the appropriate way to save data?  when user click "continue" on first page, should I save it on this stage or what should I do?  because I am thinking that if user didn't submit the form but just exit the page, then how can I roll back all the data that I just s...

superreview granted: [Bug 408749] "ASSERTION: A block's child' s next in flow's parent must be a block" with -moz-column, table stuff : [ Attachment 293607] fix assert
Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> has granted Robert O'Callahan (:roc) <roc@ocallahan.org>'s request for superreview: Bug 408749: "ASSERTION: A block's child's next in flow's parent must be a block" with -moz-column, table stuff https://bugzilla.mozilla.org/show_bug.cgi?id=408749 Attachment 293607: fix assert https://bugzilla.mozilla.org/attachment.cgi?id=293607&action=edit ------- Additional Comments from Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> Looks good. That said, s...

superreview requested: [Bug 408749] "ASSERTION: A block's child' s next in flow's parent must be a block" with -moz-column, table stuff : [ Attachment 293607] fix assert
Robert O'Callahan (:roc) <roc@ocallahan.org> has asked Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> for superreview: Bug 408749: "ASSERTION: A block's child's next in flow's parent must be a block" with -moz-column, table stuff https://bugzilla.mozilla.org/show_bug.cgi?id=408749 Attachment 293607: fix assert https://bugzilla.mozilla.org/attachment.cgi?id=293607&action=edit ------- Additional Comments from Robert O'Callahan (:roc) <roc@ocallahan.org> This patch creates nsBlockFrame* nsLayoutUtils::GetAsBlock wh...

superreview requested: [Bug 408749] "ASSERTION: A block's child' s next in flow's parent must be a block" with -moz-column, table stuff : [ Attachment 293637] reflow captions with unconstrained height
Robert O'Callahan (:roc) <roc@ocallahan.org> has asked Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> for superreview: Bug 408749: "ASSERTION: A block's child's next in flow's parent must be a block" with -moz-column, table stuff https://bugzilla.mozilla.org/show_bug.cgi?id=408749 Attachment 293637: reflow captions with unconstrained height https://bugzilla.mozilla.org/attachment.cgi?id=293637&action=edit ------- Additional Comments from Robert O'Callahan (:roc) <roc@ocallahan.org> Fixes the assertion independen...

superreview granted: [Bug 408749] "ASSERTION: A block's child' s next in flow's parent must be a block" with -moz-column, table stuff : [ Attachment 293637] reflow captions with unconstrained height
Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> has granted Robert O'Callahan (:roc) <roc@ocallahan.org>'s request for superreview: Bug 408749: "ASSERTION: A block's child's next in flow's parent must be a block" with -moz-column, table stuff https://bugzilla.mozilla.org/show_bug.cgi?id=408749 Attachment 293637: reflow captions with unconstrained height https://bugzilla.mozilla.org/attachment.cgi?id=293637&action=edit ...

It's Linux !? No, it's BSD ! No, no, it's...
kFreeBSD http://wiki.debian.org/Debian_GNU/kFreeBSD a Debian distro using the FreeBSD kernel ! ObiWan wrote: > kFreeBSD > > http://wiki.debian.org/Debian_GNU/kFreeBSD > > a Debian distro using the FreeBSD kernel ! Why use a BSD kernel? I hope the reason is more than, just because they can. http://wiki.debian.org/Debian_GNU/kFreeBSD_why It's easy to understand why the would want to use Debian packages. :) -- Jimmy Johnson Registered Linux User #380263 >> kFreeBSD >> >> http://wiki.debian.org/Debian_GNU/kFreeBSD >> ...

Web resources about - Urgent Help! How to get data from child's gridview to parent's textbox #2 - asp.net.presentation-controls

Resources last updated: 12/30/2015 4:47:11 PM