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

The RadAutoCompleteBox allows me to select items that were already selected.
That way it allows the user to duplicate items selected.

I't happens the same way on that sample http://demos.telerik.com/aspnet-ajax/autocompletebox/examples/default/defaultcs.aspx

When i press 'n' and select Nancy. It goes to the box.
Then i press 'n' and select Nancy again. The i get 2 Nancyes on the box.

Is it expected?
Can i prevent it from showing selected items on the Drop Down?

Thanks in advance.
Nencho
Telerik team
 answered on 03 Nov 2014
14 answers
152 views
Hi,

Which Telerik control should I use for a Wizard Based ASP.NET Pages? Does Telerik have something similar to Microsoft ASP Wizard Control?

Thanks
Rumen
Telerik team
 answered on 03 Nov 2014
1 answer
94 views
when executing telerik demos, there is a dropdown list displayed by default and contains a default item.
I need to remove this dropdown but, i do not know How?

the code of this dropdown in view source:
<tr class="rcbReadOnly">
<td class="rcbInputCell rcbInputCellLeft" style="width:100%;"><input name="SkinChooser" type="text" class="rcbInput radPreventDecorate" id="SkinChooser_Input" value="Default" readonly="readonly" autocomplete="off"></td><td class="rcbArrowCell rcbArrowCellRight"><a id="SkinChooser_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td>
</tr>
Nencho
Telerik team
 answered on 03 Nov 2014
2 answers
105 views
I have a page with Radtreeview enable drag & drop. I implement a radconfirm to check exist node name when drop nodes

Script on client node dropping

 
function onNodeDropping(sender, args) {
           var dest = args.get_destNode();
           var source = args.get_sourceNode();
           if (dest) {
               var result = false;
               for (var i = 0; i < dest.get_nodes().get_count() ; i++) {
                   var node = dest.get_nodes().getNode(i);
                   if (node.get_text() == source.get_text()) {
                       result = true;
                       break;
                   }
               }
               if (result) {
                   callConfirm(source.get_text());
                   return;
               }
           }
           else {
               dropOnHtmlElement(args);
           }
       }

And code to call confirm :

function callConfirm(nodeText) {
                        radconfirm(nodeText + ' folder is existing, Do you want to overwrite?', confirmCallBackFn);
                        return false;
                    }
                    function confirmCallBackFn(arg) {
                        var ajaxManager = $find("<%=RadAjaxManager1.ClientID%>");
                   if (arg) {
                       ajaxManager.ajaxRequest('ok');
                   }
                   else {
                       ajaxManager.ajaxRequest('cancel');
                   }

Code of RadAjaxManager1_AjaxRequest
if (e.Argument.ToString() == "ok")
            {
                lbStatus.Text = "OK";
            }
            else if(e.Argument.ToString() == "cancel")
            {
                lbStatus.Text = "Cancel";
            }

But when drop an item on Radtreeview to another Node that the same node name, RadTreeView_NodeDrop event always fire before RadAjaxManager1_AjaxRequest. How to solve it?


Hristo Valyavicharski
Telerik team
 answered on 03 Nov 2014
2 answers
1.4K+ views
Hi,

I wonder how to bind a ComboBox in the new Control DataForm.

I have created a script as follows.

aspx
....
        <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="100%" Width="100%" HorizontalAlign="NotSet" LoadingPanelID="baseLoadingPanel" OnAjaxRequest="RadAjaxPanel2_AjaxRequest">
            <telerik:RadDataForm ID="detailsView" runat="server" OnPreRender="detailsView_PreRender">
                <ItemTemplate>
                    <table class="InputTable" border ="1">
                        <tr>
                            <td>
                                   <telerik:RadComboBox ID="comboBoxItem" runat="server"  SelectedValue='<%# Eval("item") %>' Width="100%" ValueType="System.String">
                                   </telerik:RadComboBox>
                            </td>
                        </tr>
...


aspx.cs
protected void detailsView_PreRender(object sender, EventArgs e)
{
    RadComboBox comboBox = (RadComboBox)detailsView.FindControl("comboBoxItem");
    if(comboBox!=null)
    {
        DataTable dataTable = new DataTable();
        dataTable = SelectCommonCode(codeKind, whereclause);
 
        comboBox.DataSource = dataTable;
        comboBox.DataTextField = "codename";
        comboBox.DataValueField = "code";
        comboBox.DataBind();
    }
         
}

however, if(comboBox!=null)  <---- here is always null.

Please tell me the right way.

thx
Yoongu
Top achievements
Rank 1
 answered on 03 Nov 2014
2 answers
601 views
I am trying to design my web form in VS2010 but when i run it ....the &nbsp automatically adding on my form and it collapses all my designing....... how can i solve it?
praveen
Top achievements
Rank 1
 answered on 02 Nov 2014
0 answers
137 views
Hello.
i have a autocompletebox . when i type a character i get this error : input string was not in a correct format

<telerik:RadAutoCompleteBox ID="acpstudents" Runat="server" DataSourceID="st" DataTextField="name" DataValueField="id" InputType="Text" MaxResultCount="10">
          </telerik:RadAutoCompleteBox>
          <asp:SqlDataSource ID="st" runat="server" ConnectionString="<%$ ConnectionStrings:dbconnection %>" EnableCaching="true" SelectCommand="SELECT [name]+' '+[lname] as name,[lname],[scode],[codemelli],[id] FROM [students] WHERE ([schoolid] = @schoolid)" SelectCommandType="Text">
              <SelectParameters>
                  <asp:CookieParameter CookieName="schoolmanager" Name="schoolid" Type="Int32" />
              </SelectParameters>
          </asp:SqlDataSource>

Thank You
shervinrv
Top achievements
Rank 1
 asked on 02 Nov 2014
1 answer
224 views
I am trying to solve this problem, either:
a) Disable all drag and drop across all parts of the file explorer
or
b) Enable drag and drop inside the grid view, list view, tree view etc

1) As part of my testing and playing around with the file explorer, I tried setting these

            FileExplorer1.FileList.ListView.Enabled = false;
            FileExplorer1.FileList.Grid.Enabled = false;

            FileExplorer1.ListView.Enabled = false;
            FileExplorer1.Grid.Enabled = false;

            FileExplorer1.FileList.ListView.ClientSettings.AllowItemsDragDrop = false;
            FileExplorer1.FileList.Grid.ClientSettings.AllowRowsDragDrop = false;

All of which made no observable change to the control.
These however, did work as expected:
           
            FileExplorer1.TreeView.EnableDragAndDrop = false;
            FileExplorer1.TreeView.Enabled = false;

Why did the other lines have no effect?

2) To disable dragging and dropping for the file explorer, I'm told I can use this:

        explorer.get_fileList().get_grid().add_rowDragStarted(RowDragStarted);

        function RowDragStarted(grid, args) {
            args.set_cancel(true);
        }

Is there an easier way to disable or enable drag/dropping without going through every view for an entire File Explorer?

3) When inside the grid or thumbnail view, dragging a file over another folder does not trigger the move file event, but dragging over to the tree view does. How can I trigger this for the grid/thumbnail event?

Thanks,
Sean
Vessy
Telerik team
 answered on 31 Oct 2014
1 answer
163 views
We are facing an issue upon using filter on a GridHyperLinkColumn when this is present inside DetailTables. We are using 2014.2.724.40 versions and are experiencing this issue across all browsers viz. IE9, Chrome, Firefox.

Is there any other attribute that needs to be set in the code snippet below?

<telerik:RadGrid ID="grdView" runat="server" AutoGenerateColumns="false" EnableAJAXLoadingTemplate="True"
        AllowSorting="true" GroupingEnabled="false"
AllowPaging="true" PageSize="10" OnNeedDataSource="grdView_NeedDataSource" OnDetailTableDataBind="grdView_DetailTableDataBind"   OnItemCommand="grdView_ItemCommand">
        <ExportSettings ExportOnlyData="true" OpenInNewWindow="true" HideStructureColumns="true" FileName="ExportExcel"
            IgnorePaging="true">
        </ExportSettings>
        <MasterTableView ShowHeader="False" CommandItemDisplay="Top" PageSize="10" DataKeyNames="GroupName" AllowFilteringByColumn="true">
<CommandItemSettings ShowRefreshButton="false" RefreshText="" ShowAddNewRecordButton="true" AddNewRecordText="AddNew"   AddNewRecordImageUrl="../Images/RadGrid/Duplicate.gif"
                ShowExportToExcelButton="true" ExportToExcelText="Export to Excel" ExportToExcelImageUrl="../Images/RadGrid/ExportToExcel.gif"
                ShowExportToCsvButton="true" ExportToCsvText="Collapse All" ExportToCsvImageUrl="../Images/RadGrid/CollapseAll.gif"
                ShowExportToPdfButton="true" ExportToPdfText="Expand All" ExportToPdfImageUrl="../Images/RadGrid/ExpandAll.gif" />
            <Columns>
                <telerik:GridTemplateColumn UniqueName="GroupName" DataField="GroupName">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lblGroupName" Text='<%#Bind("GroupName") %>'>
                        </asp:Label>
                        <asp:Label runat="server" ForeColor="Blue" ID="lblDisplayName" Text='<%#Bind("DisplayName") %>'>
                        </asp:Label>
                    </ItemTemplate>
                    <HeaderStyle Wrap="true" />
                    <ItemStyle Width="100%" />
                </telerik:GridTemplateColumn>
            </Columns>
            <DetailTables>
                <telerik:GridTableView AllowSorting="True" Width="100%" runat="server" ClientDataKeyNames="Id" AllowFilteringByColumn="true">
                    <ParentTableRelation>
                        <telerik:GridRelationFields />
                    </ParentTableRelation>
                    <Columns>
<telerik:GridHyperLinkColumn  DataTextField="RequestNo" Target="_blank" DataNavigateUrlFormatString="~/FormController.aspx? Id={0}" DataType="System.String"
                            DataNavigateUrlFields="Id" HeaderText="Request#" UniqueName="RequestNo"
                            SortExpression="RequestNo" ShowFilterIcon="false" FilterControlWidth="100%"
                            CurrentFilterFunction="Contains" AutoPostBackOnFilter="true">
                            <HeaderStyle Width="100px" />
                            <ItemStyle HorizontalAlign="Left" CssClass="hyperlink" />
                        </telerik:GridHyperLinkColumn>
                    </Columns>
                    <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" Wrap="false" Position="Bottom" PageButtonCount="5" />
                    <ExpandCollapseColumn ButtonType="ImageButton" UniqueName="ExpandColumn" Visible="False">
                        <HeaderStyle Width="19px" />
                    </ExpandCollapseColumn>
                </telerik:GridTableView>
            </DetailTables>
            <ExpandCollapseColumn ButtonType="ImageButton" UniqueName="ExpandColumn">
                <HeaderStyle Width="19px" />
            </ExpandCollapseColumn>
            <NoRecordsTemplate>
                There is no document to display
            </NoRecordsTemplate>
            <ExpandCollapseColumn ButtonType="ImageButton" UniqueName="ExpandColumn">
                <HeaderStyle Width="19px" />
            </ExpandCollapseColumn>
        </MasterTableView>
        <GroupingSettings CaseSensitive="false" />
        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" PageButtonCount="10" />
        <ClientSettings>
            <Selecting AllowRowSelect="true" />
            <ClientEvents OnRowDblClick="RowDblClick"/>
        </ClientSettings>
    </telerik:RadGrid>
Pavlina
Telerik team
 answered on 31 Oct 2014
2 answers
89 views
Hi
Why using the GridTemplateColumn in grid Blast?(Template , Header, EditCommand Dont Show! )!!!!
So,How to Save in RadGrid ComboCheck And Insert Multi Select Item in LinqDataSource ,And return Select Multi Inserted in ComboCheck?

Ashkan
Top achievements
Rank 1
 answered on 31 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?