Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
163 views
I already have a server-side solution, but was curious if anyone has a client-side solution. Basically, I have two GridTemplateColumns, each with a CheckBox (chkIncremental and chkFull). I want the event of checking either CheckBox to force the other checkbox on the same row to become unchecked. Having both CheckBoxes unchecked is a valid state.


Here is my current control with the server-side OnCheckedChange call. I'd love a client-side solution and to be able to make AutoPostBack = False.

<telerik:RadGrid runat="server" ID="rgRegExtractRequest" OnItemDataBound="rgRegExtractRequestDetail_DataBinding"
    AutoGenerateColumns="false"  AllowSorting="false" AllowPaging="false" >
  
    <MasterTableView DataKeyNames="AcademicYear" AllowMultiColumnSorting="True" HierarchyLoadMode="ServerBind"
        GroupLoadMode="Server">
  
        <DetailTables>
            <telerik:GridTableView DataKeyNames="AcademicYear" Width="100%" AllowSorting="false" >
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="AcademicYear" MasterKeyField="AcademicYear" />
                </ParentTableRelation>
                                                                  
                <Columns>
                    <telerik:GridBoundColumn DataField="Subject" SortExpression="Subject" HeaderText="Subject" Display="true" />
                    <telerik:GridBoundColumn UniqueName="SubjectCd" DataField="SubjectCd" Display="false" />
                    <telerik:GridBoundColumn DataField="ExtractDate" SortExpression="ExtractDate" HeaderText="Last Download" Display="true" />
                    <telerik:GridBoundColumn UniqueName="AllowIncrementalFlag" DataField="AllowIncrementalFlag" Display="false" />
                    <telerik:GridBoundColumn UniqueName="AllowFullFlag" DataField="AllowFullFlag" Display="false" />
  
                    <telerik:GridTemplateColumn UniqueName="clmIncremental" HeaderText="Incremental" Display="true" ItemStyle-HorizontalAlign="Center" >
                        <ItemTemplate >
                            <asp:CheckBox ID="chkIncremental" runat="server" OnCheckedChanged="chkFullIncremental_CheckedChanged" AutoPostBack="true" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="clmFull" HeaderText="Full" Display="true" ItemStyle-HorizontalAlign="Center" >
                        <ItemTemplate >
                            <asp:CheckBox ID="chkFull" runat="server" OnCheckedChanged="chkFullIncremental_CheckedChanged" AutoPostBack="true" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
  
                    <telerik:GridBoundColumn DataField="Rescore" SortExpression="Rescore" HeaderText="Rescore Value" Display="true" />
                </Columns>
                </telerik:GridTableView>
        </DetailTables>
  
        <Columns>
            <telerik:GridBoundColumn DataField="AcademicYear" SortExpression="AcademicYear" HeaderText="" Display="true" />
        </Columns>
  
    </MasterTableView>
</telerik:RadGrid>
Scott
Top achievements
Rank 1
 answered on 11 Mar 2011
3 answers
177 views
I have a simple page setup with two horizontal panes.

1 Header Pane - with a RadMenu Control
1 Content Pane

When a user clicks on a rad menu link it loads the corresponding page into the ContentPane.
This works great until the user clicks refresh on the browser and the ContentPane loads the inital page instead of the last page the user was on.

Can the ContentUrl be persisted on a page refesh?
If not, should I build some type of cookie system that will hold the users' last contentURL or is there a better way?

Thanks,

Brad
Niko
Telerik team
 answered on 11 Mar 2011
1 answer
63 views
Hi,

this is murali. i recently updated my DLL's from Q1 2010 to Q3 2010. I am having Update problems with radgrid when in edit mode

the following is the template column i have in my grid
 

<

 

telerik:GridTemplateColumn HeaderText="Note" UniqueName="Note" DataField="Note">  

 

<ItemTemplate>

<%#Eval("Note")%> 

 

 

 

</ItemTemplate>

<EditItemTemplate 

 

<telerik:RadTextBox ID="rtb_Note" TextMode="MultiLine" Columns="25" Rows="3" MaxLength="500" Text='<%# Bind("Note") %>' runat="server" />

</EditItemTemplate

 

</telerik:GridTemplateColumn>

 
i am trying to access the radtextbox value as follows
 

 

 

For Each column In e.Item.OwnerTableView.Columns 

    If TypeOf column Is IGridEditableColumn Then 

 

 

        Dim

 

editableCol As IGridEditableColumn = CType (column, IGridEditableColumn) 

 

 

 

 

 

 

        If (editableCol.IsEditable) Then
            
Dim editor As IGridColumnEditor = editMan.GetColumnEditor(editableCol)
            Dim editorType As String = CType(editor, Object).ToString()
            Dim editorText As String = "unknown"  

 

            Dim editorValue As Object = Nothing 

 

  

            If

 

(TypeOf editor Is GridTemplateColumnEditor) Then
                
If column.UniqueName = "Note" Then
                    
editorText = clsmain.ReplaceSingleQuote(CStr(CType(e.Item.FindControl("rtb_Note" ), RadTextBox).Text))  

 

 

                End

 

 

 

            End

        End

 

 

 

    End

 

 

 

 

 

Next

 

 

 

 

 

 

so when i check the editorText value it is not getting the recenlty typed text.

i tried the same code with Q1 2010 and it works just fine, so what am i doing wrong for Q3 2010.

thank you in advance for all the help.

Murali






 


BSL Support
Top achievements
Rank 1
 answered on 11 Mar 2011
5 answers
165 views
Hi all,

Has something changed with the zindex of the menu recently?  I'm finding that my menus seem to be over the top of any combo box dropdowns.  They are also above the greying out of the window when a radwindow's modal  status is true.

In the main it's not a problem but I'm tarting up the site a bit and as such the issue is starting to appear on more pages.

Regards,

Jon
Kate
Telerik team
 answered on 11 Mar 2011
8 answers
330 views

I am facing problem with RadGrid when I try to hide/show RadTextBox using javaScript inside Grid’s EditFormSettings tag.


This happens when CheckBox value is false at the time of add/Edit record.


I call javascript function that hide/show telerik textbox, assume that checkbox value is false in this case telerik textbox will be disappear.


After page load when I tick checkbox now I again call javascript function and set Telerik Textbox visible, that display on the screen but when I try to write in textbox it disappear.

 

This work fine if I replace telerik textbox with asp Textbox.


Here is my code.

I have written following javascript to show/hide textbox out side the Grid.


<telerik:RadScriptBlock ID="ScriptPanelHideShow" runat="server">

<script type="text/javascript">

//Javascript Function this will hide and show textbox.

function IsCanceledChange() {

var chk_IsCancel = GetRegisteredServerElement("chk_IsCancel");

var txt_Cancel = GetRegisteredServerElement("txt_Cancel_Text");

if (chk_IsCancel.checked == true)                             

txt_Cancel.style.display = 'inline';

else

txt_Cancel.style.display = 'none';

}

var registeredElements = []; //Store/Register grid’s control ID

          //Find Grid’s element

function GetRegisteredServerElement(serverID) {

var clientID = "";

for (var i = 0; i < registeredElements.length; i++) {

              clientID = registeredElements[i];

if (clientID.indexOf(serverID) >= 0)

          break;

              }

          return $get(clientID);

}

</script>

</telerik:RadScriptBlock>


<telerik:RadGrid...

<MasterTableView...

<EditFormSettings

<FormTemplate>

//CheckBox and TextBox

<asp:CheckBox ID="chk_IsCancel" runat="server"

Checked='<%# Bind("IsCancel")%>' onclick="IsCanceledChange()" />

<telerik:RadTextBox ID="txt_Cancel" runat="server" >

</telerik:RadTextBox>

//Register control id into variable

<telerik:RadScriptBlock ID="rsb_RegisterElement" runat="server">

 

<script type="text/javascript">

registeredElements.push('<%# Container.FindControl("chk_IsCancel").ClientID %>');

registeredElements.push('<%# Container.FindControl("txt_Cancel").ClientID %>' + "_Text");


IsCanceledChange(); //Call Javascript function

</script>

</telerik:RadScriptBlock>

</FormTemplate>

</EditFormSettings

</MasterTableView

</telerik:RadGrid>

Sundar Ramadoss
Top achievements
Rank 1
 answered on 11 Mar 2011
3 answers
83 views
I have a rad filter contains more than 40 filtering fields and they only show in single column in dropdownlist and some fields are hidden behind the top of the browser. Is there any ways that I can divide them into mulitple columns?

Thanks in advance!

Shan
Nikolay Rusev
Telerik team
 answered on 11 Mar 2011
1 answer
95 views
How can a force a word wrap even when a long word pushes the border to avoid right and left scrolling?
Rumen
Telerik team
 answered on 11 Mar 2011
5 answers
105 views

When checking to see if the document has been modified, I’m having a problem where the first key stroke is eaten.  On the first key stroke that makes the document dirty I send an ajax message to the server indicating the document is dirty and it is that first key stroke that gets eaten.  Other key strokes are ignored and no messages are sent.  Of course I’m assuming it’s the interaction with the ajax message that causes the key stroke to be eaten. 

Was wondering if anyone had a suggestions what to look into. 

Thanks.
___
Client Side

function OnKeyDown_Editor(e) {
            //debugger;
            if("<%=AllowTextEntry%>".toLowerCase()=="true".toLowerCase()){
                if(isPrintable_orDelete(e.keyCode)){
                    SetDocumentDirtyState(true);
                }
            }
…
            e.returnValue = <%=AllowTextEntry%>;//set to true most times
    }
 
   function SetDocumentDirtyState(MakeItDirty){
        var IsDirty=GetCookie("<%=EditorDirtyCookieName%>");
        if(MakeItDirty==true){
            if(IsDirty!='true'){
                /*
                 * write code to lock this document in database
                 */
                 var message="EditorIsDirty-true";
                 SendAjaxMessage(message);
            }
            SetCookie("<%=EditorDirtyCookieName%>",true,1);
        }
        else{
            deleteCookie("<%=EditorDirtyCookieName%>");
        }
    }
______Server Side:

       protected void Page_Load(object sender, EventArgs e)
        {
…
            if (!Page.IsPostBack)
            {
…
            /*
             * Setup Ajax Management
             */
            //Get reference to AjaxManager (from Master)
            var manager = RadAjaxManager.GetCurrent(this);
 
            //Create a new delegate to handle the AjaxRequest event
            manager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(RadAjaxPanel1_AjaxRequest);
            manager.AjaxSettings.AddAjaxSetting(manager, this.RadEditor1);
 
 â€¦
        }
 
       protected void RadAjaxPanel1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            string Action = null;
            string MyArgument = null;
            try
            {
                int Index=e.Argument.IndexOf("-");
                if(Index>0)Index++;//include the "-"
                Action = e.Argument.Substring(0, Index);
                MyArgument = e.Argument.Substring(Index);
            }
            catch (Exception exc) {
            }
 
 
            switch (Action)
            {
…
                case "EditorIsDirty-":
                    if(MyArgument=="true"){
                        /*eating character?*/
                    }
                    break;
…
            }
…
        }

Rumen
Telerik team
 answered on 11 Mar 2011
5 answers
288 views

Hi,
   I am using Telerik Treeview Control. I have 4000 sub nodes under a main node. its taking so much time in page load (approx 10 minutes). After loading of the page, I am trying to Check the Checkbox of the main node its getting hang my system. there is no response till one hours or more & finally I had to close the window.
   Rather this when I am trying any single node(which do not have any child node) its taking 5-8 seconds to check the checkbox after click on that. Please Suggess the soultion. the code is here underneath.

===============================================

 function UpdateAllChildren(nodes, checked)
  {
   var i;
   for (i=0; i<nodes.length; i++)
   {
    if (checked)      
    {
     nodes[i].Check();      
     s=nodes[i].value;
    } 
    else     
     nodes[i].UnCheck();
        
    if (nodes[i].Nodes.length > 0)     
     UpdateAllChildren(nodes[i].Nodes, checked);     
   }
  }

==================================================

    This above function is being calling while pressing any checkbox on the tree node.

Suresh Dev

Veronica
Telerik team
 answered on 11 Mar 2011
1 answer
88 views
Hello, 

I would like to use the editor spell checker in Hebrew.

I put the dictionary at the  path: ~/App_Data/RadSpell

and set the properties of the editor to:

<rad:RadEditor
      
Id="RadEditor1"
     
SpellCheckSettings-WordIgnoreOptions="UPPERCASE"
      
SpellCheckSettings-SpellCheckProvider="EditDistanceProvider"
      
SpellCheckSettings-SpellEditDistance="2"
      
Runat="server">
</
rad:RadEditor>
as mentioned in the guid.

and set the SpellCheckSettings-DictionaryLanguage Property to : he-IL


But still when i run the spell Checker with words in hebrew that contains errores it pop up window that says
'No Mistakes Found"
I supose i use the Q1 2010 version ( how can i be sure ?)
Rumen
Telerik team
 answered on 11 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?