3.2.0

how to get values in a datagrid when checkbox is checked

I'm having parent page that contains two texbox and img button ,when user clicks it calls child window in child window there is a datagrid
this is my child window code

function funUnchk(current)
{

var strChkIds = eval('document.getElementsByTagName("INPUT");');
var strChkIdsLen = strChkIds.length;
for (i=0; i<strChkIdsLen; i++)
{
if (strChkIds[i].getAttribute("type").toLowerCase() == "checkbox")
{
if(event.srcElement != strChkIds[i])
strChkIds[i].checked=false;
}
}

}

</script>
</HEAD>
<body onkeydown="SearchClientNumber();" leftMargin="0" topMargin="0" onload="ChangeOpenStatus()"
marginheight="0" marginwidth="0">
<form class="inline_form" id="frmClientFinder" name="frmClientFinder" action="" method="post"
runat="server">
<input id="hdnSearchStatus" type="hidden" value="0" name="hdnSearchStatus" runat="server">
<input id="hdnChangeTab" type="hidden" value="0" name="hdnChangeTab" runat="server">
<input id="hdnClientNo" type="hidden" value="0" name="hdnClientNo" runat="server">
<input id="hdnChkedClNos" type="hidden" value="0" name="hdnChkedClNos" runat="server">
<input id="hdnFormId" type="hidden" value="0" name="hdnFormId" runat="server"> <input id="hdnHiddenId" type="hidden" value="0" name="hdnTxtBoxId" runat="server">
<div id="right">
<div class="title">
<table class="tab_shell" cellSpacing="0" cellPadding="0" border="0">
<tr height="8">
<td vAlign="bottom" align="right">
<table class="tab_table" cellSpacing="0" cellPadding="0" border="0">
<tr height="8">
<td vAlign="bottom" align="right">
<table class="tab_table" cellSpacing="0" cellPadding="0" border="0">
<tr height="18">
<td class="tab_left_inactive" id="search_tab_left" onclick="enableTab(this.id, 'search_div', divs);"></td>
<td class="tab_center_inactive" id="search_tab" onclick="enableTab(this.id, 'search_div', divs);">Search</td>
<td class="tab_right_inactive" id="search_tab_right" onclick="enableTab(this.id, 'search_div', divs);"></td>
<td class="tab_left_inactive" id="results_tab_left" onclick="var srchStatus=document.getElementById('hdnChangeTab').value;if(srchStatus == 0){return false;};enableTab(this.id, 'results_div', divs);"></td>
<td class="tab_center_inactive" id="results_tab" onclick="enableTab(this.id, 'results_div', divs);">Search
Results</td>
<td class="tab_right_inactive" id="results_tab_right" onclick="var srchStatus=document.getElementById('hdnChangeTab').value;if(srchStatus == 0){return false;};enableTab(this.id, 'results_div', divs);"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="tab_bottom" colSpan="2"></td>
</tr>
</table>
</div>
<div class="display_true" id="search_div">
<table class="marquee" cellSpacing="0" cellPadding="0" border="0">
<tr>
<td class="column_pad" vAlign="top">
<div class="large_mod" id="fst">
<div class="mod_head" id="firsthead">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tbody>
<tr>
<td noWrap>
<h2 class="inline color_1">SEARCH</h2>
</td>
</tr>
</tbody></table>
</div>
<div class="color_1_1" id="firstdisplay"><cms1:validationsummary id="Validationsummary2" runat="server" CssClass="top_message validation" HeaderText="The form was not submitted due to the following errors. Please correct the errors and resubmit the form: "></cms1:validationsummary>
<table class="mod_content color_1_1 border_bottom" id="tblTeamMemberSearch" cellSpacing="0"
cellPadding="0" width="100%" border="0" runat="server">
<tr>
<td class="heading4right"><cms:label id="lblEClNo" Display="Editable" Runat="server">Client Number</cms:label></td>
<td><cms:textbox onkeypress="AllowNumberOnly()" id="txtClNo" CssClass="inputTextLarge" Display="Editable"
Runat="server" AutoPostBack="false" MaxLength="10"></cms:textbox></td>
<td class="heading4right"><cms:label id="lblClName" Display="Editable" Runat="server">Client Name</cms:label></td>
<td><cms:textbox onkeypress="AllowCharsOnly()" id="txtClName" CssClass="inputTextLarge" Display="Editable"
Runat="server" AutoPostBack="false" MaxLength="100"></cms:textbox><cms1:customvalidator id="cvClName" runat="server" Display="None" ErrorMessage="Client name should have a minimum of 3 characters."
ControlToValidate="txtClName" LabelControl="lblClName" ClientValidationFunction="fnTest"></cms1:customvalidator><cms1:optionalvalidator id="ovClient" runat="server" Display="None" ErrorMessage="Either one or both should be entered."
ControlToValidate="txtClNo" LabelControl="lblEClNo" Text="*" ConditionalControlsToValidate="txtClName"></cms1:optionalvalidator></td>
</tr>
</table>
<table class="mod_content color_1_1 border_bottom" id="Table2" cellSpacing="0" cellPadding="0"
width="100%" border="0" runat="server">
<tr>
<td align="right">
<table class="button_table" cellSpacing="0" cellPadding="0" border="0">
<tr>
<tr>
<td><cms:button class="button" id="btnSearch" Display="Editable" Runat="server" Text="Search" ButtonImageType="Search"></cms:button></td>
</tr>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</td></tr></table></div>
<div class="display_false" id="results_div">
<table class="marquee" cellSpacing="0" cellPadding="0" border="0">
<tbody>
<tr>
<td class="column_pad" vAlign="top">
<div class="large_mod" id="result">
<div class="mod_head" id="resulthead">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td noWrap width="20%">
<h2 class="color_2">SEARCH RESULTS</h2>
</td>
<td class="color_2 level2offset" align="right"><cms:label id="lblClientPolicyListPagingMsg" runat="server" Display="Editable"></cms:label><asp:linkbutton id="lnkFirstOne" title="Go to First Page" CssClass="mod_head_link color_3 level1offset level1indent"
Runat="server" CommandName="first" CausesValidation="false">|&lt;</asp:linkbutton><asp:linkbutton id="lnkPrevOne" title="Go to Previous Page" CssClass="mod_head_link color_3 level1offset level1indent"
Runat="server" CommandName="prev" CausesValidation="false">&lt;&lt;</asp:linkbutton><asp:linkbutton id="lnkNextOne" title="Go to Next Page" CssClass="mod_head_link color_3 level1offset level1indent"
Runat="server" CommandName="next" CausesValidation="false">&gt;&gt;</asp:linkbutton><asp:linkbutton id="lnkLastOne" title="Go to Last Page" CssClass="mod_head_link color_3 level1offset level1indent"
Runat="server" CommandName="last" CausesValidation="false">&gt;|</asp:linkbutton></td>
</tr>
</table>
</div>
<div class="color_2_1" id="resultdisplay">
<table class="space_below color_2_3 mod_column_head" id="mlabels" cellSpacing="0" width="100%"
border="0">
<colgroup>
<col width="15%"></col>
<col width="85%"></col>
</colgroup>
<tbody>
<tr>
<td>Select
</td>
<td id="ClientNumber" align="left" runat="server"><asp:linkbutton id="lnkClientNo" runat="server" CssClass="mod_column_head" CommandName="ClientNumber">Client Number - Client Name</asp:linkbutton></td>
</tr>
</tbody></table>
<div class="color_2_0" id="dvClList"><cms:panel id="pnlClFinderErrMsg" CssClass="top_message validation" Display="Editable" Runat="server"
visible="False">
<cms:label id="lblClientFinder" Runat="server" Display="Editable" Visible="False"></cms:label>
</cms:panel><asp:datagrid id="dgClientList" CssClass="mod_grid_content" Runat="server" AllowSorting="True"
AutoGenerateColumns="False" PagerStyle-Visible="false" Width="100%" ShowHeader="False" PageSize="5" AllowPaging="True">
<alternatingitemstyle cssclass="color_2_2"></alternatingitemstyle>
<itemstyle cssclass="color_2_1"></itemstyle>
<columns>
<asp:templatecolumn>
<itemtemplate>
<table id="tblclientfinder" cellpadding="0" cellspacing="0" border="0" class="mod_grid_content"
width="100%">
<colgroup>
<col width="15%"></col>
<col width="85%"></col>
</colgroup>
<tr>
<td><input onclick="funUnchk(this)" type="checkbox" id="clientId" runat="server" checked='false'
name="clientId"></td>
<td class="heading" align="left">
<cms:label id="lblClientNo" Display="Editable" Text='<%#DataBinder.Eval(Container.DataItem,"ClientNumber")%>' runat="server" />
<cms:label runat="server" ID="lblHyp" Display="Editable" Text="-" Runat="server"></cms:label>
<cms:label id="lblBusnPartNm" Display="Editable" Text='<%#DataBinder.Eval(Container.DataItem,"ClientName")%>' runat="server" />
<cms:label id="lblBusnPartId" Display="Editable" Visible ="False" Text='<%#DataBinder.Eval(Container.DataItem,"BusnPartId")%>' runat="server" />
<cms:label id="lblClnoAndName" Display="Editable" Visible ="False" Text='<%#DataBinder.Eval(Container.DataItem,"ClientNumber")%>'+','+'<%#DataBinder.Eval(Container.DataItem,"ClientName")%>' runat="server" />
</td>
</tr>
</table>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid></div>
<table class="mod_content color_2_1 border_bottom" cellSpacing="0" cellPadding="0" width="100%"
border="0">
<tr>
<td align="right">
<table class="button_table" cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><cms:button class="button" id="btnSubmit" Display="Editable" Runat="server" Text="Submit" ButtonImageType="Submit"></cms:button></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</div>

now i want when ever user clicks submit button i want to pass values to parent window which row is selected.
plz any one help me

regards
chit
chit
August 30,

This topic is archived.

See also:


Back to support forum