This is a migrated thread and some comments may be shown as answers.

HeaderStyle, ItemStyle, and FooterStyle are not applied to new rows added while on batch mode

7 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
أشرف
Top achievements
Rank 1
أشرف asked on 11 Dec 2013, 11:23 AM
Greetings,

If I have a column setup as follows:
<telerik:GridTemplateColumn UniqueName="Store_Code" DataField="Store_Code" DataType="System.Int32">
                            </EditItemTemplate>
                            <InsertItemTemplate>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <%# Eval("Store_Code") %>
                            </ItemTemplate>
                            <HeaderStyle CssClass="serial-column" />
                            <ItemStyle CssClass="serial-column" />
                            <FooterStyle CssClass="serial-column" />
                        </telerik:GridTemplateColumn>

When I add rows to the grid while on batch mode, I don't find the serial-column CSS class applied to the cells.

7 Answers, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 16 Dec 2013, 09:40 AM
Hello,

The experienced behavior is expected. The RadGrid BatchEditing functionality uses RadGrid Client-Side binding mechanism which creates rows on the client which does not take server-side properties specific for each column.

In such cases you will need to manually set the className to the desired cells in the RadGrid RowCreated client-side event.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
أشرف
Top achievements
Rank 1
answered on 17 Dec 2013, 06:51 AM
My intuitive thinking (and I think many developers are like me) is that batch mode grid will have the same functionalities of the other modes done client side. Of course there are some fancy features that are hard to implement client side and others are meaningless to be done client side, but the basics like styling should be available.

You already render things like for example, the edit and insert templates of the columns, why not render a whole TR element with all the style properties applied to it, and use it client side as a template for new rows using cloneNode or whatever solution you like?
0
Accepted
Antonio Stoilkov
Telerik team
answered on 19 Dec 2013, 07:44 AM
Hello Ashraf,

You are correct in your observations. However, these limitations come from the RadGrid client-side implementation that the BatchEditing uses. Note that we have planned to improve our client-side binding mechanism in 2014 in order to cope better with common scenarios that we have pinpointed. Thank you for the suggestions they help us better understand on what we should concentrate.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
أشرف
Top achievements
Rank 1
answered on 19 Dec 2013, 08:45 AM
Hmmm…May I be nosy and ask whether you will solve this issue in the near future (the next release for example)?
We're at the start of creating a product that is expected to take at least a year of work, so if you think that you will solve this issue in the next coming months, I won't bother myself and my managers with creating a fix for it because we already won't release our product so soon.

Is there a place where you publish the planned additions and modifications for all the RadControls? If there's such a place, it will be beneficial for me, because I won't work on creating any additions that you already plan to create.
0
Antonio Stoilkov
Telerik team
answered on 21 Dec 2013, 09:33 AM
Hi Ashraf,

We have plans for improving the RadGrid BatchEditing in our next quarter. Note that we could not ensure that these issue will be fixed. We are aware of this particular issue and will do our best to find a solution for it in the next release. Additionally, you could take a look at our Feedback portal where you could log your items and let people vote for them.

Regards,
Antonio Stoilkov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
أشرف
Top achievements
Rank 1
answered on 23 Dec 2013, 11:06 AM
I've done it. I render two TD elements for each column, one with the FooterStyle applied on it, and the other with the ItemStyle. They are kept in a hidden TABLE element.

When a new row is created, I apply the attributes and style attributes of the style cells on its cells, and when the row is closed, I apply the attributes of the ItemStyle TDs on it.

What if I contributed this code? I read in the FAQ here that contributing code may credit me with points.

In the course of creating this addition, I struggled because of the lack of a "row closed" event. The batchEditClosing and batchEditClosed events are called for each cell, but I wanted an event that's called when the whole row is closed so that I apply the attributes on it, specially that I use the full row edit mode.
0
Eyup
Telerik team
answered on 25 Dec 2013, 08:39 AM
Hi Ashraf,

I'm glad that you've managed to achieve the desired functionality.
If you have sample projects or ideas for improving Telerik Web UI controls, you can share them by creating a code-library:
http://www.telerik.com/community/code-library/aspnet-ajax.aspx

Or by logging your ideas as a feature requests so our developers will consider implementing them:
http://feedback.telerik.com/Project/108

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
أشرف
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
أشرف
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or