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 have a nonhierarchical WebGrid used for realtime data display.
There are FormatConditions determining the background and foreground colors for the "Record" rows.
When grouping is in effect, and a new "Record" row is added, I need to color its corresponding GroupHeaderRow to match its color - as determined by the FormatConditions.
I have been trying to do this server-side beneath the OnInitializeRow handler, at the time the GroupHeaderRow rows are being initialized. I can locate the new child in one of the groups without any problem, but it does not appear that its FormatConditions have been applied to its Style yet.
Once this problem is solved I also need the GroupHeaderRow style to persist until either the group is expanded or a new "Record" row is added to the group.
Anyone? Thanks.
Hi Randy,
Could you explain me more detail about your grouping scenario? From your information that you describe, I only know that you want to group the data by FormatConditions and coloring the child row as determined by FormatConditions.
I made my own sample to show the scenario that I knew from you. Could you check my sample and tell me if the scenario meet your condition or no?
Look forward to hear any feedback from you so I can help you further.
Regards,
Bernard
Hi Bernard, Thanks for the reply. I am replying before looking at your code so that you and others can review my expanded statement of requirements.
In the simplest case, there is only one column in the data.
Rows with value=1 have a green background, while rows with value=2 have a red background. Other values have a default background color. This is accomplished using FormatConditions.
If I group by the column I will have a GroupHeaderRow for each value.
Let us assume that adding a new row to a group will leave the group collapsed.
When I add a new row with value=1 to the grid, I want the GroupHeaderRow for value=1 to have a green background, as determined by the FormatConditions when applied to the new row. That is the first requirement.
The second requirement is that when I add a new row with value=2, the GroupHeaderRow for value=1 should retain its green background, and the GroupHeaderRow for value=2 (per requirement 1) should have a red background.
The third requirement is that when a Group is expanded after adding a new row, the background color should revert to the default background color. The default color should remain until another new row is added to that group.
So far I have not accomplished requirement 1.
Now I will have a look at the code you sent.
Best regards,
Randy
[Update]
Bernard, I am not using a field named "FormatConditons", I am using the WebGrid FormatCondition feature.
Thank you.
Sorry for misunderstanding. I've tried to replicate your problem here but unfortunately it works fine.
I've made my own sample. In my sample, I used FormatConditions feature. When I add a new row, the row have background color like I set on FormatConditions. Could you check my sample and tell me if I missed something in my configuration?
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