Click here to Skip to main content
15,925,723 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
XML
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="CNo"
 Width="100%" CellPadding="4" ForeColor="#333333" GridLines="Vertical"
 OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
 ><AlternatingRowStyle BackColor="White" /><Columns>
 <asp:BoundField DataField="CNo" HeaderText="CNo" ReadOnly="True"></asp:BoundField>
 <asp:BoundField DataField="Consigner" HeaderText="Consigner"></asp:BoundField>
 <asp:BoundField DataField="Consignee" HeaderText="Consignee"></asp:BoundField>
 <asp:BoundField DataField="RptDt" HeaderText="Date" DataFormatString="{0:MM/dd/yy}"></asp:BoundField>
 <asp:BoundField DataField="BiltyFrm" HeaderText="BiltyFrm"></asp:BoundField>
 <asp:BoundField DataField="BiltyTo" HeaderText="BiltyTo"></asp:BoundField>
 <asp:BoundField DataField="InvoiceNo" HeaderText="InvoiceNo"></asp:BoundField>
 <asp:BoundField DataField="NoOfPackages" HeaderText="NoOfPkg"></asp:BoundField>
 <asp:BoundField DataField="ChargedWt" HeaderText="ChargeWt"></asp:BoundField>
 <asp:BoundField DataField="RatePerKg" HeaderText="RtPerKg"></asp:BoundField>
 <asp:BoundField DataField="Total" HeaderText="TotalFright"></asp:BoundField>
 <asp:BoundField DataField="PayDetails" HeaderText="PayDetails"></asp:BoundField>
 <asp:BoundField DataField="PaidBy" HeaderText="PaidBy"></asp:BoundField>
 <asp:BoundField DataField="PaidAmt" HeaderText="PaidAmt"></asp:BoundField>
 <asp:BoundField DataField="PendingAmt" HeaderText="PendingAmt"></asp:BoundField>
<%-- <asp:BoundField DataField="PayeeName" HeaderText="PayeeName"></asp:BoundField>--%>
 <asp:TemplateField HeaderText="PayAmt">
 <ItemTemplate>
 <asp:TextBox ID="txtPayAmt" runat="server" ReadOnly="false" Width="100px"
             Onkeypress="return isNumberKey()" ></asp:TextBox>
  </ItemTemplate>
 </asp:TemplateField>
           <asp:TemplateField HeaderText="PayMode">
           <ItemTemplate>
           <asp:DropDownList ID="drpdwnPayMode" runat="server"
                         OnSelectedIndexChanged="drpdwnPayMode_SelectedIndexChanged" AutoPostBack="true">
                         <asp:ListItem>Select</asp:ListItem>
                         <asp:ListItem Value="Cash">Cash</asp:ListItem>
             <asp:ListItem Value="Check">Cheque</asp:ListItem></asp:DropDownList>
             </ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="CheckNo."><ItemTemplate>
             <asp:TextBox ID="txtCheckNo" runat="server" ReadOnly="false" Width="100px"
             Onkeypress="return isNumberKey()" Visible="false"></asp:TextBox></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="Payment"><ItemTemplate>
             <asp:CheckBox ID="chkPay" runat="server" OnCheckedChanged="chkPay_CheckChanged" Text="Pay"
                 AutoPostBack="true" /></ItemTemplate>
             </asp:TemplateField>
             <asp:TemplateField HeaderText="PayeeName">
             <ItemTemplate>
                 <asp:TextBox ID="txtPayeeName" runat="server" TextMode ="MultiLine" Text='<%# Bind("PayeeName") %>'>
             </asp:TextBox>

             </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField DataField="status" HeaderText="Status">
             </asp:BoundField>
             </Columns><EditRowStyle BackColor="#2461BF" />
             <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
             <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
             <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
             <RowStyle BackColor="#EFF3FB" /><SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
             </asp:GridView>
Posted
Updated 4-Aug-11 21:42pm
v2
Comments
Herman<T>.Instance 5-Aug-11 3:47am    
i go for nr 19

1 solution

What makes you think we know? You are more familiar on the system than we are. This is not a question that should be asked here in Q&A. Better ask your team mates regarding your concern.
 
Share this answer
 
Comments
Member 7979544 5-Aug-11 3:49am    
Please Sir,
No 1 here to tell me the correct answer
coding here
string str = "";
//loop through all grid rows 1 by 1....
for (int i = 0; i < GridView2.Rows.Count; i++)
{
CNo = GridView2.Rows[i].Cells[0].Text;
//Consigner = GridView2.Rows[i].Cells[1].Text;
//Consignee = GridView2.Rows[i].Cells[2].Text;
//Dt = GridView2.Rows[i].Cells[3].Text;
//BiltyFrm = GridView2.Rows[i].Cells[4].Text;
//BiltyTo = GridView2.Rows[i].Cells[5].Text;
//InvoiceNo = GridView2.Rows[i].Cells[6].Text;
//NoOfPackages = GridView2.Rows[i].Cells[7].Text;
//ChargedWt = GridView2.Rows[i].Cells[8].Text;
//RatePerKg = GridView2.Rows[i].Cells[9].Text;
//Total_frieght = GridView2.Rows[i].Cells[10].Text;
PaidAmt = GridView2.Rows[i].Cells[13].Text;
PendingAmt = GridView2.Rows[i].Cells[14].Text;
PayeeName = GridView2.Rows[i].Cells[20].Text;

//PayDetails = GridView2.Rows[i].Cells[14].Text;
//PaidBy = GridView2.Rows[i].Cells[15].Text;


//store status information......

Status = GridView2.Rows[i].Cells[20].Text;
walterhevedeich 5-Aug-11 3:57am    
No 1 here to tell me the correct answer
Is this a homework?
Member 7979544 5-Aug-11 4:00am    
No Sir.......

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900