Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
347 views
Hi,

We are trying to select the grid's first row, after applying a (client-side) filter. Our code is as follows :
However, the following line of code : alert(Rows.length); still returns the original number of items in the grid (meaning no filter applied)
Apparently the filtering happens after the remaining code? Any ideas on this behaviour?
function selectFirstRow() {
                    var grid = $find("<%=OnderzoekenGrid.ClientID %>")
                    if (grid != null)
                        grid.get_masterTableView().selectItem(0);
                }
 
                function filterPatType(sender, args) {
                    var t = sender.get_text();
                    var masterTable = $find("<%= OnderzoekenGrid.ClientID %>").get_masterTableView();
                    masterTable.clearFilter();
                    if (t == "Ambulanten") {
                        masterTable.filter('typepatient', 'A', Telerik.Web.UI.GridFilterFunction.EqualTo, true); 
                    }
                    else if (t == "Gehospitaliseerden") {
                        masterTable.filter('typepatient', 'H', Telerik.Web.UI.GridFilterFunction.EqualTo, true);
                    }
                    var Rows = masterTable.get_dataItems();
                    alert(Rows.length);
 
                    selectFirstRow();
                }
Bart Reekmans
Top achievements
Rank 1
 answered on 15 Feb 2013
6 answers
390 views
Hi all,
I'm using Asp.net ajax radgrid. Does it provide any mouseover event?? if Yes please give me some examples.
I want to display tooltip on mouseover for each cell for which i have to fetch records from database server. After successful execution of query result will display as tooltip for particular cell.
Any suggestions .. please let me know..

Thanks in advance!!!
Eyup
Telerik team
 answered on 15 Feb 2013
2 answers
467 views
Hi,

I have an AsyncUpload control within a div.
I selected several files to upload.
Questons:
How to hide uploaded file list during uploading process?
How to prevent parent div from expanding by height after files ware added for uploading.overflow:hidden didn't work;
Example:
    <div  style=" overflow: hidden" >
        <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MultipleFileSelection="Automatic"
            OnClientFilesSelected="RadAsyncUpload1_FilesSelected" OnClientFileUploaded="RadAsyncUpload1_FileUploaded"
            UploadedFilesRendering="BelowFileInput" OnClientAdded="RadAsyncUpload1_Added"
            Height="25px" OnClientFileSelected="RadAsyncUpload1_FileSelected" OnClientFileUploading="RadAsyncUpload1_FileUploading"
            OnClientFilesUploaded="RadAsyncUpload1_FilesUploaded" EnableInlineProgress="False"
            OnFileUploaded="RadAsyncUpload1_FileUploaded" PostbackTriggers="btDoZip" Width="300px">
        </telerik:RadAsyncUpload>
    </div>

Thank you in advance.
Denius Valiant
Top achievements
Rank 1
 answered on 15 Feb 2013
1 answer
196 views
We use Telerik's grid for VS2008 and added context menu to it. The code looks as following:

Markup:

<telerik:RadGrid ID="RadGrid1" runat="server" Width="100%" DataSourceID="SqlDataSource1" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
    AutoGenerateColumns="false" AllowMultiRowSelection="true">
    <MasterTableView PageSize="10" AllowPaging="True" Width="100%" DataKeyNames="ContinentID" DataSourceID="SqlDataSource1" EditMode="InPlace">
        <Columns>
            <telerik:GridClientSelectColumn UniqueName="checkBox"></telerik:GridClientSelectColumn>
            <telerik:GridBoundColumn HeaderText="ContinentID" DataField="ContinentID"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="ContinentName" DataField="ContinentName"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
        <Selecting AllowRowSelect="true"></Selecting>
    </ClientSettings>
</telerik:RadGrid>

Code behind:

protected void contextMenu_ItemClick(object sender, RadMenuEventArgs e)
{
    int rowIndex = int.Parse(HiddenField1.Value);
    switch (e.Item.Text)
    {
        case "Edit":
            RadGrid1.Items[rowIndex].Edit = true;
            RadGrid1.Rebind();
            break;
        case "Add":
            RadGrid1.MasterTableView.IsItemInserted = true;
            RadGrid1.Rebind();
            break;
        case "Delete":
            RadGrid1.MasterTableView.PerformDelete(RadGrid1.Items[rowIndex]);
            break;
        case "Export To Excel":
            RadGrid1.MasterTableView.GetColumn("checkBox").Visible = false;
            RadGrid1.ExportSettings.ExportOnlyData = true;
            RadGrid1.ExportSettings.OpenInNewWindow = true;
            RadGrid1.MasterTableView.ExportToExcel();
            break;
    }
}

JavaScript:

function RowContextMenu(sender, eventArgs, menu, hiddenField) {
    var evt = eventArgs.get_domEvent();
 
    if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {
        return;
    }
 
    var index = eventArgs.get_itemIndexHierarchical();
    hiddenField.value = index;
    menu.show(evt);
 
    evt.cancelBubble = true;
    evt.returnValue = false;
 
    if (evt.stopPropagation) {
        evt.stopPropagation();
        evt.preventDefault();
    }
}

I'd like to show popup window when click to "Export To Excel"" option:

case "Export To Excel":

The execution of program should be stopped and wait for selecting option in combo box in popup window. After selecting we click "OK" and the control of program execution is returned back to ASP.NET code. How can I do that?

Thank in advance.

Goran
Princy
Top achievements
Rank 2
 answered on 15 Feb 2013
1 answer
175 views
I have a problem with intellisense not working in the code behind for my web project.  I have uninstalled and reinstalled both Visual Studio (2012 Premium) and Telerik packages.  The activity log (/Users/{MyProfile}/AppData/Roaming/Microsoft/VisualStudio/11.0/ActivityLog.xml) shows this error:

CreateInstance failed for package [Telerik.Web.UI.VSPackage.VSPackage {plus version information}]

I have a feeling this is the cause of intellisense not working.

I'm working on a Windows 7 x64 platform with 8G of RAM.

Any help would be greatly appreciated.
Teodor
Telerik team
 answered on 15 Feb 2013
2 answers
147 views
Hey Peeps,

I'm trying to use a RadDateTimePicker to allow a user to select a date, and according to the date selected, populate the TimeView with custom time values. According to this forum, you can use the following to allocate custom time values:

RadDateTimePicker1.TimeView.CustomTimeValues = new string[] { "12,10,10,57,4", "5,6,3,38,9", "3,8,11,5,7" };

Unfortunately, with my controls (2012 Q1), there is no such property/method (CustomTimeValues) in the RadDateTimePicker or RadTimePicker. How can I go about assigning custom time values to this control?
Juan
Top achievements
Rank 1
 answered on 15 Feb 2013
2 answers
178 views
hi Telerik,

I try to call $find('<%= radPane1.ClientID %>') after page is rendered on client side javascript function, but it is always null -- can't find it. Any idea what i did wrong?

thanks,

roger
Shen Li
Top achievements
Rank 1
 answered on 15 Feb 2013
2 answers
107 views
Hello Telerik Team,

Please help me

I need to consider only working days at the time of assignments binding to Rad Scheduler(not including Sunday and Saturday).
Example:-My assignment is in three working days. I want to show on Friday,Monday,Tuesday.But now it shows on Friday,Saturday and Sunday.

How to exclude these non-working days.Is it possible.Can you please help me.

Thanks in Advance....
Madhavi
Top achievements
Rank 1
 answered on 15 Feb 2013
1 answer
130 views
Hello,

I am using a RadButton inside my RadWindow and I want to close the RadWindow using this button. Is it possible to close the window using some client side code?

Thanks in advance,
Ivy.
Princy
Top achievements
Rank 2
 answered on 15 Feb 2013
5 answers
147 views
HI,
Is someone could give me explaination of this?
I have a OnSelectedIndexChanged event working properly, when I haven't set the visibility property of the grid in the aspx into false.
Then, after i set it false, why OnSelectedIndexChanged event not fired.

this is the code of my grid:
<telerik:RadGrid ID="FacilityRadGrid" runat="server" AllowFilteringByColumn="False"
    AllowMultiRowEdit="False" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
    GridLines="None" PageSize="10" ShowStatusBar="False" MasterTableView-ShowFooter="False"
    OnNeedDataSource="FacilityRadGrid_OnNeedDataSource" OnSelectedIndexChanged="FacilityRadGrid_SelectedIndexChanged"
    Visible="false">

protected void FacilityRadGrid_SelectedIndexChanged(object sender, EventArgs e)
{
    //get selected row
    GridDataItem item = (GridDataItem)this.FacilityRadGrid.SelectedItems[0];
 
    this.FacilityRTBId.Text = item.GetDataKeyValue("Record1").ToString();
    this.FacilityRTBName.Text = item.GetDataKeyValue("Record2").ToString();
 
    this.FacilitytFields.Visible = true;
    this.FacilityRadGrid.Visible = false;
}

Shinu
Top achievements
Rank 2
 answered on 15 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?