15,891,423 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 AR547 (Top 44 by date)
AR547
6-Jun-14 4:02am
View
Almost done..but cannot generate new rows on next click. it is merging cells on each row now.
here is my code in RowDataBound:
protected void GV_Requests_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowState != DataControlRowState.Edit) // check for RowState
{
if (e.Row.RowType == DataControlRowType.DataRow) //check for RowType
{
//Loop through all the cells in the row
for (int j = 0; j < GV_Requests_Sys.Rows.Count+1; j++)
{
if (j % 2 !=0)
{
e.Row.Cells[0].Text = "Request<br/>Description";
e.Row.Cells[0].ColumnSpan = 2;
e.Row.Cells[1].ColumnSpan = 4;
for (int i =1; i < e.Row.Cells.Count - 1; i++)
{
Checking If current cell is same as next cell value
if (e.Row.Cells[i].Text == e.Row.Cells[i + 1].Text)
{
e.Row.Cells[i + 1].Visible = false;
}
}
}
}
}
}
}
AR547
6-Jun-14 4:02am
View
Almost done..but cannot generate new rows on next click. it is merging cells on each row now.
here is my code in RowDataBound:
protected void GV_Requests_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowState != DataControlRowState.Edit) // check for RowState
{
if (e.Row.RowType == DataControlRowType.DataRow) //check for RowType
{
//Loop through all the cells in the row
for (int j = 0; j < GV_Requests_Sys.Rows.Count+1; j++)
{
if (j % 2 !=0)
{
e.Row.Cells[0].Text = "Request<br/>Description";
e.Row.Cells[0].ColumnSpan = 2;
e.Row.Cells[1].ColumnSpan = 4;
for (int i =1; i < e.Row.Cells.Count - 1; i++)
{
Checking If current cell is same as next cell value
if (e.Row.Cells[i].Text == e.Row.Cells[i + 1].Text)
{
e.Row.Cells[i + 1].Visible = false;
}
}
}
}
}
}
}
AR547
6-Jun-14 2:34am
View
And how will I create a new row after data has been bound. Like Headers(1st row) and 2nd row created and now I need to create new row of Remarks and then I will check those cells with null values and will use your code here.
AR547
6-Jun-14 2:23am
View
Dear Friend,
This code will work if we have to compare the same values of cells. But data is coming from DataTable. The 3rd Row's first column's text is hard coded as Remarks and the 2nd column will have Random Text binded from textbox outside the gridview. The other 3rd 4th and 5th column should be merged.
AR547
6-Jun-14 2:19am
View
Rohan,
Got your point. But I am not comparing any cell having same values, actually I need to create a 3 row with 2 columns in which I have to bind data from a textbox outside the gridview. But I tried that trick of applying 1 in rowIndex in RowDataBound but it was creating extra duplicate rows of that 3rd row.
:(
AR547
7-May-14 7:19am
View
I need to export all my gridviews to single excel workbook with separate worksheets.
AR547
11-Feb-14 3:39am
View
Instead of this, is there any way to store the value of that textbox in a session through javascript on textchange or onkeyup() method like this. And then how will I retrieve that session value in code behind if I cannot get the value through Request.QueryString?
AR547
8-Jan-14 1:55am
View
Brother I cannot use runnat server in my aspx page and similarly cannot call the name of div in code behind.
But same like your answer... can we implement that condition in Javascript? I mean if I can get the value of inboxcount in Var in JS and then apply css to that ID..
Do you know how to do it in JS or any other solution in ASP?
AR547
20-Dec-13 3:53am
View
Brilliant... (y)
AR547
18-Dec-13 23:39pm
View
substring, replace, ltrim, rtrim they all can work in sql query to get the specific text/character from a string.
Just learned yesterday :D
AR547
18-Dec-13 23:38pm
View
(y) Good clue.. :)
AR547
18-Dec-13 13:13pm
View
awesome
AR547
9-Dec-13 3:11am
View
how can i send you its CS file?
if is it so then you can check the problems in it.
AR547
9-Dec-13 2:55am
View
And I have to add string value in that parameter..what will be its solution?
AR547
9-Dec-13 2:54am
View
how can I get the content. This is the main problem :(
AR547
9-Dec-13 2:32am
View
I have added my code here in the question as you said :)
AR547
8-Dec-13 23:30pm
View
Yeah I have but its just a simple html table created dynamically in code behind in which that data table data is being populated and that html table is in accordion.
Thanks.
AR547
6-Dec-13 5:05am
View
No..its HTML Table only in which Data is populated. and this table is created dynamically in code behind.
AR547
28-Nov-13 7:32am
View
peace peace peace :)
AR547
28-Nov-13 7:28am
View
yes...in the start of that question I have pasted my link in which I have elaborated the question. As it was issue of writing more lines or words in this blog..so splited that question into two parts
:)
AR547
17-Nov-13 2:40am
View
the best way is to handle it from clientside first...rather than creating it from DB...because if you are making an increment in DB then whatever the user can close the application when in process... :)
AR547
17-Nov-13 2:38am
View
do initialize your INT COMPANY_ID in your pageload event...
AR547
11-Nov-13 2:54am
View
and gen_table(loc, dept,fromdate,todate) is a method by which m getting the data in simple HTML tables.
AR547
11-Nov-13 2:53am
View
for (int i = 0; i < weeks; i++)
{
to = fr.AddDays(6);
if (to >= to_dt)
{
to = to_dt;
}
AccordionPane pane = new AccordionPane();
pane.HeaderContainer.Controls.Add(new LiteralControl("From " + fr.ToString("dd-MMM-yyyy") + " To " + to.ToString("dd-MMM-yyyy")));
pane.ContentContainer.Controls.Add(new LiteralControl(gen_table(loc, dept, fr.ToString("dd-MMM-yyyy"), to.ToString("dd-MMM-yyyy"))));
MyAccordion.Controls.Add(pane);
MyAccordion.SelectedIndex = i;
fr = to.AddDays(1);
}
AR547
28-Oct-13 7:51am
View
Checkbox is out of Gridview. you are right 1st row has A, 2nd B and 3rd C so the first 3 checkboxes should be disabled in the checkboxlist control.
AR547
22-Oct-13 1:32am
View
yes i have this issue..now what is the solution?
AR547
15-Oct-13 15:01pm
View
okay bro just found the answer for my question... thanks alot
AR547
15-Oct-13 12:26pm
View
thanks alot dear... that gave me a clue ;)
AR547
15-Oct-13 12:26pm
View
yeah ...
AR547
15-Oct-13 11:59am
View
ok bro got u...now inshort my question is that kindly tell me how can i declare those variables in heap mode at initial point as they are declared i dont want to declare like this... I think u understand my question :)
AR547
15-Oct-13 11:44am
View
can't get your point.. except the creation of enum in the class...is this a heap declaration which I can accept, ???
AR547
14-Oct-13 1:02am
View
Yeah created it in 3.5 :)
AR547
8-Oct-13 6:18am
View
tHANKS...
AR547
24-Sep-13 6:40am
View
Done !!... Actually I was seeking for one method only.... fileuploader in gridview is the requirement of our application as for each request generated in gridview the fileuploader should save its name regarding its task no....
AR547
20-Sep-13 0:09am
View
This is all for item templates. I have bound fields in my gridview and 2 item templates only. But its helpful tip. Thanks :)
AR547
18-Sep-13 4:33am
View
Can u explain this from above link...
foreach (DataColumn c in dt.Columns)
{
sb.AppendFormat("<th>{0}</th>", c.ColumnName);
}
AR547
18-Sep-13 3:44am
View
Thanks Alot dude...its working fine...but minor issue faced in case#4....so i created another method for it.... Thanks again ;)
AR547
18-Sep-13 2:26am
View
and what if I have to use these methods from another class file. Actually I dont want to show the SQL Queries in main class...it should contains only methods.
AR547
17-Sep-13 8:27am
View
Bro...............THANKSSSSSSSS ALOT....its working now...I have created another Update Panel on DropDownList...Working Perfect....Salute to your skills...Thanks again :)
AR547
17-Sep-13 8:22am
View
Sorry to mention... I have applied UPDATE PANEL from AJAX... so its not deleting the item at once..else it is working when another button fires a post back. Any idea on this issue? :(
AR547
17-Sep-13 8:14am
View
Dear Harshil_Raval
Your Code is working but only in row deleting in gridview... if I add Harshil_Raval from dropdownlist it doesnot delete that name from dropdownlist and after clicking again on add button while selectin Harshil_Raval it is adding the other names randomly to the gridview.
AR547
17-Sep-13 8:08am
View
Dear I have applied text filtering through AJAX. Kindly focus on question.
AR547
17-Sep-13 8:03am
View
If it was much easy then there must be a reason of posting that question here...
AR547
17-Sep-13 8:02am
View
Yeah there are number of employees in it. Question is that I want to delete the employee name from the dropdownlist when it is added to the gridview. So the user cannot add ROHAN twice or thrice.... similarly when deleting from gridview .. e.g if i delete ROHAN from Gridview then it should go back to the dropdownlist... hope you got my question.
Show More