Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
189 views
Greetings,

I've been trying to something similar as described in this url (http://www.telerik.com/help/aspnet-ajax/grddefaulteditmodeforgriditemsoninitialload.html) but with a different approach.

I've got a Radgrid with an EditForm, which besides textboxes and other controls, has another Radgrid that needs to be in edit mode on load.

The problem is that I can't directly make reference to this lattest Radgrid because of being inside an edit form.

<telerik:RadGrid runat="server" EditMode="EditForms">
 <EditFormSettings EditFormType="Template">
  <FormTemplate>
   <table>
    <tr>
     <td>                                        
      <telerik:RadGrid runat="server">
       <MasterTableView CommandItemDisplay="Top" EditMode="InPlace">
        <Columns>
         <telerik:GridBoundColumn HeaderText="Company"/>
         <telerik:GridCheckBoxColumn UniqueName="View" HeaderText="View" DataField="View"/>
         <telerik:GridCheckBoxColumn UniqueName="Edit" HeaderText="Edit" DataField="Edit"/>
        </Columns>
       </MasterTableView>
       <ClientSettings Selecting-AllowRowSelect="true"/>
      </telerik:RadGrid>
     </td>
    </tr>
   </table>
  </FormTemplate>
 </EditFormSettings>                    
</telerik:RadGrid>

Any thoughts would be appreciated.

Best Regards,

Francisco
Princy
Top achievements
Rank 2
 answered on 13 Dec 2010
2 answers
139 views
Hi,

I have a server ajax control which inherits RadToolBar control, with OnInit event I popolate items from XML file (the file was taken from the Demo website, so I assume it's format is correct) 
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports Telerik.Web.UI
  
  
  
Public Class GridCommandItem
    Inherits RadToolBar
    Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
        MyBase.OnInit(e)
        Me.LoadContentFile("ToolBar.xml")
    End Sub
     
End Class

When I place the server control on page and run the application I got the following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------
  
<ToolBar xmlns=''> was not expected. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
Exception Details: System.InvalidOperationException: <ToolBar xmlns=''> was not expected.
  
Source Error
  
  
Line 14:     Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
Line 15:         MyBase.OnInit(e)
Line 16:         Me.LoadContentFile("ToolBar.xml")
Line 17:     End Sub
Line 18:    
   
  
Source File: D:\Profiles\bah029\My Documents\Visual Studio 2008\Projects\CommonServerControls\GridCommandItem.vb    Line: 16 
  
Stack Trace: 
  
  
[InvalidOperationException: <ToolBar xmlns=''> was not expected.]
   Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderGridCommandItem.Read1_GridCommandItem() +259
  
[InvalidOperationException: There is an error in XML document (2, 2).]
   System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) +613
   System.Xml.Serialization.XmlSerializer.Deserialize(TextReader textReader) +102
   Telerik.Web.UI.ControlItemContainer.LoadXml(String xml) +113
   Telerik.Web.UI.RadToolBar.LoadContentFile(String xmlFileName) +99
   CommonServerControls.GridCommandItem.OnInit(EventArgs e) in D:\Profiles\bah029\My Documents\Visual Studio 2008\Projects\CommonServerControls\GridCommandItem.vb:16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378
  
  

any idea how to solve it?

Avidan
Simon
Telerik team
 answered on 12 Dec 2010
1 answer
125 views
I have tried everthing to get the SelectedValue of a radCombo to work, but it always seems to have a value of "1".
I have a simple scenario, a radcombo in ASP.FormView in edit mode.

The combo definition looks like:
<telerik:RadComboBox ID="EmployeePotentialCombo" runat="server" DataSourceID="EmployeePotentialList"
    DataValueField="eptID" Text="Employee Potential:" DataTextField="eptDesc" Width="350px"
    EmptyMessage="Select Employee Potential" Label="Potential:">
</telerik:RadComboBox>

The list populates correctly.

First I tried to set the value this way:
<telerik:RadComboBox ID="EmployeePotentialCombo" runat="server" DataSourceID="EmployeePotentialList"
    DataValueField="eptID" Text="Employee Potential:" DataTextField="eptDesc" Width="350px"
    EmptyMessage="Select Employee Potential" Label="Potential:" SelectedValue='<%# Bind("eptID") %>'>
</telerik:RadComboBox>

With no results. Next attempt was with code-behind:
protected void FormView1_DataBound(object sender, EventArgs e)
{
    DataRowView drv = (DataRowView)FormView1.DataItem;
    RadComboBox combo = (RadComboBox)FormView1.FindControl("EmployeePotentialCombo");
    combo.SelectedValue = drv["eptID"].ToString();
   // combo.SelectedValue = "3";
}

Setting the value from the DataRowView (null) or forcing a value to "3" had no effect, SelectedItemValue was always "1"

Any ideas?

Update: The first scenario worked OK except for nul values from the database. Is there a way to show the empty message for nulls?
Simon
Telerik team
 answered on 12 Dec 2010
7 answers
245 views
Hello All,

I have a default button which clicks on enter key press. But if the cursor is on the RadCombo box then the enter key is not working. Please help me. I am writing the code for this.

<asp:Panel ID="Panel1" runat="server" DefaultButton="btnUpdate">
    <div style="position: relative; height: 135px; width: 100%; padding-top: 5px; background-color: #ffe5ad;">
        <asp:ValidationSummary ID="VSReqTrak" ShowSummary="false" HeaderText="Please complete the required fields."
            ShowMessageBox="true" runat="server" />
        <span style="position: absolute; top: 20px; left: 0px; width: 120px; text-align: right;">
            Category: </span>
        <asp:RequiredFieldValidator ErrorMessage="" Text="*" ControlToValidate="rcbCategory"
            Style="position: absolute; top: 21px; left: 123px; height: 20px;" ID="RFVCategory"
            runat="server" SetFocusOnError="true" Display="Dynamic"></asp:RequiredFieldValidator>
        <telerik:RadComboBox ID="rcbCategory" runat="server" Width="210px" Style="position: absolute;
            top: 20px; left: 140px;" MarkFirstMatch="true" DataSourceID="ObjCategories" DataTextField="CategoryName"
            AllowCustomText="true" SelectedValue='<%# DataBinder.Eval( Container, "DataItem.CategoryID" ) %>'
            DataValueField="CategoryID">
        </telerik:RadComboBox>
        
            <asp:ImageButton ID="btnUpdate" ToolTip="Update" ImageUrl="~/Images/Update.gif" Text="Update"
            Style="position: absolute; top: 90px; left: 650px;" runat="server" Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>'
            CommandName="Update" />
        <asp:ImageButton ID="btnCancel" ToolTip="Cancel" ImageUrl="~/Images/Cancel.gif" Text="Cancel"
            Style="position: absolute; top: 90px; left: 680px;" runat="server" CausesValidation="False"
            CommandName="Cancel" />
    </div>
</asp:Panel>
Simon
Telerik team
 answered on 12 Dec 2010
1 answer
153 views
Hi,

I get the below error if I try to save my Radmenu to a Viewstate . Can you let me know how to make it serializable ?

Type 'Telerik.Web.UI.RadMenu' in Assembly 'Telerik.Web.UI, Version=2010.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable

Thanks
Bino
Simon
Telerik team
 answered on 12 Dec 2010
1 answer
137 views
Due to client request...
We are using the AutomaticLoadOnDemand with an XML datasource so that only 4 options show at anytime. This works great.
What they have asked for is that the dropdown starts one line or so above the textbox control used to type the initial entry.
User types in the field, clicks the down arrow and we can shift the dropdown to an absolute position of "x" pixels above or at the exact position of the top/left corner of the dropdown.

I have not seen anywhere in the documentation where I can adjust the start position of the dropdown to an absolute position or a relative position based on the x/y of the textbox - any suggestions?
Simon
Telerik team
 answered on 12 Dec 2010
3 answers
108 views
Hello,

I have two Questions:

1. I have a TreeView in Combobox.
    Each node in the treeview contain checkbox.
    The treeview has footer that has a button named "OK".
    I would like to check some nodes and only when i click on the "OK" button,
    all the node's text that i have checked will show on the input field of the combo box with the ";" seperator.

    I succeeded to get the combobox instance from the javascript function when i click on the "OK" button, but
    i don't know how to get the treeview instance or the nodes that have checked, before the clicking.

    Here is the js function:

    
function approveClick(comboBox)
{
  //Here i would like to get the checked nodes,
  //from the treeview and then to concatenate the nodes text value,
  //to the input field like:
  
    comboBox.set_text("node1;node2;node3");
  
    comboBox.hideDropDown();
}

    Any suggestions?

2. How can i paint the combobox's dropdown area background (By default its white).

Thanks,

Oren
Udi
Top achievements
Rank 1
 answered on 12 Dec 2010
5 answers
517 views
Hello,
I have faced some problem to get the number of filtered results Auto-fetched by Radgrid, here is my scenario:

I have a radgrid, on its clientRowselected event, the row details will be copied to a text area; it is a control outside the grid, but when i want to filter the results by any criteria, The text area should be cleared, i tried to get the number of filtered results but I couldn't, and RadGrid.Items.Count has a value of the same umber of records without filteration even VirtualItemCount didn't work for me..

Any Idea !
HananJ
Top achievements
Rank 1
 answered on 12 Dec 2010
0 answers
60 views
Cannot allowed to enter or key press a char in Asp.net text box in asp.net MVC 2 application. It raises the following error when we press a key on the textbox every time.

Microsoft JScript runtime error: 'undefined' is null or not an object

Please give your suggestion if anybody face same issue. The textbox is placed inside the Telerik MVC grid control for filtering.


Thanks.
hasan
Top achievements
Rank 1
 asked on 12 Dec 2010
4 answers
478 views
Hi all,

     I want to develop a webpart based on RadGrid in order to improve list view and add/modify/delete items in a SharePoint list, just like the below demo:

     http://sharepoint.telerik.com/Products/RadControlsAjax/Pages/RadGrid.aspx

     How to accomplish this functionality?


Thank you in advance

Jerry
Vishwajit
Top achievements
Rank 1
 answered on 11 Dec 2010
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
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
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?