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
hi,
Can I draw row header by myself? for example:Draw number at row header like picture!
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.
Here is the snippet:
The new cell with row header style:
<ISWebGrid:WebGridColumn Width="20px" EditType="NoEdit" Name="idxBox" Caption=" "> <CellStyle BackColor="#e4ecf7" CustomRules="text-align: center;"></CellStyle></ISWebGrid:WebGridColumn>
RowInitialize event handler snippet:
protected void wgTest_InitializeRow(object sender, RowEventArgs e){ if (e.Row.Type == RowType.Record) { e.Row.Cells.GetNamedItem("idxBox").Text = (e.Row.Position + 1).ToString(); e.Row.Cells.GetNamedItem("idxBox").Value = (e.Row.Position + 1).ToString(); }}
In order to remove the row header you will need to set RowHeaders="No" under LayoutSettings
Please reattach the screenshots. It is broken in here.
Regards,Handy
OK!
thank you very much!
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