|
|
Please somebody post reply to this. I am a new developer, and am searching for merging rows of particular column alone.
Thanks,
Sharmi
|
|
|
|
|
Merge column of table (data source).
you have select statement like
Select A, B, C from tableName
so modify it like
Select A = A+B, C from tableName
If you can't access select statement, then you have to modify datasource object prior setting to grid !
|
|
|
|
|
Sorry Let me clearly ask the question again. I am binding the data from stored procedure. I must not touch the SP now. I just need to write a code in rowbound function for merging. I find only the below code in all blogs. It is merging rows of all columns in grid, i need it for only 1 column.
for (int rowIndex = REGrid.Rows.Count - 2; rowIndex >= 0; rowIndex--)
{
GridViewRow gvRow = REGrid.Rows[rowIndex];
GridViewRow gvPreviousRow = REGrid.Rows[rowIndex + 1];
for (int cellCount = 0; cellCount < gvRow.Cells.Count; cellCount++)
{
if (gvRow.Cells[cellCount].Text == gvPreviousRow.Cells[cellCount].Text)
{
if (gvPreviousRow.Cells[cellCount].RowSpan < 2)
{
gvRow.Cells[cellCount].RowSpan = 2;
}
else
{
gvRow.Cells[cellCount].RowSpan = gvPreviousRow.Cells[cellCount].RowSpan + 1;
}
gvPreviousRow.Cells[cellCount].Visible = false;
}
}
}
This is the code. Could you please help me in this, how to re frame this loop for just 1 column. Lets assume for the first column in grid. thanks in advance
Thanks,
Sharmi
|
|
|
|
|
|
Hi , I already saw that link, It is merging all columns right. I need to merge just for 1 column. I dint get it properly,the code. If possible could u pls explain each line.
:confused:
Thanks,
Sharmi
|
|
|
|
|
so you should remove
for in your perevious code and on GridView1_RowDataBound event
try this code: as an example if you want to merge cells 2 of your grid
e.Row.Cells[2].ColumnSpan=2;
Help people is help yourself
|
|
|
|
|
Friends, Please help me with this as soon as possible. By monday i need to show a demo to my Manager. Kinldy do the needful
Thanks,
Sharmi
|
|
|
|
|
I got it done myself. It is working fine now.
Thanks,
Sharmi
|
|
|
|
|
Hi dear you can first add column to the datatable before adding to datasource acording to the datatype
|
|
|
|
|
Hello,
I have Mvc 3.0 functional web site but i need to add CMS into this for static pages. On Kooboo documentation, i saw adding new module to Kooboo site. But is there any way of adding kooboo(for static pages) into my existing mvc functional website ? This will be very helpful to me.
Thanks !
|
|
|
|
|
How to export few sets of data to excel in different worksheets under same book in c#?
I have tried using for loop to call the function which export to excel but it stop after open 1 excel book.
What should I do?
|
|
|
|
|
|
Thanks alot
|
|
|
|
|
You are welcome. Vote if it helped.
|
|
|
|
|
I am wondering what configuration settings(s) are incorrect in a C# 2010 setup and deployment project in the following two situations:
1. My goal is to recover some lost C# .net source code files by looking at the setup and deployment project.
Right now when I use decompiler software, I obtain only the *.cs files that are generated by the .net framework. I do not have any *.cs files that were written by people.
One of my options I have setup in my visual studio.net 2010 professional version is to debug code generated by the .net framework and code written by people. Would I need to change my debug options to 'just my code'?
2. I am wondering if I am looking for the wrong type of files and/or possibly looking in the wrong place for the files?
I am looking at the dll files in the bin directoy fo where the C# 2010 web form application has been deployed to.
Let me know if you have any answer(s) to my question(s).
Thanks!
modified 5-Jul-12 22:11pm.
|
|
|
|
|
You have posted a very similar question in the C# section as well.
It is always advisable not to crosspost.
|
|
|
|
|
sorry. I did not realize that was not a good isea. from now on, i will only post in one forum
|
|
|
|
|
In datalist i have to show the images... Before that i have to set background for every image.. how can i give background image in datalist..?
Example: http://www.csstemplateheaven.com/demo/classic_luxury_demo/gallery.html
In this they have used White backgroud image with some shadows for every image from the database.. Likewise i have to do it in datalist..
I have to set white backfround with some shadows for every images from database...
Please help to solve the above issue..!
aaryanvlb
|
|
|
|
|
I have got the solution using div tag.. Thank You...
|
|
|
|
|
I would like to know what a good open source (free) tool that I can use to compare C#.2010 web form code. Basically I want to compare code that is in a visual studio.net professional environment to the same some that is obtained from Jetbrains dotPeek decompiler tool.
I want to see if the source code I have is the same as the decompiled code.
Does visual studio.net 2010 professional edition have a code compare feature in it? (I am not using team server foundation.) If so, I do I access the code comparison feature in visual studio.net 2010 for web forms?
modified 3-Jul-12 17:19pm.
|
|
|
|
|
I'm just curious, what do you really want to do?
Do you have a DLL in the Bin Folder, and you need to inspect the code, or compare it to replacement code that you are writing to replace the DLL?
If so, do you have the source project to create the DLL?, or your not able to get or obtain the source project code.
|
|
|
|
|
The contract shop that wrote the application gave us a 'copy' of the production code. When we try to make any changes to that code the website has bad error messages. The production executables do not act this way.
Thus we are assuming that the contract shop gave us incorrect 'production' code. If we want to enhance the web application, we know that we can not start with that code base.
The bin directory has alot of dll files. I want to inspect that code and compare it with
the code we are told is the 'good' production code to see what the differences are.
|
|
|
|
|
File dates and version numbers are a good start.
The newer the file, the better the code.
Do you have any of the source projects to the DLL's?
Not that many programmers know how to write a server control compiled as a DLL, because they don't understand the page life-cycle. So what appears to work in development, bombs in actual production use.
In the asp.net website forum server controls, about 3/4 of the OPPs have no clue what there doing. The most common mistakes are classic asp programmers using response.write like it's a php program, to create html tags. The other is not creating html object in OnInit, and loading data in OnLoad.
If you have the source code to the DLL, or at least 1 DLL, post a server control page from it, the whole page, and let me check it out. A server control page should have a header that looks like this, or similar in c#
If the sample looks really bad, then it's a positive indicator that the code needs to be cleaned up, and reformatted, and will represent the quality of all the other code you purchased from the contractor.
Or post 1 page of the decompiled output at least. It will save you a lot of time and trouble, and others will be able to monitor the response, so that's its genuine.
<DefaultProperty("Text"), ToolboxData("<{0}:browser_File runat=server></{0}:browser_File>")> _
Public Class ckEditor_file_Browser
Inherits WebControl
|
|
|
|
|
The bad code I am referring to looks like the contract shop obtained the code from the following url:
<a href="http://www.asp.net/community/control-gallery/Item.aspx?i=69">
The code listed above is embedded in a C# 2010 web form application that uses 2010 master pages alot. There is no MasterPages.dll (assembly) on the server production server.
So could the 'old' master pages code I am referring hurt (interrupt) the regular master pages from working correctly?
|
|
|
|