Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
1.3K+ views
Hi,

I am trying to disable a submit button from the client side. I am using the following code:
function OkClicked(sender, args) {
 
           document.getElementById("<%=btnConfirm.ClientID %>").set_enabled(false);
 
        }

This is the markup for the button:
<telerik:RadButton ID="btnConfirm" runat="server" OnClick="btnConfirm_Click" Enabled="true">
<Icon SecondaryIconCssClass="rbOk" SecondaryIconRight="4" SecondaryIconTop="4" />
</telerik:RadButton>

When the button gets clicked it deosn't get disabled, but does a postback.I also tried the following script:
document.getElementById("<%=btnConfirm.ClientID %>").disabled = true;

In this case the button APPEARS disabled, but still responds to clicks and any other events (like hover).

What's going on here?

v
Viktor Takacs
Top achievements
Rank 2
 answered on 01 Jul 2011
3 answers
71 views
I've followed the example at http://demos.telerik.com/aspnet-ajax/panelbar/examples/populatingwithdata/databindings/defaultvb.aspx to add a RadPanelBar and RadPanelItems to a SharePoint 2010 page without any success. The RadPanelBar doesn't show on the page when I give values to DataFieldID & DataFieldParentID. No error given. When I leave those properties blank and set DataTextField="Title" then I get the menu but only the 1st level.

Instead of an SQLDataSource I'm using an SPDataSource. The spdatasource does work however, with an asp:DropDownList control.

Are there issues with RadpanelBar and SPDataSource?
Kalina
Telerik team
 answered on 01 Jul 2011
9 answers
272 views
Hello,

I have a tab strip of five tabs, each has a user control dynamically loaded into a corresponding multi page.  Each of the user control's has it's own validation, and when I click a button that causes validation, I only want it to validate that particular user control, with javascript.  Everything is set up properly as far as the validation controls, but every tab validates when I only want the currently selected tab to validate.  Can anyone help me on this?
Rory
Top achievements
Rank 1
 answered on 01 Jul 2011
3 answers
121 views
Hey guys...hope you can help with this one.

I've got a RadTreeView control inside a fieldset. For the purposes of this request I cannot change how the project is organized :)  The problem is, in IE only of course, the TreeView overlaps content below the fieldset as it is expanded (image attached).

This problem goes away if I remove the fieldset! Is there any redraw or refresh events that I can trigger on the TreeView that will solve this issue?

Occurs in IE8 in both regular and compatibility modes. 

Ivan Zhekov
Telerik team
 answered on 01 Jul 2011
2 answers
38 views

Hello,

I've added 9900 + words to the default .TDF dictionary file using the Dictionary Configurator downloaded from another forum here at Telerik.

While testing some of the words, all medical in nature, I don't seem to have consistent suggestions.

For example I enter
zygapophy and I should get zygapophyseal, zygapophyses, and zygapophysis as suggestions but I only receive the last two. In my dictionary I have the following entries:

zygapophyses:SKPF:SKPF
zygapophysis:SKPF:SKPF
zygapophyseal:SKPF:SKPF

I have a total of 159,596 words in the default .TDF file. Using the Custom Dictionary is not an option because of my security/network set up.

I loaded a list of words into a word document with a .TXT extension then used the Dictionary Configurator to load all of them to the existing .TDF list - this was successful. I used the DC to test this same scenario and it works perfectly but in my application I'm experiencing the issue I stated above - missing zygapophyseal from the suggestion list.

I assume the spell checker uses the second and third columns to help group words for the suggestion list, but in this case it seems not to work correctly.

Have any ideas/suggestions?

Thanks in advance,

Dan

PS. I'm using VS.Net 2008 and C#

Dan
Top achievements
Rank 1
 answered on 01 Jul 2011
1 answer
74 views
Hi All

I was looking for a way to loop the entire grid and count all checked fields,
i came up with the following fucntion and i thought i would post it here in case anyone could use it.

Regards

Cush

Private Function Get_CountGridCheckBox(ByVal SelGrid As RadGrid, ByVal ColName As String, ByVal ChkBoxVal As Boolean) As Integer
        Dim RtnVal As Integer
        Dim currentPageIndex As Integer = SelGrid.CurrentPageIndex
        'Set initial value to zero
        RtnVal = 0
  
        For i As Integer = 0 To SelGrid.PageCount - 1
  
            ' Loop current page and count check box values
  
            For Each item As GridDataItem In SelGrid.Items
                Dim CheckBx As CheckBox = DirectCast(item(ColName).Controls(0), CheckBox)
                Dim CheckBxVal As Boolean = CheckBx.Checked
  
                If CheckBxVal = ChkBoxVal Then
                    RtnVal += 1
                End If
  
            Next
  
  
            ' Go to next Grid page
            currentPageIndex += 1
            If currentPageIndex >= SelGrid.PageCount Then
                currentPageIndex = 0
            End If
  
            SelGrid.CurrentPageIndex = currentPageIndex
            SelGrid.Rebind()
  
        Next
  
        'Return Result
        Return RtnVal
    End Function
Genti
Telerik team
 answered on 01 Jul 2011
2 answers
75 views
Hi all,

Currently, when user clicks on one row of RadGrid, it will be selected.
I don't want that function, just want to use the Checkbox only
Are there any ways to eliminate it?

Thanks.

Andy.
Andy
Top achievements
Rank 1
 answered on 01 Jul 2011
3 answers
149 views
I have couple days now a problem with the radgrid trying to make a custom visual appearance while editing and inserting using the FormTemplate making EditFormType="Template" but while inserting it keeps giving me databinding eeror that the property does not exist. While editing its ok...i think this is a bug of the control. This is my code:

                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
                        AllowAutomaticUpdates="True" AllowFilteringByColumn="True" AllowPaging="True" 
                        AllowSorting="True" DataSourceID="edsElegxosBrefos" GridLines="None" Skin="Office2007"
                        <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id" NoMasterRecordsText="Δεν υπάρχουν εξετάσεις..." 
                            DataSourceID="edsElegxosBrefos" PagerStyle-FirstPageToolTip="Πρώτη Σελίδα" PagerStyle-LastPageToolTip="Τελευταία Σελίδα" 
                            PagerStyle-NextPageToolTip="Επόμενη Σελίδα" PagerStyle-NextPagesToolTip="Επόμενες Σελίδες" 
                            PagerStyle-PrevPagesToolTip="Προηγούμενες Σελίδες" PagerStyle-PrevPageToolTip="Προηγούμενη Σελίδα" 
                            PagerStyle-PagerTextFormat="Αλλαγή Σελίδας: {4} &nbsp;Σελίδα <strong>{0}</strong> από <strong>{1}</strong>, Εγγραφές <strong>{2}</strong> εώς <strong>{3}</strong> από <strong>{5}</strong>." 
                            CommandItemSettings-AddNewRecordText="Εισαγωγή Εξέτασης" CommandItemSettings-RefreshText="Ανανέωση" 
                            EditFormSettings-EditFormType="Template" CommandItemDisplay="Bottom"
                            <RowIndicatorColumn> 
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                            <CommandItemSettings AddNewRecordText="Εισαγωγή Εξέτασης" RefreshText="Ανανέωση"
                            </CommandItemSettings> 
                            <Columns> 
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit" ImageUrl="~/Images/edit.png" 
                                    Text="Επεξεργασία" UniqueName="column"
                                </telerik:GridButtonColumn> 
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ImageUrl="~/Images/delete.png" 
                                    Text="Διαγραφή εξέτασης" UniqueName="column1"
                                </telerik:GridButtonColumn> 
                                <telerik:GridBoundColumn DataField="Id" DataType="System.Int32" HeaderText="Id" ReadOnly="True" 
                                    SortExpression="Id" UniqueName="Id" Visible="False"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="CheckupDate" DataType="System.DateTime" HeaderText="Ημ. Εξέτασης" 
                                    SortExpression="CheckupDate" UniqueName="CheckupDate"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Ilikia" DataType="System.Byte" HeaderText="Ηλικία" 
                                    SortExpression="Ilikia" UniqueName="Ilikia"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Baros" DataType="System.Decimal" HeaderText="Βάρος" 
                                    SortExpression="Baros" UniqueName="Baros"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Ypsos" DataType="System.Byte" HeaderText="Ύψος" 
                                    SortExpression="Ypsos" UniqueName="Ypsos"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="PerimetrosKefalis" DataType="System.Byte" HeaderText="Περίμετρος Κεφαλής" 
                                    SortExpression="PerimetrosKefalis" UniqueName="PerimetrosKefalis"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="StomatikiKoilotita" HeaderText="Στοματική Κοιλότητα" 
                                    SortExpression="StomatikiKoilotita" UniqueName="StomatikiKoilotita"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Sxolia" HeaderText="Σχόλια" SortExpression="Sxolia" 
                                    UniqueName="Sxolia"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Patient.Id" DataType="System.Int32" HeaderText="Patient.Id" 
                                    SortExpression="Patient.Id" UniqueName="Patient.Id" Visible="False"
                                </telerik:GridBoundColumn> 
                            </Columns> 
                            <EditFormSettings EditFormType="Template"
                                <FormTemplate> 
                                    <div align="left"
                                        <table style="width: 100%"
                                            <tr> 
                                                <td style="width: 109px"
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td align="justify" style="width: 109px"
                                                    Ημ.Εξέτασης: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadDatePicker ID="RadDatePickerCheckupDate" runat="server" Culture="Greek (Greece)" 
                                                        DbSelectedDate='<%# Bind("CheckupDate") %>' Skin="Office2007"
                                                        <Calendar Skin="Office2007" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                                            ViewSelectorText="x"
                                                        </Calendar> 
                                                        <DatePopupButton HoverImageUrl="" ImageUrl="" /> 
                                                    </telerik:RadDatePicker> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    Ηλικία 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxIlikia" runat="server" Skin="Office2007" Text='<%# Bind("Ilikia") %>' 
                                                        Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    Βάρος: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxBaros" runat="server" Skin="Office2007" Text='<%# Bind("Baros") %>' 
                                                        Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    Ύψος: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxYpsos" runat="server" Skin="Office2007" Text='<%# Bind("Ypsos") %>' 
                                                        Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    Περίμετρος Κεφαλής: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxPerimetrosKefalis" runat="server" Skin="Office2007" 
                                                        Text='<%# Bind("PerimetrosKefalis") %>' Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    Στοματική Κοιλότητα: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxStomatikiKoilotita" runat="server" Skin="Office2007" 
                                                        Text='<%# Bind("StomatikiKoilotita") %>' Width="125px"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    Σχόλια: 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxSxolia" runat="server" Skin="Office2007" Text='<%# Bind("Sxolia") %>' 
                                                        Width="250px" Height="150px" TextMode="MultiLine"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    <telerik:RadTextBox ID="radTxtBoxPatientId" runat="server" Skin="Office2007" Text='<%# Bind("Patient.Id") %>' 
                                                        Width="125px" Visible="false"
                                                    </telerik:RadTextBox> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="width: 109px"
                                                    <asp:Button ID="btnUpdate" runat="server" Text='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "Εισαγωγή" : "Αποθήκευση" %>' 
                                                        CommandName='<%# (Container as GridItem).OwnerTableView.IsItemInserted ? "PerformInsert" : "Update" %>' /> 
                                                    <asp:Button ID="btnCancel" runat="server" CausesValidation="false" Text="Ακύρωση" 
                                                        CommandName="Cancel" /> 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                                <td> 
                                                    &nbsp; 
                                                </td> 
                                            </tr> 
                                        </table> 
                                    </div> 
                                </FormTemplate> 
                            </EditFormSettings> 
                            <PagerStyle FirstPageToolTip="Πρώτη Σελίδα" LastPageToolTip="Τελευταία Σελίδα" NextPagesToolTip="Επόμενες Σελίδες" 
                                NextPageToolTip="Επόμενη Σελίδα" PagerTextFormat="Αλλαγή Σελίδας: {4} &nbsp;Σελίδα &lt;strong&gt;{0}&lt;/strong&gt; από &lt;strong&gt;{1}&lt;/strong&gt;, Εγγραφές &lt;strong&gt;{2}&lt;/strong&gt; εώς &lt;strong&gt;{3}&lt;/strong&gt; από &lt;strong&gt;{5}&lt;/strong&gt;." 
                                PrevPagesToolTip="Προηγούμενες Σελίδες" PrevPageToolTip="Προηγούμενη Σελίδα" /> 
                        </MasterTableView> 
                        <ClientSettings> 
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                        </ClientSettings> 
                    </telerik:RadGrid> 
        <asp:EntityDataSource ID="edsElegxosBrefos" runat="server" ConnectionString="name=ePediaDBEntities" 
            DefaultContainerName="ePediaDBEntities" EnableDelete="True" EnableInsert="True" 
            AutoGenerateWhereClause="true" Include="Patient" EnableUpdate="True" EntitySetName="CheckupBrefos"
            <WhereParameters> 
                <asp:SessionParameter Name="Patient.Id" SessionField="PatientId" Type="Int32" /> 
            </WhereParameters> 
        </asp:EntityDataSource> 
 

Doublechecked everything tried with new webform from the beginning....nothing...first i thought there is an error with foreign key and the entity data model but when i try to remove one property fails on another....

I think you should check this...thanx
Tsvetoslav
Telerik team
 answered on 01 Jul 2011
1 answer
248 views
Hi,

I have a RadGrid with RowHoverStyle enabled. This works until I add an event handler to the OnMouseOver Event of the columns.

A first question:

Is there a way how I can combine both? Enabling the RowHoverStyle and adding the OnMouseOver attribute to the columns on ItemDataBound? At the moment the HoverStyle isn't applied anymore when hovering over the row.

Another question:
What is the most correct way to add a custom tooltip to the first column and another custom tooltip to the other columns?

This is how I'm doing it today:
Dim item As GridDataItem = e.Item
'apply tooltip on whole row
For i As Integer = 0 To item.Cells.Count - 1
    Dim onMouseOverStr As String = item.Cells(i).Attributes.Item("onmouseover")
    item.Cells(i).Attributes.Add("onmouseover", onMouseOverStr & "fixedtooltip('" & tooltipMessage & "', this, event, '350px');")
    Dim onMouseOutStr As String = item.Cells(i).Attributes.Item("onmouseout")
    item.Cells(i).Attributes.Add("onmouseout", onMouseOutStr & "delayhidetip();")
Next
 
'overwrite first column cell's tooltip
item("First").Attributes.Add("onmouseover", "fixedtooltip('" & global_portal.TooltipReplace(FirstTooltipMessage) & "', this, event, '260px');")
item("First").Attributes.Add("onmouseout", "delayhidetip();")
It works but doesn't seem to be the most correct way.

The last question:
As I have set up the grid to indicate the row on hovering over it (RowHoverStyle = True) and I'm catching the rowclick on itemCommand, I would like the cursor to change to the pointer.

This is how I did it in a normal asp.net grid:
e.Item.Attributes.Add("onMouseOver", "this.style.cursor='pointer'")

But it doesn't seem to work for a Radgrid...

Hope you can help me out with this one.

Thanks,

Wim
Tsvetina
Telerik team
 answered on 01 Jul 2011
3 answers
112 views
Is this possible?
Veronica
Telerik team
 answered on 01 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?