﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Can I draw row header by myself? </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Can-I-draw-row-header-by-myself/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Can I draw row header by myself? </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Can-I-draw-row-header-by-myself/</link><pubDate>Wed, 26 May 2010 02:15:44 GMT</pubDate><dc:creator>gao3251999@sina.com</dc:creator><description>&lt;p&gt;thank you very much！&lt;/p&gt;</description></item><item><title>Can I draw row header by myself? </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Can-I-draw-row-header-by-myself/</link><pubDate>Tue, 25 May 2010 23:08:52 GMT</pubDate><dc:creator>Glayaar</dc:creator><description>&lt;p&gt;As far as I know, there is no function / method to set a text in the row header in WebGrid. However, we could use a workaround to achieve the screenshot, by simulating a cell with a similar style to the row header and disable the row header in WebGrid. During RowInitialize server side event you will need to set the value of this cell. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Here is the snippet:&lt;/p&gt;
&lt;p&gt;The new cell with row header style:&lt;/p&gt;&lt;pre&gt;&amp;lt;ISWebGrid:WebGridColumn Width="20px" EditType="NoEdit" Name="idxBox" Caption=" "&amp;gt;&lt;br /&gt;    &amp;lt;CellStyle BackColor="#e4ecf7" CustomRules="text-align: center;"&amp;gt;&amp;lt;/CellStyle&amp;gt;&lt;br /&gt;&amp;lt;/ISWebGrid:WebGridColumn&amp;gt;&lt;/pre&gt;
&lt;p&gt;RowInitialize event handler snippet:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;protected void wgTest_InitializeRow(object sender, RowEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (e.Row.Type == RowType.Record)&lt;br /&gt;    {&lt;br /&gt;        e.Row.Cells.GetNamedItem("idxBox").Text = (e.Row.Position &amp;#43; 1).ToString();&lt;br /&gt;        e.Row.Cells.GetNamedItem("idxBox").Value = (e.Row.Position &amp;#43; 1).ToString();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;In order to remove the row header you will need to set &lt;em&gt;RowHeaders="No"&lt;/em&gt; under &lt;em&gt;LayoutSettings&lt;/em&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Can I draw row header by myself? </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Can-I-draw-row-header-by-myself/</link><pubDate>Tue, 25 May 2010 21:34:28 GMT</pubDate><dc:creator>gao3251999@sina.com</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;OK!&lt;/p&gt;</description></item><item><title>Can I draw row header by myself? </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Can-I-draw-row-header-by-myself/</link><pubDate>Tue, 25 May 2010 09:43:23 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Please reattach the screenshots. It is broken in here.&lt;/p&gt;&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>Can I draw row header by myself? </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Can-I-draw-row-header-by-myself/</link><pubDate>Tue, 25 May 2010 05:32:27 GMT</pubDate><dc:creator>gao3251999@sina.com</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;Can I draw row header by myself? for example:Draw number at row header like picture!&lt;/p&gt;</description></item></channel></rss>