Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
1.8K+ views
Hey everyone,

I have a RadGrid with which i am using Advance Data binding using NeedDataSource Event.I have form template inside asp panel for inserting and editing into grid.Panel consists of 2 buttons save and cancel.On save button the items actually got inserted or edited in the grid but are'nt visible until i load the whole form again(debugging it again..!!).I mean i want the grid to be reloaded on every insert,delete or update,which is not happening.Do i have to call this event every time i perform a manual insert or update?....

Thanks
Amit
Radoslav
Telerik team
 answered on 18 Oct 2013
15 answers
3.5K+ views
Hi there

I have a radgrid with gridtemplatecolumns

In 3 of the edit item template columns I have text boxes

All 3 text boxes have standard .net required field validators which are disabled by default

However, If a user enters text in any one of the 3 text boxes then I want to enable the required field validators for the remaining 2. 

If the user clears all the text boxes, then the validators should be disabled again for all 3 text boxes

In other words, either all 3 text boxes must have values, or all 3 text boxes must be empty (in either insert or edit mode) in order to validate

Does anyone know how this can be accomplished client side (and server side if poss)?

Thanks in advance :-)
Konstantin Dikov
Telerik team
 answered on 18 Oct 2013
5 answers
186 views
I have the following RadDropDownTree on my page:

<telerik:RadDropDownTree ID="rddtrForeas" runat="server" 
  EnableFiltering="True"
  DefaultMessage="Select sth"
  DataTextField="Title"           
  DataFieldID="SomeId"  
  CheckBoxes="SingleCheck"            
  ExpandNodeOnSingleClick="true"  
  D
ataValueField="SomeId"  
  DefaultValue="-1" 
  DataFieldParentID="ParentId">
     <ButtonSettings ShowCheckAll="False" ShowClear="true"></ButtonSettings>
     <DropDownSettings Height="400" AutoWidth="Enabled" CssClass="mis-rddtree" OpenDropDownOnLoad="False" ></DropDownSettings><br>           
     <
FilterSettings Filter="Contains" FilterTemplate="ByText" Highlight="Matches" EmptyMessage="Write here for filtering" ></FilterSettings>
</telerik:RadDropDownTree>

In my code behind inside Page_Load  I set the DataSource to a list of three items. I then perform data bind and then set the
SelectedValue to the Ids of the first and second item.

I have noticed that if the "Title" field of my objects contains two consecutive blank spaces or ends with a blank space the drop down
tree control does not function properly. I.e. you cannot deselect in any way the node with the "problematic" title.

Peter Filipov
Telerik team
 answered on 18 Oct 2013
3 answers
203 views
Hi,

I have developed a database driven web application which when loaded for the first time needs to fetch some heavy data from the server.
I don't want the user to see the white screen for a minute or so before the application actually appears. So i want to show the loading sign showing percentage or a bar which shows that the application being loaded and user knows that application will be there after the loading finishes (eg. just as when we login to gmail, before showing the mails a nice loading sign is there showing the percentage of data processed.)

Can anyone help in this topic. It will be really great help.

Thanks in advance.
Galin
Telerik team
 answered on 18 Oct 2013
3 answers
325 views
Hi,

I'm using a modal RadWindow control as a popup which allows users to select certain elements for processing.  When this processing successfully completes, the RadWindow uses the RegisterStartupScript method of the ScriptManager object to call a Javascript function which closes the RadWindow and runs another Javascript function on the parent page to refresh a RadGrid control.

In the RadWindow code behind, the button that initiates the processing is tied to a RadAjaxPanel control for the purpose of displaying a LoadingPanel.  I am overriding the OnError event to capture and record the details of any error that bubbles up from the other application layers.

The code works wonderfully when the processing completes successfully, or when a user clicks on a "cancel" button to exit the RadWindow and return to the parent page.  However, if there is an error, I can't figure out how to get the RadWindow to close.  I'm using IE 7, and all I see is the yellow "warning" triangle that contains mention of an error message to the effect of "'length' is null or not an object" (although I'm not using the "length" property of anything, referencing arrays, etc. in my code).

In the overridden OnError event, I've tried using ScriptManager.RegisterStartupScript and ClientScript.RegisterStartupScript, and good old Response.Write() to try to get the page to run any Javascript after the error--but nothing is working.  Any ideas on what I'm missing?  Code is below:

RadWindow definition on the parent page:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"> 
                <Windows> 
                    <telerik:RadWindow ID="NewSamplePopup" 
                        Behaviors="Move,Pin" 
                        ReloadOnShow="true" 
                        Modal="true" 
                        runat="server" 
                        Height="520" 
                        Width="600" 
                        NavigateUrl="./NewSamplePopup.aspx" 
                        VisibleStatusbar="false" 
                        Title="Getting Available Sample Types...Please Wait" 
                        ShowContentDuringLoad="false"> 
                    </telerik:RadWindow> 
</telerik:RadWindowManager> 





Javascript definition in the RadWindow's markup:
<body> 
    <telerik:RadCodeBlock runat="server"> 
        <script type="text/javascript"> 
            function GetRadWindow() { 
                var oWindow = null; 
                if (window.radWindow) 
                    oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog        
                else if (window.frameElement.radWindow) 
                    oWindow = window.frameElement.radWindow; //IE (and Moz as well)        
                return oWindow; 
            } 
 
            function RadWindowClose() { 
                GetRadWindow().Close(); 
            } 
             
            function CloseAndRebind(args) { 
                GetRadWindow().Close(); 
                GetRadWindow().BrowserWindow.refreshGrid(args); 
            } 
             
        </script> 
    </telerik:RadCodeBlock> 

Relevant methods from the RadWindow code-behind:
        protected void btnGetTests_Click(object sender, EventArgs e) 
        { 
            // code that throws an error... 
        } 
 
       protected void btnCancel_Click(object sender, EventArgs e) 
        { 
            // close the form - this works!!! 
            ScriptManager.RegisterStartupScript(this, this.GetType(), "close", "RadWindowClose();", true); 
        } 
 
protected override void OnError(EventArgs e) 
        { 
            // At this point we have information about the error 
            HttpContext ctx = HttpContext.Current; 
 
            Exception exception = ctx.Server.GetLastError(); 
            ///////// 
            // Logic to handle error here 
            ///////// 
            ctx.Server.ClearError(); 
 
            // Gets called but doesn't work! 
            ScriptManager.RegisterStartupScript(this, this.GetType(), "close", "RadWindowClose();", true); 
 
        } 

Ultimately I would like the Javascript function to redirect the parent page to a custom error screen.  I'm pretty sure I can do this once I get the RadWindow to execute any Javascript.

Thanks!

Dan

Shinu
Top achievements
Rank 2
 answered on 18 Oct 2013
1 answer
79 views
We are using the RadCalendar on this one page but get this error message when using the http://validator.w3.org HTML validator and HTML 5:

line 254, Column 382: The cellspacing attribute on the table element is obsolete. Use CSS instead. …3-10-15" title="" /><table cellspacing="0" class="rcTable" style="width:100%;">

My question is how do we suppress the cellspacing attribute and only use css to get rid of this error?
Vasil
Telerik team
 answered on 18 Oct 2013
3 answers
412 views

 

Hi,

I am not able to bind the data with custom data attribute.
Is it possible to bind the data in telerik grid control?
I am trying like this..


 

 

<Columns>

  <telerik:GridTemplateColumn Display="false"> 
    <ItemTemplate>
      <asp:Label runat="server" ID="lblRowStyle"  
        data-IsDevStrikeThrough='<%# Bind("IsDevStrikeThrough") %>'
        data-IsDevShowAsterik='<%# Bind("IsDevShowAsterik") %>'
        data-IsDevEditable='<%# Bind("IsDevEditable") %>'/>
    </ItemTemplate>  

  </telerik:GridTemplateColumn>

</Columns>

 

 

 

 

<Columns>

  <telerik:GridTemplateColumn Display="false">

    <ItemTemplate>

      <asp:Label runat="server" ID="lblRowStyle"  
       data-IsDevStrikeThrough='<%# DataBinder.Eval(Container, "Attributes['IsDevStrikeThrough']") %>'
       data-IsDevShowAsterik='<%# DataBinder.Eval(Container, "Attributes['IsDevShowAsterik']") %>'
       data-IsDevEditable='<%# DataBinder.Eval(Container, "Attributes['IsDevEditable']")/>
     </ItemTemplate>  

  </telerik:GridTemplateColumn>

</Columns>

 

Kindly do the needful...

Kostadin
Telerik team
 answered on 18 Oct 2013
3 answers
233 views
I have written a javascript function which filters items in a radgrid depending on options that have been specified in a listbox by the user. This worked perfectly until I added a pager, which causes there to be less items on the page than the page size states. Is there anyway of, firstly accessing all rows in a grid (client-side) when a pager is in place, and secondly, forcing re-paging of the radgrid after rows have been hidden.

the javascript method i have implemented basically does this...

 

for (var i = 0; i < masterView.get_dataItems().length; i++) {
    var aCell= masterView.getCellByColumnUniqueName(masterView.get_dataItems()[i], "aCell")

 

 

 

    if (aCell!= null) {

 

 

        var cellValue = aCell.innerHTML;

 

 

 

        if (Exists(filterListbox.get_checkedItems(), cellValue) == false) {

 

            masterView.hideItem(i);

 

            continue;

 

        }
    }
    //now re-set paging so it still displays x items instead of x-(hidden item count)
 }

Konstantin Dikov
Telerik team
 answered on 18 Oct 2013
1 answer
59 views
Hi,
I need to create doctor wise slots can i do with app schedular
Plamen
Telerik team
 answered on 18 Oct 2013
1 answer
71 views


In my page I have used telerik grid with sorting functionality. In that I have a many columns with different datatype(Single, multiline, date, etc..)
I have a bulk of data, which I have updated day to day. In that grid, the sorting functionality is working fine for all types of columns but the column (Description) which has multiline text does not sort stable.
Example: Some data starts with number(1, 2 , ..) and Character(A, B, C, ..) and Special Character with/without number/character(1\2 , 1#, 1 D, etc..)
The sorting functionality is working fine for contents starts with both number and Character.(i.e  0, 1, 2, ...,9, A, B, C,... Z)
But the contents starts with Special Character with/without number/character is does not sort stable.
Example: 0, 1, 10, A, B....Z, 1/2, 1#, 2 D, A, B, ..Z(i.e its having two manner of sorting.. 0 to Z and again 1/2 to Z)

Pls can Anyone Help me


Thanks
Akila
Konstantin Dikov
Telerik team
 answered on 18 Oct 2013
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?