Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
266 views
As the managers of the company I work in are very interested in the newly introduced batch mode editing feature, because they want to achieve this behaviour in our new project, I was very involved in using and hacking RadGrid to achieve every feature they require.

After a period of this involvement, I'd like to publish about some of the issues that hindered me, and one or a couple of suggestions to enhance the feature.

  1. RadGrid in batch mode doesn't serialize its underlying data source items to the client to be able to manipulate them easily there. Although GridTableView has a dataItems collection (whose name seemed attractive to me), the collection in fact doesn't hold the data records (they're set to null). In fact, the grid uses the DOM as the store of data which made the code complicated (I mean Telerik's code and mine), made the grid hard to extend and manipulate, and introduced problems like this one.
  2. Based on point 1, in which I mentioned that the grid is hard to extend, I'll provide an example: My management asked me to create computed columns and aggregates that are updated while on batch mode. Currently, the available computed columns and aggregates don't work while on batch mode, so I had to write the feature myself. I thought that the task is easy, and will be just a call to reduce on the dataItems array, but it turned out that dataItems doesn't hold the data (maybe this collection is used in other modes. When binding to a data service for example, but I'm not sure), and I had to use some combination of getCellValue and getCellByColumnUniqueName and take care of that these functions read the values from the DOM, so when a row is open for editing it won't be involved in the aggregation until it's closed. When I wanted to write code to recompute the aggregates when a row is deleted, I found that there's no "row deleted" event! The grid has a rowDeleted event but it's not triggered on batch mode. It tried the disposing event on data rows, but it's not reliable, because disposing is different than deletion, and I found my code called unexpectedly. To resolve the issue, I created a dummy rowDeleted event that I call by my code when the user deletes a row, and also consider using something fancy like DOM mutation observers to track row deletions. I'm keen on this because I have some other features that requires to be notified by row deletions.
  3. As clear in point 2, the API is not rich, and I got the impression that the batch mode feature was half baked. Many times, I find myself in need to do direct DOM manipulations to achieve what I thought should be part of the API of any grid.
  4. Based on point 1, the grid doesn't participate in ASP.Net post back operations because its data is in the DOM, not in a structure that can be serialized to a hidden field so that the data is not lost when another control causes a post back. Currently, a batch mode grid needs to be the issuer of the post back operation that saves the data. I have to bind my general save button to call batchManager's saveTable method, otherwise the data will be lost.
  5. The documentation is not sufficient. It just states some methods (not all) without descriptions of the parameters and examples. I waste long time inspecting the objects using browser developer tools, and read the source code of their methods to understand how everything works.
  6. I wonder why Telerik tries to create this whole thing from scratch. Why not use an MV* framework like Knockout or Angular to create a functionality like batch mode editing, in the same way that Telerik currently use jQuery? Using such a popular and powerful framework will make the component powerful, cleaner, and easier to extend, which will benefit you and us.

Maybe there are other issues that I wanted to write about, but these are on the top of my mind now.
I know that batch mode is a new feature that was added to the current release, but I found it lacking some expected basic behaviours.
I hope it will become better and better in future releases.

Regards,

Sudhakar
Top achievements
Rank 1
 answered on 12 Jun 2015
1 answer
122 views

I am working on asp.net ajax gird. Is it possible to remove this blue border of selected grid? This is very annoying me. 

 

http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/simple-vs-advanced/defaultcs.aspx

Viktor Tachev
Telerik team
 answered on 12 Jun 2015
2 answers
359 views
This blue shadow appear When I clicked somewhere on Grid. How to I remove this blue shadow from grid?
Viktor Tachev
Telerik team
 answered on 12 Jun 2015
5 answers
113 views

I have tried a few things but I am unable to get the background color to set on a rad ddl.  Here is the code I have that doesn't work:

Method 1

If (dr("ACTIVE")) = 0 Then
   ddlOperator.Items(ddlOperator.Items.Count - 1).Attributes.Add("style", "BACKGROUND-COLOR: Red")
End If

 

Method 2

Dim itemData As New DropDownListItem
itemData.Text = dr("NAME").ToString
itemData.Value = dr("BADGE").ToString

If (dr("ACTIVE")) = 0 Then
     itemData.Attributes.Add("style", "background-color: red")

end if

Mark
Top achievements
Rank 1
 answered on 12 Jun 2015
1 answer
75 views

I see that you can enable Smooth Streaming for the Silverlight version.  Can you enable Smooth Streaming for the ASP.NET AJAX version of RadMediaPlayer?

 

Thank You!

Konstantin Dikov
Telerik team
 answered on 12 Jun 2015
1 answer
143 views

I updated to the latest release 2015.1.401.45 and the ClientExportManager seems to not work since the update. Embedded scripts are disabled for the whole application and I'm bundling the RadClientExportManager.js along with scripts of other controls. I'm getting an Javascript error saying "Uncaught TypeError: Cannot read property 'drawing' of undefined." I don't see any documentation on Disable Embedded Scripts regarding the script files required for the client export manager. The export used to work before the update to latest version. I also use some controls from the Kendo UI Core framework, but I don't think that it has affected it because the export was working along with the Kendo controls before the update of ASP.NET Ajax controls.

 

Any ideas why the export might not be working?

 Following is the order in which the scripts are bundled.

'Scripts/telerik/Common/Core.js',
'Scripts/telerik/Ajax/Ajax.js',
'Scripts/telerik/Common/jQueryPlugins.js',
 'Scripts/telerik/Common/Navigation/OverlayScript.js',

 'Scripts/telerik/Common/Navigation/NavigationScripts.js',
'Scripts/telerik/Common/Animation/AnimationScripts.js',
'Scripts/telerik/Common/AnimationFramework/AnimationFramework.js',

'Scripts/telerik/ClientExportManager/RadClientExportManagerScripts.js',

'Scripts/kendo/kendo.core.min.js',
 'Scripts/kendo/kendo.angular.min.js',
 'Scripts/kendo/kendo.data.min.js',
'Scripts/kendo/kendo.popup.min.js',
 'Scripts/kendo/kendo.list.min.js',
'Scripts/kendo/kendo.fx.min.js',
 'Scripts/kendo/kendo.userevents.min.js',
'Scripts/kendo/kendo.draganddrop.min.js',
'Scripts/kendo/kendo.mobile.scroller.min.js',
'Scripts/kendo/kendo.dropdownlist.min.js'

 

Thanks,

Naveen Jones

Peter Filipov
Telerik team
 answered on 12 Jun 2015
3 answers
87 views

Hi!!

I'm working with RadGrid in hierarchy mode. On DetailTable I have a CommadItemTemplate with an asp:button:

 

<DetailTables> 
<CommandItemTemplate>
   <asp:ImageButton ID="IbB_" ImageUrl="../../Img/b_.gif" CommandName="AContact" runat="server" onClientClick="b_();" />
</CommandItemTemplate>

<...>

I need to get the Parent ID in client side (JS) how i can do?

 

Thanks

Jota
Top achievements
Rank 1
 answered on 12 Jun 2015
1 answer
157 views
I'm trying to change the font size larger in my site map, but not having much luck. I've attached a screen shot of what I have now. I want "Cost", "DP", "PCIP", etc to have a larger font than the links under "Cost", like default.aspx, login.aspx, etc. "Cost" folder is a folder under the root.
Aneliya Petkova
Telerik team
 answered on 12 Jun 2015
4 answers
150 views

Whenever I try to click on cancel button 'during' a file upload, the ProgressArea doesn't disappear. Is there any way where I can either programatically disable/hide the cancel button during the upload or hide the ProgressArea after clicking on the cancel button.

 

I tried using the following code:

 

function onClientProgressUpdating()

{

$telerik.$(".ruCancel").hide(); 

}

 

function onClientFileUploaded()

{

$telerik.$(".ruCancel").show(); 

}

Ivan Danchev
Telerik team
 answered on 12 Jun 2015
1 answer
118 views

Hallo, sorry for my english.

I need to determine when control(panel) will be updated by radajaxmanager in theyrs onRequestStart. I need this to call kendo.destroy before postback to destroy existing kendo controls.

Problem is that objects, recieved from get_ajaxSettings have property with ClientID's of controls (InitControlID) and get_eventTarget returns uniqueId. Because of that, i cannot get controls that will be updated from settings collection for current request.

I've found _postbackControlClientID in ajax setting object, but that property contains invalid id, not like in InitControlID, but very similar.

Seems like there is no way to determine in onRequestStart event controls that will be updated.

So, that will be great if telerik developers add a function to onRequestStart eventArgs like get_currentAjaxSetting for situations like this.

Thanks.

Konstantin Dikov
Telerik team
 answered on 12 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?