iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
i want to merge row cells in single cell. can it possible in webgrid?
You could add a new cell during InitializeDataSource server side event in the WebGrid datasource and fill in the value of the cell during InitializeRow server side event. Here is the snippet to fill in the FullName cell with FirstName and LastName cell value:
protected void wgTest_InitializeRow(object sender, RowEventArgs e){ if (e.Row.Type == RowType.Record) { e.Row.Cells.GetNamedItem("FullName").Text = String.Join(" ", new string[] { e.Row.Cells.GetNamedItem("FirstName").Text, e.Row.Cells.GetNamedItem("LastName").Text}); e.Row.Cells.GetNamedItem("FullName").Value = String.Join(" ", new string[] { e.Row.Cells.GetNamedItem("FirstName").Text, e.Row.Cells.GetNamedItem("LastName").Text }); }}
Other method would be to modify the select query so you will get the merge cells. Again we show how to select a FullName by merging FirstName and LastName field
SELECT EmployeeID, FirstName, LastName, FirstName + ' ' + LastName AS FullName FROM [Employees]
If the proposed solution does not fit for your scenario, please elaborate your scenario.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname