Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
179 views

Hi,

I have used InsertCommand when inserting new rows to the radgrid.

  

protected void grvTasks_InsertCommand(object sender, GridCommandEventArgs e)
{
    var editableItem = ((GridEditableItem)e.Item);
 
    GetTasks();
 
    if (_taskListMain != null)
    {
        Task newTask = new Task(_taskListMain.DataConnections);
 
        Hashtable values = new Hashtable();
        editableItem.ExtractValues(values);
 
        if (values["Name"] != null)
            newTask.Name = (string)values["Name"];
 
        if (values["Description"] != null)
            newTask.Description = (string)values["Description"];
 
        if (values["EstimateInHours"] != null)
            newTask.EstimateInHours = int.Parse(values["EstimateInHours"].ToString());
 
 
        _taskListMain.Tasks.TaskRows.Add(newTask);
        _taskListMain.Tasks.Save();
    }
}

 

I copy data from each field from hashtable to the final class properties. This means lot of rows if there are lot of fields, so I wondering is there another way to copy inserted data from GridEditableItem to final custom class? e.g. Similar function what is use in UpdateCommand ( editableItem.UpdateValues(task);)

 

Regards,

Auvo

Viktor Tachev
Telerik team
 answered on 26 Feb 2016
3 answers
333 views

Hello...

I have a radgrid1 (the parent) which allows you to insert records with a formtemplate.

 inside radgrid1's form template i have another radgrid (radgrid2) which basically is a child of radgrid one.... think of radgrid1 as a cars, and radgrid 2 as carparts.... so i want to insert a honda.... but as part of honda i want to add engine, seats etc.

 

my problem is i'm not sure how to approach a scenario where i click "add new record" on radgrid1... my formtemplate pops up... but because performinsert hasn't been called yet.... i can't add items to my radgrid2 since the parent doesnt have a datakeyvalue yet as parent record not inserted yet.

 

How would you go about this?  how would i databind the child grid when i'm still trying to add the parent?

Viktor Tachev
Telerik team
 answered on 26 Feb 2016
1 answer
808 views

I would like to display "Yes" or "No" for a Boolean in RadGridView instead of a checkbox. I would like to implement this changed in xaml. Columns are generating dynamically. This is how it's created now:

 

 <telerik:RadGridView x:Name="Data" Grid.Row="3" Margin="5" AutoGenerateColumns="False" CanUserSortColumns="True" IsFilteringAllowed="True"
                                 grid:RadGridViewColumnsBinding.ColumnsCollection="{Binding Path=Columns}"
                                 IsReadOnly="False" CanUserResizeColumns="True"/>

Viktor Tachev
Telerik team
 answered on 26 Feb 2016
4 answers
307 views

Hello,

I made an ASP.NET page that uses a RadScheduler with client-side binding.

User access to the application is authenticated by a classical login form based on ASP.NET Membership.

Everything works fine except for an authentication issue that periodically occurs.

The following is an example to illustrate the scenario in which the issue is encountered:

  • a user goes to the RadScheduler page
  • they leave the page open but don't use the application for some hours (and during this time, the user session expires)
  • if the user performs a navigation command on the scheduler (for exampe: click on "next week"), the browser displays a modal dialog box in which authentication is requested, with login and password fields
  • if the user inputs their credentials and clicks "ok", another alert box says "Authentication failed" and so on
  • at this point the user is stuck on this page and is forced to close the browser tab or entire browser window.

 My question is: what can I do in order to make user credentials be accepted by the server?

I already tried with this in web.config:

<system.web.extensions>

<scripting>

<webServices>

<!-- Allows for ajax.net user authentication -->

<authenticationService enabled="true" requireSSL="false" />

</webServices>

</scripting>

</system.web.extensions> 

but nothing changed.

 

Any suggestion would be appreciated.

Thanks in advance

Regards

Mike

 

 

Mike
Top achievements
Rank 1
 answered on 26 Feb 2016
5 answers
113 views

Hello,

I'm having a strange problem with stylesheets in tabs and I hope that you can help me.

I have an Upload control and some buttons in a tab in a page and, in IE 9 only it seems (I've tested Firefox, IE 10 & Chrome, this is not an issue there), when first loaded the page does not load the css for these controls.

If a postback occurs in the tab (ie if a file is uploaded) then the css is loaded (see attached files).

Is there any way to ensure that the css is loaded in this instance?

Thank you

Paul Herzberg

 

Veselin Tsvetanov
Telerik team
 answered on 26 Feb 2016
2 answers
265 views

Hi,
Telerik Team,

            I am using rad grid in batch editing mode ,suppose I have added 15 new records to grid and perform sorting on any column then it will lost data(newly added records in grid). I am facing this issue please help me on same. Is there any built in sorting available for edit mode?


Thanks

Eyup
Telerik team
 answered on 26 Feb 2016
7 answers
335 views
Hello,  I am new to your fourm as well as fairly new to using the Suite of Tools.  My situation is that I currently have RadGrid which is set to batch edit mode and has two drop downs.  The first drop down has a list of items that is populated by an objectdatasource and the second list will be populated based on the selection of the first drop down and the selectedvalue will then be passed into the object datasource of the second drop down.  I have worked at tackling this from multiple approaches...having an autopostback on the first drop down and once that fires then well do a javascript function where it will take the value of the selected item and pass it to a hidden value and I can access the hidden value ino the GridsPreRender and find the two controls and populate the second drop down.  This sort of works as the second drop down is being populated correctly but every time I have to make a selection I have to click the griditem once and it will highlight and do nothing and then if I click it again it will allow me to make my selection.  The other problem is that after I make a selection on my first drop down and the postback occurs it automatically reverts back to the original selection....the user is doing this when they are trying to edit a current list of dropdowns.  I haven't worked out or seen how it will behave if I try to add a new row.  Any thoughts?

Thanks for any and all help in advance,

Ramey
Viktor Tachev
Telerik team
 answered on 26 Feb 2016
2 answers
64 views

Hi,

As per the file, I want to show calculated 4_Average_Assigned % based on two column value i.e- 1_Demand / 2_Assigned.Please help me to implement this.

 

Thanks,

Sagar

 

 

 

Sagar
Top achievements
Rank 1
 answered on 26 Feb 2016
3 answers
139 views

I need to prevent some users from modifying some recurring events but allow them to edit others based on role permissions. I've built a function that gets called on  "Edit" event but the problem is "Edit" event gets called when editing and also adding an event. I need to allow adding events but prevent editing/modifying existing recurring events. Currently scheduler_edit function prevents both editing and adding events.

Here is my stripped down scheduler_edit function:

function scheduler_edit(e) {
    if (!e.event.CanBeEdited) {
        e.preventDefault();
    }
}


 

Plamen
Telerik team
 answered on 26 Feb 2016
6 answers
223 views
Greetings,

I'm doing heavy client side work with Rad controls, specially the grid. I became tired from copying and pasting functions names from the console and hoped that Visual Studio intellisense would help me.
I tried adding the Telerik.Web.UI.Common.Core.js file downloaded from the CDN to my Visual Studio references but intellisense broke.

Does Telerik have a vsdoc (or any other format) definitions file for the library that can be referenced from VS to ease client side development?
أشرف
Top achievements
Rank 1
 answered on 25 Feb 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?