15,908,661 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Amrut Bishnu (Top 15 by date)
Amrut Bishnu
10-Sep-15 1:57am
View
I have increased the execution time in both the servers. Still didn't work.
Amrut Bishnu
24-Aug-15 9:23am
View
Hi Sergey,
Thanks for the answer. But I know that I can update the asp.net dlls at any time. I just wanted to know that is there any way to stop the application then update the dlls and again restart the application,so that the ongoing transactions will not be affected by this.
Amrut Bishnu
20-Mar-15 9:24am
View
I found the problem. The problem was in the particular machine. I was due to some authorization problem. When I tried it in different machine it worked fine. Thanks a lot Peter for your valuable time.
Amrut Bishnu
3-Feb-15 8:10am
View
Thanks a lot everyone.
Amrut Bishnu
17-Apr-12 3:20am
View
Thanks a lot...
Amrut Bishnu
16-Apr-12 7:06am
View
Is anybody there????
Amrut Bishnu
16-Apr-12 6:16am
View
I'm stuck in the middle of a project.
Amrut Bishnu
16-Apr-12 6:16am
View
somebody help me please....
Amrut Bishnu
14-Apr-12 7:10am
View
OR...
Is there any way to access the clicked value of childgridview from parent gridview's event???
like row value of child gridview from parent gridview's Rows_Updating event???
Amrut Bishnu
14-Apr-12 7:05am
View
public partial class Repair_Information_mapping_Home : System.Web.UI.Page
{
public SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["WebConStr"].ToString());
protected void Page_Load(object sender, EventArgs e)
{
load_Grid1();
load_Model();
}
private void load_Grid1()
{
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select Site_Name from Master_Site_Details order by Site_Name", con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
con.Close();
}
private void load_Model()
{
int i = 0;
foreach (GridViewRow gvr in GridView1.Rows)
{
string s = gvr.Cells[0].Text.ToString();
SqlCommand cmd = new SqlCommand("select VDI_Model,count(VDI_Model) as No from Vehicle_Details_Information where Site_Locn='" + s + "' group by VDI_Model", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
//If ds.Tables.Count>0 then
if (ds.Tables[0].Rows.Count > 0)
{
GridView gvwnested = (GridView)GridView1.Rows[i].FindControl("GridView2");
gvwnested.DataSource = ds.Tables[0];
gvwnested.DataBind();
}
else
{
gvr.Cells[1].Text = "No Assets Present";
gvr.BackColor = System.Drawing.Color.DarkGray;
}
ds.Clear();
i = i + 1;
}
}
protected void GridView2_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = GridView1.Rows[0];
GridView gvwnested = (GridView)row.FindControl("GridView2");
//int index = GridView1.EditIndex;
//GridViewRow row = GridView1.Rows[index];
//GridView gvwnested = (GridView)row.FindControl("GridView2");
//GridView gvwnested = (GridView)GridView1.Rows[e.RowIndex].Cells[1].FindControl("GridView2");
string model = gvwnested.Rows[e.RowIndex].Cells[0].Text.ToString();
string site = GridView1.Rows[e.RowIndex].Cells[0].Text.ToString();
Response.Redirect("Webform2.aspx?Site=" + site + "Model=" + model);
}
}
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 100%">
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td colspan="4" align="center">
<asp:GridView ID="GridView1" runat="server" Width="100%"
AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" GridLines="None"
>
<footerstyle backcolor="#507CD1" font-bold="True" forecolor="White">
<rowstyle backcolor="#EFF3FB" horizontalalign="Left">
<columns>
<asp:BoundField HeaderText="Site" DataField="Site_Name" />
<asp:TemplateField>
<itemtemplate>
<asp:GridView ID="GridView2" runat="server" Width="100%" CaptionAlign="Left"
HorizontalAlign="Left" ShowHeader="False" AutoGenerateColumns="False" onrowupdating="GridView2_RowUpdating"
>
<rowstyle horizontalalign="Left">
<columns>
<asp:ButtonField CommandName="Update" DataTextField="VDI_Model" Text="Model"/>
<asp:BoundField DataField="No" />
Amrut Bishnu
14-Apr-12 6:52am
View
Nope dear...
ERROR:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Amrut Bishnu
14-Apr-12 6:40am
View
No..
it's:-
Object reference not set to an instance of an object.
In Gridview2_Row_Updating event:
GridView gvwnested = (GridView)GridView1.Rows[0].Cells[1].FindControl("GridView2");
string model = gvwnested.Rows[e.RowIndex].Cells[0].Text.ToString();
string site = GridView1.Rows[e.RowIndex].Cells[0].Text.ToString();
Response.Redirect("Webform2.aspx?Site=" + site + "Model=" + model);
Error is coming at the 2nd line when i assign a value of child gridview to 'model'
Amrut Bishnu
14-Apr-12 6:29am
View
Nope...
Its not working...
Amrut Bishnu
14-Apr-12 6:01am
View
I have placed child gridview in the 2nd column of every row of parent gridview.i.e. cell[1] of parent gridview.
Amrut Bishnu
14-Apr-12 5:33am
View
Plz give the code of gridview2_rowupdating() event...
I want to access the row of childgridview using childgridview _rowupdating() event...
Show More