Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
I am trying to figure out a way that I can manually sort a radlistview. The problem I have is that the database does not contain the field I want to sort by. The application allows the user to determine the sort of the items in an order they determine. I could not find a way to manually add/remove items from the radlistview instead of binding to the DB, or a way to create a custom field that I can set after the data as loaded to sort on.

Any recommendations?

The scenario is there are two controls on the page both list views, one is a list of photo thumbnails, the other is a list of photos selected. As the user selects the thumbnails I want the order in the second list to be the order that they picked the photos.
Rosen
Telerik team
 answered on 01 Feb 2010
1 answer
127 views

I have problems with the RadComBox Load-On-Demand combined with data binding.
Below is the code,

aspx
(I am using declaretive datasource (dataset) ), Below aspx is putting under FormView,

<telerik:RadComboBox Skin="Hay" ID="RadComboVendorID" runat="server"

 DataSourceID="DBDataSource1" DataMember="PurchaseHeader.VendorInformation_Via_VendorID"  DataTextField="VendorID" DataValueField="VendorID" SelectedValue ='<%# Bind("VendorID") %>' DropDownWidth ="550"  Height ="270" Width ="105"

HighlightTemplatedItems = "true" Sort="Ascending" MarkFirstMatch="True" AutoPostBack = "true" OnItemsRequested= 'RadComboBox_ItemsRequested' EnableLoadOnDemand ="true"  ShowMoreResultsBox ="true" EnableVirtualScrolling ="true" />

and, Code Behind,ItemsRequested function, I filter out the data source that binded to the page base on whatever condition, see below,

   Public Sub RadComboBox_ItemsRequested(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs)

        Dim combo As RadComboBox = TryCast(sender, RadComboBox)     
        datasource.FilterTable("VendorInformation", "VendorID LIKE '%abcedfg%'")

        combo.DataSource = ds
        combo.databind()
   End Sub

But, it give error on combo.databind() line, say binding function must bind in the context of .................
i take away combo.databind() line, the datasource only get filtered after fresh not through AJAX posting.

Any solution for that ? Thanks .


Yana
Telerik team
 answered on 01 Feb 2010
1 answer
102 views
I have used the example for turning filtering on and off with javascript and it works great. I moved the radio buttons into the command template of the radgrid and im not sure how to reference them. I used to check the state of the buttons on page load and hide it if the radio button for hide was selected. This allowed me to hide the filtering on start up. What syntax would I use to reference a radio button in the command template of a radgrid in javascript?
Princy
Top achievements
Rank 2
 answered on 01 Feb 2010
2 answers
331 views
Hi
  How to change DatePicker Height.
Not Textbox height.popup height
pasam Anna
Top achievements
Rank 1
 answered on 01 Feb 2010
1 answer
160 views
Hello,

         
<telerik:GridTemplateColumn UniqueName="StatusColumn" HeaderText="Approved Status">  
                <ItemTemplate> 
                   <asp:Label id="lblStatus" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "status") %>'>  
                       
                   </asp:Label> 
                </ItemTemplate> 
                <EditItemTemplate> 
                   <asp:DropDownList id="ddlApprovalStatus" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlApprovalStatus_SelectedIndexChanged" > 
                    <asp:ListItem Text="Pending" Value="False" Selected="True"></asp:ListItem> 
                   <asp:ListItem Text="Approved" Value="True"></asp:ListItem> 
                   </asp:DropDownList> 
                                   </EditItemTemplate> 
                <ItemStyle Width="40px" /> 
            </telerik:GridTemplateColumn> 
i have dropdown list as shown above. On its selected index change event i want to acess  GridBoundColumn  row, to get some information. How can it be done.
GridBoundColumn is 
<telerik:GridBoundColumn DataField="id" DataType="System.Int32" HeaderText="id"   
                ReadOnly="True" SortExpression="id" UniqueName="id" Visible="false">  
                <ItemStyle Width="100px" />  
            </telerik:GridBoundColumn> 
 i want to get this "id" in selectedindexchange event 

my selectedchange event is
protected void ddlApprovalStatus_SelectedIndexChanged(object source, System.EventArgs e)  
        {  
              
 
        } 

Thanks
Amarinder
Shinu
Top achievements
Rank 2
 answered on 01 Feb 2010
0 answers
94 views
hello to all expert,

                          i would like to ask some help coz i been looking through the internet for solutions but i've never found to suit for my problem, here's my problem i have a telerik treeview control to load my main folders and also to all subfolders with a docs inside of each subfolder now i have a 400 subfolder with docs inside on each subfolders, when i load my page its causes a time out, sometimes maximum exceeded how i'm going to prevent those errors encountered during page load..anyway here's my code on loading those folders..
    protected void Page_Load(object sender, EventArgs e)
        {

          if (cUserInfo.MemberKey == "000001")
                {
                    rootFolder = Server.MapPath("../MEMBERS");
                    parts = rootFolder.Split('\\');
                    name = parts[parts.Length - 1];
                    name = "IBOS Directories";
                }
                else
                {
                    rootFolder = Server.MapPath("../MEMBERS/" + cUserInfo.MemberMnemonic.Trim());
                    parts = rootFolder.Split('\\');
                    name = parts[parts.Length - 1];
                }

                if (!Directory.Exists(rootFolder))
                {
                    cXML.CopyDirectory(Server.MapPath("../MEMBERS/BANK1"), rootFolder, true);
                }

                RadTreeNode rootNode = new RadTreeNode(rootFolder);
                rootNode.ImageUrl = "../Images/Folder.gif";
                rootNode.Category = "Folder";
                rootNode.Expanded = false;
                rootNode.Text = name;
                rootNode.NavigateUrl = rootFolder;
                RadTreeView1.Nodes.Add(rootNode);
                RadTreeView1.MultipleSelect = true;
                BindTreeToDirectory(rootFolder, rootNode);
}

 private void BindTreeToDirectory(string dirPath, RadTreeNode parentNode)
        {
            string[] dirs = Directory.GetDirectories(dirPath);
            foreach (string s in dirs)
            {

                string[] parts = s.Split('\\');
                string name = parts[parts.Length - 1];
                if (name != "BANK1")
                {
                    RadTreeNode node = new RadTreeNode(name);
                    node.ImageUrl = "../Images/Folder.gif";
                    node.Value = name;
                    node.Category = "Folder";
                    parentNode.Nodes.Add(node);

                    BindTreeToDirectory(s, node);
                }
            }

            string[] files = Directory.GetFiles(dirPath);
            foreach (string fileName in files)
            {
                string[] parts = fileName.Split('\\');
                string name = parts[parts.Length - 1];
                //RadTreeNode node = new RadTreeNode(name);
                RadTreeNode node = new RadTreeNode(fileName);
                FileInfo fi = new FileInfo(fileName);
                node.ImageUrl = "../Images/File.gif";
                node.Value = String.Format("{0}@{1}@{2}", fi.Name, fi.Length, fi.LastWriteTime.ToString());
                node.Category = "File";
                node.Text = name;
                node.ToolTip = String.Format("{0}@{1}@{2}", fi.Name, fi.Length, fi.LastWriteTime.ToString());
                node.NavigateUrl = fileName;
                
                parentNode.Nodes.Add(node);
            }
        }

if you could find some wrong codes here please help, also if you could provide some solutions on the time out and exceeded problem please provide us.. we appriaciate it so much

thanks in advance


Jols
Top achievements
Rank 2
 asked on 01 Feb 2010
1 answer
322 views
Good Day All

i have a Radgrid defined like this

<telerik:RadGrid ID="RagCategories" runat="server" Height="399px" Width="698px" AutoGenerateColumns="False" Skin="Sunset" OnDataBound="RagCategories_DataBound">  
                        <MasterTableView> 
                        <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <Columns> 
                        <telerik:GridTemplateColumn DataField="CategoryID" HeaderText="ID" UniqueName="TemplateColumn">  
                        <ItemTemplate> 
                        <asp:Label ID="lblID" Font-Bold="true" runat="server" Text='<%# Eval("CategoryID")%>' ></asp:Label> 
                        </ItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn HeaderText="Forum Categories" UniqueName="TemplateColumn1">  
                        <ItemTemplate> 
                        <asp:HyperLink id="link1" Text='<%# Eval("CATEGORYNAME")%>'  NavigateUrl='<%# Eval("[LINK]")%>' runat="server" > </asp:HyperLink> 
                        <asp:Label ID="descr" runat="server" Text='<%# Eval("Description")%>'></asp:Label> 
                        </ItemTemplate><HeaderStyle Font-Bold="True">  
                        </HeaderStyle> 
                        </telerik:GridTemplateColumn> 
                        </Columns> 
                        <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        </MasterTableView> 
                        <FilterMenu EnableTheming="True" Skin="Sunset">  
                        <CollapseAnimation Type="OutQuint" Duration="200">  
                        </CollapseAnimation> 
                        </FilterMenu> 
    <ClientSettings> 
        <ClientEvents OnRowClick="OnClientClick=&quot;javascript: return SetHidSelectedRows()&quot;" /> 
    </ClientSettings> 
    </telerik:RadGrid> 
in this Grid there is "CategoryID" and on RowDatabound event i hide this Column and it working. now in this Grid i have this

<asp:HyperLink id="link1" Text='<%# Eval("CATEGORYNAME")%>'  NavigateUrl='<%# Eval("[LINK]")%>' runat="server" > 
as shown above,when my user clicks the Hyperlink in the Grid, this will take the user to the Appropriate Page,its Good , and i want to save the "CategoryID" of the selected Hyperlink. Am open to suggestion, i
can still use the Button link and onclick and get the Category_id of the selected button list. Please note that in this grid there wont be any multi select.

Thanks
Shinu
Top achievements
Rank 2
 answered on 01 Feb 2010
1 answer
118 views
i am using RadGrid
i add a record through Form view i didint hit yet inset button ....
i just want to know how to collaps that form view in that Grid in code behind file
where as i know its default behavior of Form in Grid that after clicking at insert it will implicitly get closed
How to collapse a gird

Shinu
Top achievements
Rank 2
 answered on 01 Feb 2010
2 answers
153 views
I want to allow users to copy and past text from MS word. But I also need to limit how many words they can put it.

I am doing word count using

editor.Text.WordCount(); where word count is an extension method I wrote.

I am using Text insted of Content because I dont want to count all the fomatting in word count limit. And it is working fine on IE but not with firefox because firefox is adding all the word formatting in Text property. Below is what I was getting in text property. How can I make sure that all the text from word gets pasted without loosing any formatting and still be able to force a word count?

As you can see, i only entered "This is some test text that I m going to use to test rad text editor." in the textbox and when I submitted the form, this is what I got. Also I get this only when my app on the main server. If I test it using localhost, it works fine with firefox. Any ideas?

I tried to use StripFormattingOptions="MSWord"
but then I loose the formatting.

Thanks,

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} This is some test text that I m going to use to test rad text editor.
Kashif Imran
Top achievements
Rank 1
 answered on 01 Feb 2010
2 answers
308 views

Greetings,


First some background information:
I have a RadTextBox which accepts an employee id (if known). If the employee id is not known, there is a hyperlink button accompanying the RadTextBox, which opens up a search dialog in a RadWindow. In the RadWindow, the user can enter search criteria to filter a list of employees, which appear in a RadGrid. The leading field in the RadGrid contains a hyperlink that, when clicked, should do the following:
1. Close the RadWindow.
2. Set the value of the RadTextBox in the parent window.
3. Cause a postback in the parent window.

I’ve got most of it working, but have several questions.
1. Is it possible to set (via Javascript) the value of the RadTextBox in the parent window such that a postback would automatically occur (the RadTextBox specifies AutoPostBack=”true”)?
2. What is the correct way to set the input values associated to a RadTextBox? I was trying to use a generic solution that would work for other similar search dialogs; so I pass the Id of the RadTextBox through as a querystring parameter in the NavigateUrl attribute of the RadWindow. The following Javascript function is called when the RadWindow is closed (OnClientClosed attribute):

function onClientCloseLOV(oWnd, args) {

    var arg = args.get_argument();

    if (arg) {

        $get(arg.id).value = arg.value;

    }

}

Note: “arg.id” is the RadTextBox ID attribute in the parent window. The problem here is; if I subsequently click on the input field the value disappears!

Ryan Bartsch
Top achievements
Rank 1
 answered on 31 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?