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

Hi,

I have Rad Grid with batch updates. Edit template column has a custom user control with multiple buttons used to check if the user entered exists within Active directory and a cancel. These buttons cause a post back and causing the grid to reload. Is there a way to persist the edit mode of the grid ??

Please help

Thanks

Konstantin Dikov
Telerik team
 answered on 07 Mar 2016
4 answers
216 views
I have a radgrid that is databound using an object data source.
The grid has a GridTemplateColumn with an asp:ImageButton in it. This button has a click-event that does some business logic and then is supposed to open a new window with some calculated result.

I've tried Page.ClientScript, RadScriptManager.RegisterStartupScript, and RadScriptManager.GetCurrent(this.Page).RegisterDataItem.
I even tried to create a new RadWindow via code-behind, but nothing happens.

public void editLink_Click(object sender, EventArgs e)
{
  string script = "alert('hello');";
 
  //This does not work
  RadScriptManager.RegisterStartupScript(this, GetType(), "test", script, true);
 
  //This does not work
  RadScriptManager.GetCurrent(this.Page).RegisterDataItem(this, "javascript:" + script);
                
  //This does not work
  RadWindow newWindow = new RadWindow();
  newWindow.NavigateUrl = "http://www.telerik.com";
  newWindow.VisibleOnPageLoad = true;
  ((AlarmLogMaster)this.Page.Master).WindowManager.Windows.Add(newWindow);              
}

The master-page exposes the RadWindowsManager via the WindowManager property. The code is run since I can set a break-point in the click event.
Eyup
Telerik team
 answered on 07 Mar 2016
1 answer
210 views

From a hyperlink I need default values to appear when a RadGrid PopUp opens in "Add New" mode. It works fine when a RadButton is clicked (CommandName="InitInsert"). For that I set defaults in the RadGrid_ItemCommand:

if (e.CommandName == RadGrid.InitInsertCommandName)
{
    e.Canceled = true;
    Hashtable values = GetDefaultValues();
    e.Item.OwnerTableView.InsertItem(values);
}

The RadGrid's MasterTableView has EditMode="PopUp". To cause the PopUp to appear from a link I've passed the text "AddNew" in the queryString. Then in PageLoad I set RadGrid.MasterTableView.IsItemInserted = true; as described here. What I can't figure out is how do I get default values to appear in the PopUp that is triggered from a hyperlink? What event? A code sample would be much appreciated.

Konstantin Dikov
Telerik team
 answered on 07 Mar 2016
1 answer
62 views

I have radgrid, with 3 command buttons(Edit, Save and Cancel)

On Edit click Save and cancel buttons should be visible. (By default they should be disabled)

after Save or Cancel click grid goes to read only mode and only Edit command button should be displayed.

i tried all the possibilities by finding the command button and disabling it. Though there is no exception or anything still couldn't achieve this functionality.

Please help me out..it is needed immediately.

CODE :

  <telerik:RadGrid ID="gridMilitaryPension" runat="server" AutoGenerateColumns="false" AllowMultiRowEdit="true"  RenderMode="lightweight"
                     Skin="Office2007" PagerStyle-Mode="NextPrevAndNumeric" AllowPaging="True" PageSize="30" OnNeedDataSource="gridMilitaryPension_NeedDataSource"
                      OnItemCommand="gridMilitaryPension_ItemCommand" >
                        <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" Font-Size="10pt">                          
                            <Columns>                           
                             
                                 <telerik:GridBoundColumn UniqueName="ID" DataField="ID" HeaderText="ID" Display="true" ReadOnly="True"
                                    ForceExtractValue="Always">
                                </telerik:GridBoundColumn>

                                 <telerik:GridBoundColumn UniqueName="slottype" DataField="slottype" HeaderText="Slot Type" SortExpression="slottype" ReadOnly="True"
                                    ForceExtractValue="Always">
                                </telerik:GridBoundColumn>
                                 
                                 <telerik:GridTemplateColumn DataField="total" UniqueName="total" HeaderText="Total Seats" SortExpression="total">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTotalSeats" runat="server" Text='<%# Eval("total") %>' class="classLblTotal"></asp:Label>
                                      
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtTotalSeats" runat="server" Text='<%# Eval("total") %>' Width="100%"  class='<%# Eval("slottype") %>'  onblur="addition(this)" onchange="DataChanged(this)"></asp:TextBox>
                                    </EditItemTemplate>
                                 </telerik:GridTemplateColumn>

                            </Columns>
                          
                              <CommandItemTemplate>
                                  <table>
                                      <tr>                                     
                                         <td> <asp:Button runat="server" ID="btnSaveAllChanges" Text="Save All Changes"  CommandName="SaveAllChanges"  /></td>
                                         <td> <asp:Button runat="server" ID="btnCancel" Text="Cancel"  CommandName="Cancel" /></td>
                                         <td> <asp:Button runat="server" ID="btnEdit" Text="Edit Total Seats" CommandName="Edit"  onclick="btnEdit_Click"/></td>
                                       </tr>

                                  </table>
                                 
                              </CommandItemTemplate>
                           
                        </MasterTableView>
                      
                    
                    </telerik:RadGrid>

 

 

In code Behind:

 protected void gridMilitaryPension_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
           
            if (e.CommandName == "Edit")
            {

//Below i am capturing the controls and trying to hide/unhide. used visible property also but no luck
                GridCommandItem cmditem = (GridCommandItem)e.Item;
                Button btnSaveAllChanges = cmditem.FindControl("btnSaveAllChanges") as Button;
                Button btnCancel = cmditem.FindControl("btnCancel") as Button;
                Button btnEdit = cmditem.FindControl("btnEdit") as Button;
                btnSaveAllChanges.Enabled = true;
                btnCancel.Enabled = true;
                btnEdit.Enabled = false;            
             
                }                
            }
            if (e.CommandName == "SaveAllChanges")
            
            {
               //after logic, Edit button should be enabled.
                  
                }

             
                return;
            }
            if (e.CommandName == "Cancel")
            {
               
                gridMilitaryPension.MasterTableView.ClearEditItems();

                gridMilitaryPension.Rebind();  
            }
        }     

Konstantin Dikov
Telerik team
 answered on 07 Mar 2016
6 answers
327 views
I want to use radscheduler but am wondering if anyone has done syncing of radscheduler to Outlook. Is this a possibility? I'm not looking for an export feature but a sync.
Plamen
Telerik team
 answered on 07 Mar 2016
4 answers
63 views

I am trying to only show 5 min intervals but no matter what I do in code its only showing ie 10:10 ,10:20

Here is what I have tried so far I am using the demo to evulate it for our company.

 

                <telerik:RadScheduler runat="server" Skin="Bootstrap" ID="apertureAppointments" Width="100%" DataKeyField="ID" DataSubjectField="Subject"
                    DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule"
                    DataRecurrenceParentKeyField="RecurrenceParentID" DataSourceID="EntityDataSource1" StartInsertingInAdvancedForm="True"
                     RowHeight="30px" RenderMode="Auto" EnableDescriptionField="True" EnableExactTimeRendering="True"
                    DayStartTime="10:00:00"  DayView-DayStartTime="10:00:00" FirstDayOfWeek="Monday"  HoursPanelTimeFormat="H:mm:ss" LastDayOfWeek="Friday"     MinutesPerRow="5"
                        
                    >
                         
                    <ExportSettings OpenInNewWindow="True">
                        <Pdf PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in" PageTopMargin="1in" />
                    </ExportSettings>
                    <AdvancedForm Modal="True" />
 
                     
 
 
                    <TimeSlotContextMenus>
                        <telerik:RadSchedulerContextMenu ID="SchedulerTimeSlotContextMenu" runat="server">
                            <Items>
                                <telerik:RadMenuItem Text="New Appointment" Value="CommandAddAppointment" />
                                <telerik:RadMenuItem IsSeparator="True" />
                                <telerik:RadMenuItem Text="New Recurring Appointment" Value="CommandAddRecurringAppointment" />
                                <telerik:RadMenuItem IsSeparator="True" />
                                <telerik:RadMenuItem Text="Go to today" Value="CommandGoToToday" />
                                <telerik:RadMenuItem Text="Show 24 hours..." Value="CommandShow24Hours" />
                            </Items>
                        </telerik:RadSchedulerContextMenu>
                    </TimeSlotContextMenus>
 
                    <AppointmentContextMenus>
                        <telerik:RadSchedulerContextMenu runat="server" ID="ContextMenu1">
                            <Items>
                                <telerik:RadMenuItem Text="Open" Value="CommandEdit" />
                                <telerik:RadMenuItem IsSeparator="True" />
                                <telerik:RadMenuItem Text="Categorize">
                                    <Items>
                                        <telerik:RadMenuItem Text="Development" Value="1" />
                                        <telerik:RadMenuItem Text="Marketing" Value="2" />
                                        <telerik:RadMenuItem Text="Personal" Value="3" />
                                        <telerik:RadMenuItem Text="Work" Value="4" />
                                    </Items>
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem IsSeparator="True" />
                                <telerik:RadMenuItem Text="Delete" Value="CommandDelete" />
                            </Items>
                        </telerik:RadSchedulerContextMenu>
                    </AppointmentContextMenus>
                      <ResourceTypes>
    <telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID"
        DataSourceID="RoomsDataSource"></telerik:ResourceType>
    
</ResourceTypes>
                       <ResourceStyles>
                            
    <telerik:ResourceStyleMapping Type="User" Text="Alex" ApplyCssClass="rsCategoryBlue"></telerik:ResourceStyleMapping>
    <telerik:ResourceStyleMapping Type="User" Text="Bob" ApplyCssClass="rsCategoryOrange"></telerik:ResourceStyleMapping>
    <telerik:ResourceStyleMapping Type="User" Text="Charlie" ApplyCssClass="rsCategoryGreen"></telerik:ResourceStyleMapping>
</ResourceStyles>
                </telerik:RadScheduler>

 

Bozhidar
Telerik team
 answered on 07 Mar 2016
15 answers
205 views
Hello, I recently had to upgrade Telerik.Web.UI.dll on a client's server (DNN 06.01.05) to 2013.2.717.35 (previous version installed was 2011.*.*.35). I had to do this because I installed some customizations where I use the latest Telerik.dll version that is suitable for IE10 and all that stuff. Then I set up an assembly binding on web.config forcing old functionallity to use new version of the library.

Everything went fine until we discovered a problem trying to upload a file using FileExplorer on a DNN built in feature (not my customization)

[MissingMethodException: Method not found: 'Int32 Telerik.Web.UI.UploadedFile.get_ContentLength()'.]
   DotNetNuke.Providers.RadEditorProvider.TelerikFileBrowserProvider.StoreFile(UploadedFile file, String path, String name, String[] arguments) +0
   Telerik.Web.UI.RadFileExplorer.ProcessUploadedFiles() +1134
   Telerik.Web.UI.RadFileExplorer.OnLoad(EventArgs e) +248
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

It seems that the signature of get_ContentLength() has changed in latest builds from returning an Int32 to an Int64.

The horror!

I'm in DNN 6. I tried to set an assembly binding on web.config to use both versions of the dll (previous DNN functionality using telerik version 2011 and my assemblies using Telerik version 2013). This seems to be working but now I'm getting an internal DNN error:

The base class includes the field '<componentName>', but its type (Telerik.Web.UI.RadWindowManager) is not compatible with the type of control (Telerik.Web.UI.RadWindowManager).

Since DNN is a very popular CMS I thought may be someone faced the same scenario and could give me a hand.

Any ideas on how to solve this problem?

Thanks in advance.

Juan
Ianko
Telerik team
 answered on 07 Mar 2016
1 answer
116 views

Hi,

Please let me know how to add RadclientDatasource in toolbox

I refer the following link : http://docs.telerik.com/devtools/aspnet-ajax/controls/clientdatasource/connecting-to-web-service

But there is no RadClientDataSource in toolbox.

While copying the code from the sample application , I got the error " Unknown server tag 'telerik:RadClientDataSource'.

Kindly advise.


Daniel
Telerik team
 answered on 04 Mar 2016
3 answers
242 views
Hi All,

I am using Radgrid into User Control. that user control defined into RadWindow in aspx page. when i am clicking the link button that window will popup and i want to assign datasource like. radgrid.get_masterTableView().set_dataSource(new Array()). but radgrid.get_masterTableView() return null values. i want to assign datasource only in client side. please let me know how to solve this issue.

Here i have attached code.

in aspx page

<asp:LinkButton ID="lnkSymptoms" runat="server" Text="Symptoms : " OnClientClick="return lnkSymptom_clientClick()"></asp:LinkButton>
<telerik:RadWindow runat="server" ID="rwSymptoms" Title="Symptoms" VisibleStatusbar="false"
                    Width="600px" Height="430px" Modal="true" EnableShadow="true" Skin="Web20" Opacity="100">
                    <ContentTemplate>
                        <div id="divSymptoms" runat="server">
                            <ucSymptom:ucSymptom ID="ucSymptomsCtrl" runat="server" />
                        </div>
                    </ContentTemplate>
                </telerik:RadWindow>

javascript

 function lnkSymptom_clientClick(sender, args) {
var rgSymptoms = $find("ctl00_ContentPlaceHolder1_rwSymptoms_C_ucSymptomsCtrl_rgSymptoms").get_masterTableView();             
                    rgSymptoms.set_dataSource(new Array());
                    rgSymptoms.dataBind();
}

ascx page

<telerik:RadGrid ID="rgSymptoms" runat="server" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center"
                Width="370px" EnableViewState="false" PagerStyle-Visible="false" >
                <ClientSettings ClientEvents-OnCommand="function() {}" >                  
                </ClientSettings>
                <MasterTableView CommandItemDisplay="None" AutoGenerateColumns="false" AllowSorting="true"
                    AllowPaging="true" DataKeyNames="sys_con_id" ClientDataKeyNames="sys_con_id">
                    <NoRecordsTemplate>
                        <center>
                            No records to be displayed</center>
                    </NoRecordsTemplate>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Condition">
                            <ItemStyle VerticalAlign="Top" Wrap="false" HorizontalAlign="Left" />
                            <HeaderStyle Width="220px" />
                            <ItemTemplate>
                                <asp:Label ID="Description" runat="server" SkinID="NoBold"></asp:Label>
                                <asp:TextBox runat="server" ID="txtDesc" Style="display: none;" onchange="javascript:return UpdateOtherValue(this)"></asp:TextBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>                    
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

Thanks in Advance,
Dhamodharan.S


Eyup
Telerik team
 answered on 04 Mar 2016
1 answer
1.0K+ views
Hi, I am looking for the old version of Kendo UI (2014.1.624). Can you please let me know from where I can download it?
Peter Filipov
Telerik team
 answered on 04 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?