how to split the content of one column in the objectdatasource into two parts and let them display in two columns in the GridView?

i combine the title and the body of one article and store it in one column in the database,but i want to show the title and body seperately in the GridView,how should i achieve this goal?thank you so much for your advice!!!

0
blik_bosyang
4/9/2009 5:34:27 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

2 Replies
852 Views

Similar Articles

[PageSpeed] 40

you can write the logic of splitting the column into two (title and body) in the query itself by which you are filling the datasource..


Thanx,
[KaushaL] || BloG || Profile || Microsoft MVP

"I would love to change the world, but they won’t give me the source code"


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and mark your thread as Resolved for the sake of Future Readers.
0
kaushalparik27
4/9/2009 8:24:08 AM

Since there is no an inherent sql function to split strings you could split in code behind the string and define the contents of each column. There however in the internet split function for sql.


Efthimis P Papanikolaou
0
epapas
4/9/2009 8:49:20 AM
Reply:

Similar Artilces:

Grouping two columns into one column with GridView
I would like to modify the default output of a gridview to group two columns into one column. This is probably best explained by example. So, lets say there is a simple gridview with the output something like this:Name           Description                           Date------------------------------------------------------------------Foo            Some description of foo     &nb...

Combine Two Different Columns into one column
Hi Guys,   I have twotables(Employee and Borrower). In Employee table have EMPID and Borrower table have BorrowerID. I want to comebine these two columns into one column as EMPID  in Employee table. Can  any one help? Thanks what is realtion between to tables ?   Use    Union Thanks for reply. Acutally Employee table EMPID, NAME Columns. in this Employee table had 12000 rows. Borrower table has BorrowerID,BType etc.. .Here Employee ID and BorrowerID both are same. This table has 16000 rows. Now my what i want to do is Come EMPID and BorrowerID and ...

-- Need to Display data in two GridView controls, but second one could not be displayed?
Dear all, I wrote a code segment to display data in two GridView controls one by one as below. The first one is displayed ok. But, the second one is not displayed. Did I miss anything?         ads.DataFile = "~/App_Data/color_match_live.mdb"                ads.SelectCommand = "SELECT COUNT(*) FROM [tech_mstr] WHERE [month] = ?"        ads.SelectParameters.Add("month", sel_month)        Di...

Merge two text columns into one text column
Hi Everyone.. I would like to know what is the best way to merge two text column into one test column in the table. Thanks pbj ANY HELP PLS.. Are you using any front end application or unix or just the isql to merge two text datatype columns? If you are using any front end application then it should not be a problem to merge the two text datatype columns. ...

two db table column, one datagrid column
Dear all, I have a db table which have two column, first name and last name. Can I show them in one datagrid column? Thanks Yes you may. Through the usage of the TemplateColumn, yes. An example of this: <code> <asp:DataGrid runat="server" ID="dgSomeGrid">     <Columns>         <asp:TemplateColumn>             <ItemTemplate>                 <%# DataBinder.Eval(Container.DataSource, "LastName") %&g...

column header to span two columns in a datagrid display
Is it possible for a column header to span two columns? If so how would this be done? Thanks In the ItemDataBound (or ItemCreated) check if Item is of type Header and if so - define the colspan property of the Cell object which you want to define the Colspan for and delete the next Cell from hte DataGridItem CheersBug [MCSD] Is it possible to span header column in design view only. using some kind of CSS. I'm using ASP,NET 3.5 and GridView...

display the sum of two datagrid columns into third column
hi... there..     i have a datagrid with columns named Price ,Quantity and total. now in the total column i  wanna display the prices which comes by multiplyiing the price and quantity (like  total=Price * quantity). I'm workin in asp.net +vb.net.                     may i knw hw can i do this.. plz write the code.. thanks.         Hi, do like this..suppose u have,        string ProductPrice = ...

SQL query to one column od database into two columns
Hi,I have a empskill Table which has 3 Columns (1) EmpID (2) SkillTypeID and (3) CourseID.Now  SkillTypeID column has data 1 or 2 .......in here 1 means Primary Skill and 2 means Secondary Skill. CourseID will reflect the ID's of subjects like c#,SQL,etc I need a Query which will count the number of primary skilled and number of secondary skilled persons based on subject and will display as followsCOURSE ID      SKILL TYPE  21                        222  &n...

Display multiple columns in Gridview from One Column of SQL table
Hi I have a table in sql with 2 columns and I want to display that in multiple columns in Gridview. SQL Table No.            Type 1               A1 1               B2 2              A2 2               B2 3        &...

displaying difference of two columns in repeater control
how to display the difference of two coulmns having float values in a repeater control? Hi,You can get the difference from sql query like : select (a-b) as result.Then you can bing the same column field in Repeater control. Always "Mark as Answer" the Post That Solves the problem.Because It helps others to find the solution. Mohammad Hussainhttp://mohdhussain.blogspot.com/ Hi,There is many way to do this... 1) Using foreach {} loop you go through each and every column and in that loop write business logic such that when wanted two column value get sum. Value of the cell is ret...

Is it possible to limit the items in a dataList control to two columns and two rows?
or with sql?   to have less columns select less field to have less row use the top function. I really suggest you do not use * to get all fields its longer and normally you do not need all tables fieldDo not forget to mark as answer all message who help you.Don't forget to check if you can answer some of our question to. sorted thanks...

Two views in one Multiview: display two togethere instead of one by one
I added two views in a Multiview control and using drop down list to select each view. After selecting second view, both views are showing up: second view is under first view. How to make only one view display? Are you using property MultiView.ActiveViewIndex to activate view?My last project - .NET Tip of The Day.org aspfun: I added two views in a Multiview control and using drop down list to select each view. After selecting second view, both views are showing up: second view is under first view. How to make only one view display? Use the following code to set t...

How to subtract two numeric columns(bound) of a Datagrid and display the result in the third column?
Hi Everyone,I  have two numeric columns(databound-coming from SQL database) in my datagrid, 'PromoPrice' & 'CostPrice'. I need to calculate 'PromoPrice- CostPrice' and display the result in the third datagrid column. i.e.: column2-column1 = column3Any help anyone...Many Thanks in advance,Nico. In your query do this:Select .... , (PromoPrice - CostPrice) AS Answer, .....FROM yourTableKeep in mind you can do math functions in queries.DarmarkMark as Answer, if this reply answers your post. Hi Darmark, thanks for your fast answer.The fact is I'm using a single "select function"...

How to subtract two date columns(bound) of a Datagrid and display the result in the third column?
Hi Everyone,I  have two date columns(databound-coming from SQL database) in my datagrid, 'start date' & 'end date'. I need to calculate number of days with 'end date- start date' and display the result in the third datagrid column. i.e.: column2-column1 = column3Any help anyone?...ASAP please got a deadline to meet :) (SOS!!!)Many Thanks in advance,Arty.Aartee...we live more than once! Hi, there are several ways of doing it. One of them is creating a label in the TemplateColumn, use the Helper function to calculate the number of days.<ItemTemplate>   <...

Web resources about - how to split the content of one column in the objectdatasource into two parts and let them display in two columns in the GridView? - asp.net.presentation-controls

Forums Forums Database Error
This is a discussion forum powered by vBulletin. To find out about vBulletin, go to http://www.vbulletin.com/ .

Using The LINQDataSource
-*+There is a new datasource control available in Visual Studio that works in much the same way as the SQLDataSource and the ObjectDataSource. ...

ASP.NET Web Forms DynamicData FieldTemplates for DbGeography Spatial Types
... a FormView in ASP.NET Web Forms. Notice the ItemType is set, rather than using Eval(). We're also using SelectMethod rather than an ObjectDataSource. ...

LINQ Tutorials : LINQ Tutorials, Articles and Resources
Articles and Helpful Tutorials for LINQ and ASP.NET

About Mikesdotnetting
I started this site as somewhere to store answers to bits and pieces that I see asked frequently in the forums at www.asp.net . Rather than type ...

Runnable code for JQuery, Codeigniter, NodeJS, PHP, Python and more - Runnable
Runnable code for dart-vm, express, paypal, google, evernote, everyauth, ejs, rendr, CakePHP, php-mysql, php-facebook, codeigniter, imagemagick, ...

ASP.NET Pivot Table - RadPivotGrid for ASP.NET AJAX
... of all data reports. Try now! Use any declarative data source control (AccessDataSource, SqlDataSource, LinqDataSource, EntityDataSource, ObjectDataSource, ...

Miscellaneous « AJ\’s blog
AJ\’s blog January 28, 2012 2011 in review Filed under: Miscellaneous — ajdotnet @ 7:41 pm The WordPress.com stats helper monkeys prepared a ...

ObjectDataSource - Selectcount method with custom parameters and custom paging.
protected void obds_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) { if (!e.ExecutingSelectCount) { e.InputParameters["filter"] ...

Archive
Archive - Forever Breathes The Lonely Word

Resources last updated: 1/17/2016 2:24:44 AM