Posted on Jun 27, 2011 (permalink)
protected void AddCalculatedColumn(string headerText, string expression, string dataFormatString, params string[] dataFields)
{
var boundColumn = new GridCalculatedColumn
DataFields = dataFields,
HeaderText = headerText,
Expression = expression,
DataFormatString = dataFormatString,
ItemStyle = { CssClass = RadGridCssClasses.ItemBoundColumn },
HeaderStyle = { CssClass = RadGridCssClasses.HeaderBoundColumn }
};
Product.Columns.Add(boundColumn);
} and use it like: expression: {0}/{1} DataFormatString: {0:0.00}% Still haven't figured out my first question?
Posted on Jun 28, 2011 (permalink)
You can try the following server side code to achieve the first requirement
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
if
(e.Item
is
GridDataItem)
GridDataItem item = (GridDataItem)e.Item;
string
txt= item[
"YesNo"
].Text.ToString();
txt==
"1"
)
item[
].Text =
"yes"
;
}
Back to Top
UI controls for ASP.NET AJAX, MVC, WPF, Silverlight, Windows Forms and Windows Phone. Visual Studio productivity tools. Reporting and data layer solutions.
HTML5 / JavaScript tools for Web and Mobile applications
Functional, Performance, Load and Mobile Software Testing
CMS, Mobile Web, Ecommerce, Emarketing, Social Media
Project management software inspired by Agile best practices
It seems you haven't bookmarked any pages. Fix that by clicking the button below