Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
100 views
Hi,

    How can we set the columns property of textarea inside RadMultiPageView using javascript.Please reply ASAP.

Princy
Top achievements
Rank 2
 answered on 28 Mar 2012
3 answers
131 views
Implement a custom appointment provider. Is there a mechanism for the provider to get the resources once and then keep them in the scheduler for duration of the page? I would expect the provider to supply the resources and the scheduler to keep them until they are explicitly changed (ie. for another view). But in my case, the provider has to get the resources from the database every time it is accessed (ie. getting appoitments, adding appointment)

I have overridden GetResources(ISchedulerInfo schedulerInfo) to return the resources available to the scheduler; however, it doesn't seem right to me that it queries the backend for the resource definitions on every postback.

If I set the resources programmatically the scheduler seems to maintain the resources on postbacks. For example...

if (!Page.IsPostBack)
{
    ResourceType providers = new ResourceType("Providers");
    providers.DataSource = ScheduleAdapter.GetViewResources(defaultView.ResourceViewID);
    providers.KeyField = "ResourceID";
    providers.TextField = "Resource";
    providers.ForeignKeyField = "ResourceID";
 
    RadScheduler1.ResourceTypes.Add(providers);
}

What am I missing with the implementation of a custom provider? How do you get the provider to supply the scheduler with its Resource collection just once.

Thanks.
Peter
Telerik team
 answered on 28 Mar 2012
5 answers
240 views

Hi,

I have a radgrid in which I'm binding the data. For instance I have the column "SER" in the grid. The value of "SER" in the grid is
"NG  101101". The length is fixed i.e 10.

When i export the above data using export to excel, the radgrid exports the above data to "NG 101101".  It removes one space. I don't want the excel to remove the space. I need to maintain the data as such.

Could you please help me achieve what I want.

Thanks,
Raji

Daniel
Telerik team
 answered on 28 Mar 2012
5 answers
180 views

Hi,

I am adding a new Ribbon tab with two ribbon buttons dynamically. When i click the added ribbon button, its throwing the error,
Error: Sys.WebForms.PageRequestManagerServerErrorException: Index was out of range. Must be non-negative and less than the size of the collection.

What may be the Issue?

 

Thanks,
Mohan

Garry
Top achievements
Rank 2
Veteran
 answered on 28 Mar 2012
1 answer
213 views
Hi,

I am using RadComboBox in my application, but when I run this application and treid to select non selected combobox item then it will not allow to select.

Here is sample code.

<rad:RadComboBox ID="RadComboBox1" runat="server">
                   <Items>
                       <rad:RadComboBoxItem runat="server" Text="A" Value="1" />
                       <rad:RadComboBoxItem runat="server" Text="B" Value="2" />
                       <rad:RadComboBoxItem runat="server" Text="C" Value="3" />
                   </Items>
               </rad:RadComboBox>

Please find attached snap with is thread.I am not able to select Item other than A.

Thanks in advance.
Dimitar Terziev
Telerik team
 answered on 28 Mar 2012
4 answers
174 views
First div tag gets reformatted on save. 

Original Code:
<
div class="main-block comparison" id="comparison">
   <div class="main-frame">
    <div class="left-col">
         <h2>Product Comparison</h2>
         <p>Quisque commodo hendrerit lorem quis egestas. Maecenas quis tortor arcu.  </p>
    </div>
    <div class="right-col">
        <div class="image-holder"> <img src="_themes/v2/images/img.png" alt="" /></div>
        <a href="#" class="launch-btn"><span>Click to Launch Comparison Tool</span></a>
   </div>
 </div>
</div>

And it gets reformatted as:
<div class="main-block"> 

I tried adding StripFormattingOptions="noneSupressCleanMessage" and ConvertToXhtml="false"
to see if that made a difference. 

Telerik dll version: 2011.3.1115.40
Rumen
Telerik team
 answered on 28 Mar 2012
6 answers
212 views
Hello,

I am currently trying to have a LinkButton be the default button in my application. While on RadPageView1 I would like the LinkButton's OnClick event be fired when the Enter key is pressed. If the RadPageView had a property like DefaultButton this would be easy. If it does have this property, I can't find it. If it doesn't have it, I think that it would be a good feature to add to the RadPageView.

Thanks,
Casey
Kate
Telerik team
 answered on 28 Mar 2012
3 answers
116 views
Hi,
I have insert a CheckTreeView Asp. Net in Window, when i postback the CheckedNodes.Count is always 0.
Why ?

Thanks
Plamen
Telerik team
 answered on 28 Mar 2012
1 answer
230 views
Hi all!

I'm currently prototyping a 'Telerik' version of a suite of tools I created for the administration of our application's database.  It's ticking all the boxes as far as interactivity on the frontend goes and I want to show that it's a viable option for replacing some of our older vanilla ASP.NET 2.0 tools.

One of the tools in question allows a user to copy a list of values (in some instances GUIDs, others just simple integers) in to a textbox (1 value per line) and send that to the Datasource for filtering on.  This is then displayed in a vanilla ASP.NET GridView.

For example, a user may fill in the filter box like this:

IDs
====
1156
785636
72889

...and the system will return entities with those IDs.

I run the contents of those various textboxes through a splitter and sanitizer (essentially a set of RegExs to ensure there's no errors or injection attempts) before submission, but the only way I've been able to get that list to the DB is by using a String.Replace on the SELECT code in the Datasource before it refreshes, which puts the list of values into an IN clause.  I hate this because it feels like a hack and stops me using SPROCs for my Datasource, but it does work.

I've read in one Google result that a nice way of doing this is to somehow convert the Textbox contents into a CSV or XML file and submit it that way, but it doesn't seem to help with the overall complexity of the code and it doesn't make use of anything that Telerik provides over and above vanilla ASP.NET.

Does anybody know how I might go about doing this in a more 'proper' fashion using any functionality that Telerik provides?  Am I best off trying to perform the same hack, or have any of you managed to make such a filter in a smoother way?
Tsvetina
Telerik team
 answered on 28 Mar 2012
1 answer
161 views
Hi,

I am trying to set the position of Filter textbox in my grid by javascript. On first keypress in filter textbox everything works fine, but from second time onwards i am getting an error htmlfile: Could not complete the operation due to error 800a025e.

My Code is:
Grid
<telerik:RadGrid ID="RadGridSpeciality" runat="server" CellSpacing="0" GridLines="None"
    AllowFilteringByColumn="true" EnableLinqExpressions="true">
    <ClientSettings>
        <Selecting CellSelectionMode="None"></Selecting>
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn FilterControlAltText="Filter SlNo column" HeaderText="Sl No"
                UniqueName="SlNo" DataField="SlNo">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn FilterControlAltText="Filter Code column" HeaderText="Code"
                UniqueName="Code" DataField="Code" AutoPostBackOnFilter="true">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn FilterControlAltText="Filter Name column" HeaderText="Name"
                UniqueName="Name" DataField="Name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn FilterControlAltText="Filter No Of Doctor column" HeaderText="NoOfDoctor"
                UniqueName="NoOf" DataField="NoOfDoctor">
            </telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

ItemCreated

Private Sub RadGridSpeciality_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGridSpeciality.ItemCreated
       If TypeOf e.Item Is GridFilteringItem Then
           Dim FilterItm As GridFilteringItem = TryCast(e.Item, GridFilteringItem)
           For Each column As GridColumn In RadGridSpeciality.Columns
               Dim filterBox As TextBox = TryCast(FilterItm(column.UniqueName).Controls(0), TextBox)
               filterBox.Attributes.Add("Onkeyup", "dofilter(this,event,1);")
               If hfUniqueName.Value <> "" Then
                   If hfUniqueName.Value = column.UniqueName Then
                       ScriptManager.RegisterStartupScript(Me, Me.GetType(), "starScript", "setCursorToEnd('" & filterBox.ClientID & "','" & hfValue.Value & "');", True)
                   End If
               End If
           Next
       End If
   End Sub

AjaxRequest

Private Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
        If e.Argument <> "" Then
            RadGridSpeciality.MasterTableView.FilterExpression = "(Code.Contains(""" & e.Argument & """))" '"([Code] <>'')"
            '"([Code] LIKE \'%" & e.Argument & "%'\)"
            hfValue.Value = e.Argument
            hfUniqueName.Value = "Code"
            RadGridSpeciality.Rebind()
            Return
        End If
    End Sub


Script

function dofilter(sender, eventArgs, index) {
                eventArgs.cancelBubble = true;
                eventArgs.returnValue = false;
                if (eventArgs.stopPropagation) {
                    eventArgs.stopPropagation();
                    eventArgs.preventDefault();
                }
                var masterTableView = $find("<%= RadGridSpeciality.ClientID %>").get_masterTableView();
                var columns = masterTableView.get_columns();
                uniqueName = columns[index].get_uniqueName();
                var filterval = sender.value;
                if (filterval != '') {
                    $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(filterval);
                }
                return true;
            }

function setCursorToEnd(txtboxFilter, Val) {
                document.getElementById(txtboxFilter).value = Val;
                var txtFilter = document.getElementById(txtboxFilter);
                if (txtFilter != null && txtFilter.value.length > 0) {
                    if (txtFilter.createTextRange) {
                        var FieldRange = txtFilter.createTextRange();
                        FieldRange.moveStart('character', txtFilter.value.length);
                        FieldRange.collapse();
                        FieldRange.select(); //Error comes here
                    }
                }
            }


Thnx in advance
BabaYa
Top achievements
Rank 1
 answered on 28 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?