Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
178 views
I've been using the following code successfully with Q3 2011 SP1 to toggle the selection of RadListBox items when they're clicked (SelectionMode="Multiple") without requiring the use of the CTRL key. After upgrading to Q2 2012 SP1, OnClientSelectedIndexChanged no longer appears to fire if you click on an item that's already selected and it's the only item in the RadListBox that's selected. As a result, if there's only one item selected, the user cannot click on it to unselect it without first clicking on another item (and selecting that item). Is there a workaround to restore the previous functionality?

UPDATE: I've traced the change in behaviour to a bug fix in Q1 2012 SP1: Fixed: OnClientSelectedIndexChanged/ing is always fired on subsequent clicks of the same item
var changed;
function radListBox_SelectedIndexChanged(sender, e) {
    if (!changed) {
        changed = true;
        var item = e.get_item();
        if (item.get_checked()) {
            item.uncheck();
            item.unselect();
        }
        else {
            item.check();
            item.select();
        }
        selectCheckedItems(item.get_listBox());
        changed = false;
    }
}
 
function selectCheckedItems(listbox) {
    if (listbox) {
        var items = listbox.get_checkedItems();
        for (var i in items) {
            items[i].select();
        }
    }
}
Ivana
Telerik team
 answered on 12 Sep 2012
1 answer
241 views
hello,
I have a problem pressing the GridEditCommandColumn edit a radgrid, although I have turned off the bone postback is executed by the client side like the button performs the postback edit.
how to disable the postback in GridEditCommandColumn pressing edit.


code fragment:
<radG:RadGrid ID="RadGrid1" runat="server" GridLines="None" HierarchyLoadMode="Client"   Width="1600px" ShowStatusBar="true"
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" Skin="Bus"   >
 
    <PagerStyle Mode="NumericPages"></PagerStyle>
    <ClientSettings AllowDragToGroup="True" AllowGroupExpandCollapse="True"  AllowExpandCollapse = "true">
                          
        <Selecting AllowRowSelect="True" ></Selecting>
    </ClientSettings>
 
    <MasterTableView Width="100%" AllowPaging="true"  HierarchyLoadMode="Client" DataKeyNames="CustomerID" AllowMultiColumnSorting="True"  AllowAutomaticDeletes="true">
  
        <DetailTables >
            <radG:GridTableView DataKeyNames="OrderID" Name="Orders" Width="100%" GridLines="Horizontal"
                AllowAutomaticUpdates="true" EditMode="InPlace">
                <Columns>
 
                        <radG:GridEditCommandColumn FooterText="Edit"  UniqueName="EditCommandColumn"    ButtonType="ImageButton"  EditImageUrl ="../../img/b_editar_1.gif"  HeaderText="Edit"
                        HeaderStyle-Width="100px" UpdateText="Edit" >
                         
                    </radG:GridEditCommandColumn>
                    
Tsvetina
Telerik team
 answered on 12 Sep 2012
1 answer
113 views
Hi
How do I change the background color of the dropdown of  grid dropdown column.
Thanks
RT
Shinu
Top achievements
Rank 2
 answered on 12 Sep 2012
3 answers
162 views

hi

i want set browse button cursor = pointer in firefox and ie8

i do this in opera and chrome

any body can help me?

maybe it is important to know that i use this css too

div.RadUpload .ruFakeInput
{
    display:none;
}
  
div.RadUpload .ruFileInput,
div.RadUpload .RadUpload,
div.RadUpload  .ruStyled
{
    cursor:pointer !important;
    padding:1em !important; /*Fix chrome cursor*/
}
  
div.RadUpload .ruBrowse
{
    width:100%;
}
  
div.RadUpload .ruFileWrap
{
    width:200px;
}

Ivan Zhekov
Telerik team
 answered on 12 Sep 2012
1 answer
100 views
We've implemented the rad async uploader, and are having intermittent failures.  ie7 and ie8 fail most of the time (this uses the silverlight uploader), and other browsers have been failing occassionally, but chrome and firefox work in most cases.  This problem does not occur in our lab environment where there are less security controls.  Are there any known issues that we may not know about that could be contributing to the problem?
Kate
Telerik team
 answered on 12 Sep 2012
1 answer
94 views
Hi,
I have a telerik rad grid with batch insert and update. In this grid some columns are template columns. Columns width are sett on aspx page.  So i got Horizontal scroll. When clicking on the save button validate the grid  columns fields and set focus to empty column fields. I need to change the horizontal scroll (focused empty column fields) to that column.

Thanks & Regards
Anzar.M
Software Engineer
SBN // Technologics
Ernakulam.
Anzar
Top achievements
Rank 2
 answered on 12 Sep 2012
1 answer
105 views
I have an upload section and a grid showing uploaded files.  If you upload a file, then edit something in the grid, when the grid updates, the progress area shows itself while the grid is updating.  How do I make it not do that behaviour? 

All this is inside of an update panel:
<div style="padding: 3px; border: 1px solid #000000; width: 100%; margin-bottom: 20px;">
    <h3>Upload a New Document</h3>
    <table>
        <tr>
            <td align="right" valign="top" class="formlabel">
                Key Words:
            </td>
            <td>
              <asp:TextBox ID="txtKeywords" runat="server" Width="300" TextMode="MultiLine" MaxLength="3000"></asp:TextBox>
           </td>
           <td rowspan="2">
                <asp:Repeater ID="repeaterValidResults" runat="server" Visible="False">
                    <HeaderTemplate>
                        <div  style="color: green">Uploaded valid files:</div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "FileName")%>
                        (<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>)<br /><br />
                    </ItemTemplate>
                </asp:Repeater>
                                     
                <asp:repeater id="repeaterInvalidResults" runat="server" visible="False">
                    <HeaderTemplate>
                        <div style="color: red; padding-top: 40px;">Invalid files:</div>
                    </HeaderTemplate>
                    <itemtemplate>
                        File: <%#DataBinder.Eval(Container.DataItem, "FileName") %>
                        (<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>)
                        <br />
                        Mime-type: <%#DataBinder.Eval(Container.DataItem, "ContentType").ToString()%>
                    </itemtemplate>
                </asp:repeater>
 
           </td>
        </tr>
        <tr>
            <td align="right" valign="top" class="formlabel"> File:
            </td>
            <td>Allowed File Types: <%=String.Join(",", RadUpload1.AllowedFileExtensions)%><br />
                Max File Size: <%=RadUpload1.MaxFileSize.ToString("N0")%> Bytes
             <telerik:RadUpload ID="RadUpload1" runat="server" maxfilesize="50000000"
                InitialFileInputsCount="1"
                MaxFileInputsCount="1"
                AllowedFileExtensions=".doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx" ControlObjectsVisibility="None" EnableFileInputSkinning="true" InputSize="90" Width="500px" />
           </td>
        </tr>
    </table>
       <telerik:RadProgressManager id="Radprogressmanager1" runat="server" />
                                 
        <telerik:RadProgressArea id="progressArea1" runat="server"/>
        <asp:Button id="buttonSubmit" runat="server" CssClass="RadUploadSubmit" OnClick="buttonSubmit_Click" Text="Submit" style="MARGIN-TOP: 6px" />
</div>
 
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" CellSpacing="0" DataSourceID="DocumentsSqlDataSource" GridLines="None" AutoGenerateColumns="False">
<MasterTableView DataKeyNames="DocumentID" DataSourceID="DocumentsSqlDataSource" AllowAutomaticUpdates="True"
                AllowAutomaticInserts="False" AllowAutomaticDeletes="true">
<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:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column" ItemStyle-Width="50px" HeaderStyle-Width="50px">
<HeaderStyle Width="50px"></HeaderStyle>
 
<ItemStyle Width="50px"></ItemStyle>
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn ConfirmText="Delete this Document? This cannot be undone." ConfirmDialogType="RadWindow"
        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" Width="50" />
        </telerik:GridButtonColumn>
        <telerik:GridBoundColumn DataField="DocumentID" DataType="System.Int32" FilterControlAltText="Filter DocumentID column" HeaderText="DocumentID" ReadOnly="True" SortExpression="DocumentID" UniqueName="DocumentID" Visible="false">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="subCasIdx" DataType="System.Int32" FilterControlAltText="Filter subCasIdx column" HeaderText="subCasIdx" SortExpression="subCasIdx" UniqueName="subCasIdx" Visible="false" ReadOnly="true">
        </telerik:GridBoundColumn>
        <telerik:GridHyperLinkColumn DataNavigateUrlFields="FullPath" DataTextField="DocumentFileName" HeaderText="File" FilterControlAltText="Filter FullPathcolumn column" UniqueName="FullPathcolumn" ItemStyle-Wrap="false" Target="_blank">
        </telerik:GridHyperLinkColumn>
        <telerik:GridBoundColumn DataField="DocumentFileName" FilterControlAltText="Filter DocumentFileName column" HeaderText="DocumentFileName" SortExpression="DocumentFileName" UniqueName="DocumentFileName" Visible="false"  ReadOnly="true">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn DataField="Keywords" FilterControlAltText="Filter Keywords column"
            HeaderText="Keywords" SortExpression="Keywords" UniqueName="Keywords" Display="True">
            <EditItemTemplate>
                <asp:TextBox ID="KeywordsTextBox" runat="server" Text='<%# Bind("Keywords") %>' TextMode="MultiLine"
                    Width="300" Height="150"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="KeywordsLabel" runat="server" Text='<%# Eval("Keywords") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="DocumentTypeID" DataType="System.Int32" FilterControlAltText="Filter DocumentTypeID column" HeaderText="DocumentTypeID" SortExpression="DocumentTypeID" UniqueName="DocumentTypeID" Visible="false" ReadOnly="true">
        </telerik:GridBoundColumn>
    </Columns>
 
    <EditFormSettings EditFormType="AutoGenerated" CaptionFormatString="Edit Details" >
        <EditColumn FilterControlAltText="Filter EditCommandColumn column"
            ButtonType="PushButton">
        </EditColumn>
        <FormTableButtonRowStyle Font-Bold="true" BackColor="Gainsboro" />
        <FormCaptionStyle Font-Bold="True" HorizontalAlign="Center" BackColor="Gainsboro" Font-Size="12pt" />
        <FormTableStyle BorderStyle="Solid" BorderColor="Black" BorderWidth="1px" Font-Bold="True" />
    </EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
Plamen
Telerik team
 answered on 12 Sep 2012
2 answers
134 views
I'm trying to access the controls within a NoRecordsTemplate block in my code behind. Doing a search in these forums shows the following code snippet:

protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    GridNoRecordsItem norecordItem = (GridNoRecordsItem)RadGrid1.MasterTableView.GetItems(GridItemType.NoRecordsItem)[0];
    Label lbl = (Label)norecordItem.FindControl("Label1");
}

However, when I try this, the GetItems method returns no items. My GridView control has definitely got NoRecordsTemplate section.

Any ideas why it can't find this?

Thanks for your help,
Dan
Dan
Top achievements
Rank 1
 answered on 12 Sep 2012
1 answer
110 views
Hi,

like the title says, I am trying to bind a date to a date picker.

Here is my code:

<telerik:RadDatePicker ID="rdpDateDebut" runat="server" SelectionOnFocus="SelectAll"
    Width="100px" DbSelectedDate='<%# Bind("Date") %>'>
</telerik:RadDatePicker>

This is inside a ascx used in an edit form UserControl.

I always got the same error:

Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Impossible de créer un objet de type 'System.Nullable`1[[System.DateTime, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' à partir de sa représentation sous forme de chaîne, '', pour la propriété 'SelectedDate'.  

My code looks very simple and I don't understand this error.

Sorry, the error is in french.

Thanks.
Vasil
Telerik team
 answered on 12 Sep 2012
9 answers
443 views
Dear supporter
is there any program to implement persian calendar in your scheduler controls?

tanx

Plamen
Telerik team
 answered on 12 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
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?