Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
On a "Save" command, I'm trying to update multiple edited rows on an Excel like grid, the columns of which look like this:
<Columns>               
    <telerik:GridNumericColumn DataField="CarID" DataType="System.Int32" HeaderText="ID"
        SortExpression="CarID" UniqueName="CarID" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" HeaderStyle-Width="100" ItemStyle-Width="100" FilterControlWidth="60" ReadOnly="false"/>
    <telerik:GridBoundColumn DataField="CarMake" DataType="System.String" HeaderText="Car Make"
        SortExpression="CarMake" UniqueName="CarMake" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderStyle-Width="120" ItemStyle-Width="120" FilterControlWidth="80" />
    <telerik:GridBoundColumn DataField="CarModel" DataType="System.String" HeaderText="Car Model"
        SortExpression="CarModel" UniqueName="CarModel" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderStyle-Width="120" ItemStyle-Width="120" FilterControlWidth="80" />
    <telerik:GridBoundColumn DataField="CarTrim" DataType="System.String" HeaderText="Car Trim"
        SortExpression="CarTrim" UniqueName="CarTrim" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" HeaderStyle-Width="200" ItemStyle-Width="200" FilterControlWidth="160"/>
    <telerik:GridNumericColumn DataField="CarYear" DataType="System.Int32" HeaderText="Car Year"
        SortExpression="CarYear" UniqueName="CarYear" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" HeaderStyle-Width="100" ItemStyle-Width="100" FilterControlWidth="60" />
</Columns>

Here's my "Save" command:
Case "Save"
    For Each editedItem As GridEditableItem In RadGridViewExcelGridTest.EditItems
        Dim newValues As Hashtable = New Hashtable
        'The GridTableView will fill the values from all editable columns in the hash
        e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem)
        SqlDataSourceExcelGridTest.UpdateCommandType = SqlDataSourceCommandType.StoredProcedure
        SqlDataSourceExcelGridTest.UpdateCommand = "spExcelGridTestUpdateTable"
        SqlDataSourceExcelGridTest.UpdateParameters.Add(New Parameter("CarID", DbType.Int32))
        SqlDataSourceExcelGridTest.UpdateParameters.Add(New Parameter("CarMake", DbType.String))
        SqlDataSourceExcelGridTest.UpdateParameters.Add(New Parameter("CarModel", DbType.String))
        SqlDataSourceExcelGridTest.UpdateParameters.Add(New Parameter("CarTrim", DbType.String))
        SqlDataSourceExcelGridTest.UpdateParameters.Add(New Parameter("CarYear", DbType.Int32))
        SqlDataSourceExcelGridTest.Update()
        editedItem.Edit = False
    Next

And my stored procedure looks like this:
ALTER PROCEDURE [dbo].[spExcelGridTestUpdateTable]
    -- Add the parameters for the stored procedure here
    @CarID int,
    @CarMake varchar(100),
    @CarModel varchar(100),
    @CarTrim varchar (100),
    @CarYear int
 
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;
 
        UPDATE [dbo].[TestTable_Cars]
            SET CarMake=@CarMake, CarModel=@CarModel, CarTrim=@CarTrim, CarYear=@CarYear
            WHERE CarID=@CarID
 
END

The error that I'm getting is Procedure or function spExcelGridTestUpdateTable has too many arguments specified. Most folks getting this error seem to simply have a typo when it comes to one of the parameter names, but I've checked and everything seems to line up. If I execute the SP from SQLServer and provide the parameters (or pass NULL params), the SP runs fine.

UPDATE (10/4/2013 1:09PM): Adding this line before I start adding parameters prevents the error, but the table still doesn't get updated:
SqlDataSourceExcelGridTest.UpdateParameters.Clear()
Konstantin Dikov
Telerik team
 answered on 08 Oct 2013
4 answers
169 views
Hello,

I have been working with the RadGrid and binding it to output I receive from PowerShell commands with no issues.  However, when i want to perform operations such as filtering and sorting, I cannot seem to get this to work.  Following is my HTML and my code behind where I am using the NeedDataSource event:

<telerik:RadGrid ID="HealthCheckStatus" runat="server"
    AllowPaging="false"
    AllowFilteringByColumn="true"
    AllowSorting="true"
    ViewStateMode="Enabled">
    <MasterTableView CommandItemDisplay="Top">
        <NoRecordsTemplate>
            <div class="no-records">
                No records to display.
            </div>
        </NoRecordsTemplate>
        <Columns>
            <telerik:GridBoundColumn DataField="Name" HeaderText="Database Name" />
            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" />
            <telerik:GridBoundColumn DataField="CopyQueueLength" HeaderText="Copy Queue Length" />
            <telerik:GridBoundColumn DataField="ReplayQueueLength" HeaderText="Replay Queue Length" />
            <telerik:GridDateTimeColumn DataField="LastInspectionLogTime" HeaderText="Last Inspection Log Time" />
            <telerik:GridBoundColumn DataField="ContentIndexState" HeaderText="Content Index State" />
        </Columns>
        <CommandItemSettings
            ShowAddNewRecordButton="false"
            ShowExportToExcelButton="true"
            ShowExportToCsvButton="true"
            ShowRefreshButton="false"
            />
    </MasterTableView>
    <ExportSettings Excel-Format="ExcelML"
        HideStructureColumns="true"
        ExportOnlyData="true"
        IgnorePaging="true"
        OpenInNewWindow="true"
        />
</telerik:RadGrid>



Protected Sub HealthCheckStatus_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles HealthCheckStatus.NeedDataSource
 
    Dim queues As Collection(Of PSObject) = PSExchange( _
            "get-mailboxdatabasecopystatus * | sort CopyQueueLength -descending | sort Name")
    HealthCheckStatus.DataSource = queues
 
End Sub

As a note, I have tried modifying the PoweShell command to not have a default sort order and just utilize the primary cmdlet of get-mailboxdatabasecopystatus * and still cannot get it to work.  All that I get back is the same table unsorted and unfiltered every time.

Any help in understanding how I can get this to work would be greatly appreciated!

Thanks,
Ron
Daniel
Telerik team
 answered on 08 Oct 2013
6 answers
313 views
Hi,

I am using a RadListBox with CheckBoxes="True" within a RadGrid, meaning that it is replicated a number of times. Due to the size of the list, and the amount of times it is shown on the page, I donot want each item to be included in the tab order.

I have tried setting the RadListBox tabindex to -1, as well as each item's tabindex to -1 in ItemDataBound, but navigating using tab still traverses the list for each row. What I can only assume is that each checkbox populated in the list when CheckBoxes is set to true, is given a number in the tab order. Is there a way to set the checkboxes tabindex so that this is no longer an issue?

Regards

Troy
Nencho
Telerik team
 answered on 08 Oct 2013
1 answer
249 views
I have created a simple function to add a scheduler appointment to the user's Outlook calendar from a link in the appointment template. It works great for single appointments.
I would also like to do this for recurring appointments and would appreciate any resources, samples or suggestions to point me in the right direction.

Thanks!
Nencho
Telerik team
 answered on 08 Oct 2013
1 answer
186 views
This question is related to the color picker inside the RadEditor.  We are loading the tool from an xml file like this:

<tools name="MainToolbar" dockable="true" enabled="true">
     <tool name="ForeColor" />
</tools>

And later are loading colors like this: 
<colors>
    <color value="#0079c3" />
 </colors>

How do we load the default preset colors along with our custom color?
<colors>
    <color value="#0079c3" />
    <color value="presets" />
</colors>

Thanks much!
Slav
Telerik team
 answered on 08 Oct 2013
1 answer
121 views

Team,

 

I am trying to implement search functionality by using one radsearchbox and radorgchart.on the client side method i want to do the search functionality happened nd correspondign node drilldown should happen.am successful in getting the serch text from UI and finding the same by using rocBCItem.But from there how to get hierrchicl index to call orgchart.drilldownnode method?

Peter Filipov
Telerik team
 answered on 08 Oct 2013
1 answer
103 views
Hello.

Somebody can tell me what is going on with my radeditor? After the "end" of the control, strange lines are appearing (like the picture shows).

Regards.
Marin Bratanov
Telerik team
 answered on 08 Oct 2013
1 answer
113 views
HI , Telerik Support Team

I need to add PeekTemplate  (<img src="../../Img/Wide/img_edit.png" alt="" />)
to RadIconTile on Server-side
Below is my code :
RadIconTile rIcon = new RadIconTile();
rIcon.Target = "_blank";
rIcon.NavigateUrl = "http://google.com";
rIcon.Shape = TileShape.Wide;
rIcon.ImageUrl = "img/menu/icon_editor.png";
rIcon.BackColor = System.Drawing.Color.Green;
rIcon.Title.Text = "editor";
rIcon.PeekTemplateSettings.Animation = PeekTemplateAnimation.Slide;
rIcon.PeekTemplateSettings.ShowInterval = 4000;
rIcon.PeekTemplateSettings.CloseDelay = 3000;
rIcon.PeekTemplateSettings.AnimationDuration = 800;
rIcon.PeekTemplateSettings.ShowPeekTemplateOnMouseOver = true;
rIcon.PeekTemplateSettings.HidePeekTemplateOnMouseOut = true;
rIcon.PeekTemplateSettings.Easing = "easeOutExpo";
 
rMenu.Groups[0].Tiles.Add(rIcon);

Thx. Nitisak
Marin Bratanov
Telerik team
 answered on 08 Oct 2013
1 answer
333 views
I have a RadWindow that scrolls vertically, since its content is rather long.

Is there a way to set the scroll position inside of the radwindow via javascript? Specifically I want to scroll to the top of the radwindow after a user clicks a button within it.
Marin Bratanov
Telerik team
 answered on 08 Oct 2013
11 answers
147 views
Hi.

We've recently updated our telerik version to 2013.1.417 and an usual issue has started to occur (using the same that worked fine prior to the update).

Basically, when I edit the html and have an element that covers multiple lines where the line break is within the setting of the property then it is interpreted as text when returning to the design tab.

An example of the html I have been using is :
<h1 style="display:block;
font-size:12px">Example</h1>

If anyone has had any similar issues, any information would be highly appreciated.

Thanks

Additional Details
To test whether I was definitely correct about the break occurring due to upgrading the telerik version, I downgraded to 2012.1.215 and the issue was eradicated.
Ianko
Telerik team
 answered on 08 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?