Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
176 views
Hey,

I'm using the RadComboBox, if I select an user out of the list it works all fine, but if this user contains é and I wanna change to any other user and click therefor again on the combo box an alert appears. (See attached pic)
Do you know how to avoid this?

Greetings
Thomas Luck
Top achievements
Rank 1
 answered on 24 Nov 2010
3 answers
192 views
Hello all,

   How do I bind the RadEditors content to a formview "field" value. e.g. the FCKEditor equivalent is

<

 

FCKeditorV2:FCKeditor ID="CallDescriptionTextBox" runat="server" Value='<%# Bind("CallDescription") %>' Width="100%" />

 


Thank you in advance
Rumen
Telerik team
 answered on 24 Nov 2010
10 answers
197 views
See the grid ...
<telerik:RadGrid ID="RadGrid1" runat="server"
    AutoGenerateColumns="false"
    OnNeedDataSource="RadGrid1_NeedDataSource">
    <MasterTableView HierarchyLoadMode="Client" ClientDataKeyNames="LastName, FirstName, Age">
        <Columns>
            <telerik:GridBoundColumn UniqueName="Col1" DataField="LastName" />
            <telerik:GridBoundColumn UniqueName="Col2" DataField="FirstName" />
        </Columns>
        <NestedViewTemplate>
            <telerik:RadTextBox ID="txtAge" runat="server" Label="Age:" Text='<%# Bind("Age") %>' />
            <telerik:RadTextBox ID="txtSex" runat="server" Label="Age:" Text='<%# Bind("Sex") %>' />
        </NestedViewTemplate>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true" />
        <ClientEvents OnRowSelected="GridRowSelected" OnRowCreated="GridRowCreated" />
    </ClientSettings>
</telerik:RadGrid>

See the JavaScript ...

function GridRowCreated(sender, e) {
    var x = e.get_gridDataItem();
    alert(x.get_nestedViews().length);
}

See my confused face when running the page and getting a zero back as result of nestedViews().length for each row.

What I actually want to be able to do is get at the controls inside the nestedView for a given row on RowClick. But I've rather fallen at the first fence.

-- 
Stuart
Tsvetina
Telerik team
 answered on 24 Nov 2010
2 answers
99 views
I am working my way through the modification of the "black" menu skin for a custom look in my application.  My first set of changes is for only changing the color of text on the items (from green to a gold color).

I have successfully changed the color of the text (and also changed the alignment of the text to 'left').  Now I need to change the color of the arrow ">" that is used when a menu item contains its own items.  As with the original "black" skin text, this arrow also shows in green.  The only place I can find where this might be possible is in the actual graphic file rmSprite.png.  I cannot find anyplace in the Menu.name.css style sheet file that might be applicable.

Is this the correct place to modify the color of the ">" or am I missing something else that should be changed?

Thanks in advance!

Lynn
Lynn
Top achievements
Rank 2
 answered on 24 Nov 2010
21 answers
216 views
I'm not sure if I am just doing something wrong but thought maybe someone could help me. I am using visual style builder to help tweak the colors for the simple skin (Menu Control) . I change the colors I want, I see them reflected on the screen. I click the save button and then when I download the file, the css values are from the original colors in the simple skin. Am I missing a step?
Vasil Yordanov
Telerik team
 answered on 24 Nov 2010
1 answer
81 views
Hi,

I am dyanamically adding the entire table to the RadEditor1.content
i.e.
<table width=100%"><colgroup><col /></colgroup>
  <tbody>
    <tr>
      <td>Name</td>
    </tr>
  </tbody>
</table>

It is giving error in PDF.

If I directly add this to content and then export it, it works.
But when I add it code-behind, it is giving error.

Thanks
Piyushkumar
Rumen
Telerik team
 answered on 24 Nov 2010
4 answers
251 views
I have a RadCalendar in MultiView mode, with AutoPostback set to true.  Multiple selections are enabled.

I want to cancel postback in response to a date click and change the
CSS class of the DOM Element (the td cell).  I'm using the client
side code shown below.  It's hooked to the OnDateClick event.

The event handler cancels postback as expected.  The first alert displays
class=radCalDefault_Default.  The second alerts class=Red.  When the event handler
completes however, the IE Developer Toolbar shows that the cells CSS class
has returned to radCalDefault_Default.

Can you advise as to how to change CSS classes on the client so that they persist?

function OvernightCalendar_OnDateClick(calendarInstance, args)
{
  var renderDay = args.get_renderDay();

  alert('Class Name: ' + renderDay.DomElement.className);
  renderDay.DomElement.className = 'Red';
  alert('Class Name (After): ' + renderDay.DomElement.className);
  args.set_cancel(true);
  return false;
}

Also: Is there a way to get Intellisense on the Telerik javascript objects?

Best,
Bob
Dimo
Telerik team
 answered on 24 Nov 2010
1 answer
64 views
Hi, I am using CustomFileSystemProvider to display the files from a shared drive on our intranet website. However, when I set the network paths in the mappings file, my understanding is that it uses the credentials of the logged in user (I have Windows authentication set up for this site). But we would like to take away the permissions that individual users have on the shared network drive and use the RadFileExplorer with a proxy user account. How do I set it up to use the proxy user?
Thanks,
Fiko
Telerik team
 answered on 24 Nov 2010
1 answer
105 views
Hi,

I've been trying  to use a treeview in a combobox, and it works fine when the page initially loads. But, once I open the dropdown and choose a node from the treeview, the next time I open the dropdown the only value that I see in there is the selected node (no treeview or any other values)!

The browser tells me that there is an error in the ClientDropDownOpenedHandler javascript function and gives me the error message: 'null' is null or not an object.

I'm literally just copying over the Travelismo code and running it in Visual Studio, so I've not written any other code.

Please help me out and let me know what I'm doing wrong.

I'm using DLL version 2009.2.616.20 (Q2 2009).

Thanks,
Jay
Dimitar Terziev
Telerik team
 answered on 24 Nov 2010
4 answers
309 views
I'm binding the radgrid to a object datasource
In the select method i return a populated DataTable as seen below.
The columns are created dynamically and given a specific type because i want to use the radgrid filter.

public DataTable SelectMethod(string filterExpression, string sortExpression, string strDoctype, int maximumRows, int startRowIndex)
{
    DataTable oTable = new DataTable();
    Doctype oDoctype = new Doctype();
    bool bSuccess = true;
 
    Hashtable oInfo = new Hashtable();
    try
    {
        oDoctype = DoctypeADO.Retrieve_byDoctypeID(strDoctype);
    }
    catch
    {
        bSuccess = false;
    }
 
    if (bSuccess)
    {
        oTable.Columns.Add("DocumentID", typeof(String));
        oTable.Columns.Add("DoctypeID", typeof(String));
 
        XmlDocument oDoc = new XmlDocument();
        oDoc.LoadXml(oDoctype.DoctypeXML);
 
        foreach (XmlNode oNode in oDoc.DocumentElement)
        {
            oInfo.Add(oNode.Name, oNode.ChildNodes[0].InnerText);
        }
 
        ICollection oColl = oInfo.Keys;
        List<string> oBuilder = new List<string>();
        foreach (string strkey in oColl)
        {
            string type = string.Empty;
 
            switch (oInfo[strkey].ToString())
            {
                case "Boolean":
                    {
                        type = "Bit";
                        oTable.Columns.Add(strkey, typeof(Boolean));
                        break;
                    }
                case "Byte":
                    {
                        type = "smallint";
                        oTable.Columns.Add(strkey, typeof(Byte));
                        break;
                    }
                case "DateTime":
                    {
                        type = "datetime";
                        oTable.Columns.Add(strkey, typeof(DateTime));
                        break;
                    }
                case "Double":
                    {
                        type = "decimal";
                        oTable.Columns.Add(strkey, typeof(Double));
                        break;
                    }
                case "Int16":
                    {
                        type = "smallint";
                        oTable.Columns.Add(strkey, typeof(Int16));
                        break;
                    }
                case "Int32":
                    {
                        type = "int";
                        oTable.Columns.Add(strkey, typeof(Int32));
                        break;
                    }
                case "Single":
                    {
                        type = "decimal";
                        oTable.Columns.Add(strkey, typeof(Single));
                        break;
                    }
                case "String":
                    {
                        type = "varchar(100)";
                        oTable.Columns.Add(strkey, typeof(String));
                        break;
                    }
                default: { break; }
            }
 
            oBuilder.Add("document_xml.value('(//Fields/" + strkey + "/Value)[1]','" + type + "') as " + strkey);
        }
 
        string strQuery = @"select
                        document_id as DocumentID,
                        doctype_id as DoctypeID,
                        " + String.Join(",", oBuilder.ToArray()) +
                        @" from ( select row_number() over (order by document_id asc) as rownumber, *
                        from cs_document
                        where doctype_id = @doc_id
                        ) as test
                        where ROWNUMBER  between @nStart+1 and @nEnd";
 
        strQuery = AddFilter_Sorting(strQuery, filterExpression, sortExpression);
 
        oCommand = new SqlCommand(strQuery);
 
        oCommand.Parameters.Add(
            new SqlParameter
            {
                DbType = DbType.String,
                ParameterName = "doc_id",
                Value = strDoctype
            });
 
        oCommand.Parameters.Add(
            new SqlParameter
            {
                DbType = DbType.Int32,
                ParameterName = "nStart",
                Value = startRowIndex
            });
 
        oCommand.Parameters.Add(
            new SqlParameter
            {
                DbType = DbType.Int32,
                ParameterName = "nEnd",
                Value = startRowIndex + maximumRows
            });
 
        oCommand.Connection = oConnection;
 
        try
        {
            oConnection.Open();
            oReader = oCommand.ExecuteReader();
 
            while (oReader.Read())
            {
                object[] data = new object[oTable.Columns.Count];
 
                for (int i = 0; i < oTable.Columns.Count; i++)
                {
                    data[i] = oReader[oTable.Columns[i].ColumnName];
                }
                 
                DataRow oRow = oTable.NewRow();
                oRow.ItemArray = data;
                oTable.Rows.Add(oRow);
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
 
    return oTable;
}

protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["filterExpression"] = RadGrid1.MasterTableView.FilterExpression;
e.InputParameters["sortExpression"] = RadGrid1.MasterTableView.SortExpressions.GetSortString();
}

Here is the grid and objectdatasource from the aspx

<telerik:RadGrid ID="RadGrid1" runat="server" Width="100%" GridLines="None" AllowPaging="true"
                       AutoGenerateColumns="true" AllowFilteringByColumn="false" PageSize="10" AllowSorting="true"
                       Skin="Outlook" DataSourceID="ObjectDataSource1">
                       <MasterTableView AllowCustomSorting="true" OverrideDataSourceControlSorting="true">
                           <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                           <Columns>
                               <telerik:GridTemplateColumn UniqueName="Uniq" HeaderText="Check" AllowFiltering="False">
                                   <ItemTemplate>
                                       <asp:CheckBox ID="check" runat="server" />
                                   </ItemTemplate>
                               </telerik:GridTemplateColumn>
                           </Columns>
                           <HeaderStyle VerticalAlign="Middle" />
                           <ItemStyle VerticalAlign="Middle" />
                           <FilterItemStyle VerticalAlign="Middle" />
                       </MasterTableView>
                   </telerik:RadGrid>
                   <asp:ObjectDataSource ID="ObjectDataSource1" TypeName="WebApplication1.DatabaseHandle.ObjectSource"
                       EnablePaging="true" SelectMethod="SelectMethod" SelectCountMethod="MySelectCount"
                       runat="server" OnSelecting="ObjectDataSource1_Selecting">
                       <SelectParameters>
                           <asp:Parameter Name="filterExpression" Type="String" />
                           <asp:Parameter Name="sortExpression" Type="String" />
                           <asp:ControlParameter ControlID="hidden_doctype" DbType="String" PropertyName="Value"
                               Name="strDoctype" />
                       </SelectParameters>
                   </asp:ObjectDataSource>

The problem is that when after adding a populated datetime column in the datatable it throw's me the following error at runtime :
With any other columns i have no problem.
I'm guessing it's throwing this exception when it's adding the calendar buttons in the filterzone of the grid.

The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
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.Web.HttpException: The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 
[HttpException (0x80004005): The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.]
   System.Web.UI.ControlCollection.Add(Control child) +8680983
   Telerik.Web.UI.GridDateTimeColumn.GetSharedCalendar() +192
   Telerik.Web.UI.GridDateTimeColumn.SetupFilterControls(TableCell cell) +2169
   Telerik.Web.UI.GridColumn.InitializeCell(TableCell cell, Int32 columnIndex, GridItem inItem) +5498
   Telerik.Web.UI.GridBoundColumn.InitializeCell(TableCell cell, Int32 columnIndex, GridItem inItem) +50
   Telerik.Web.UI.GridItem.Initialize(GridColumn[] columns) +142
   Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +939
   Telerik.Web.UI.GridTableView.CreateFilteringItem(Boolean useDataSource, GridColumn[] copiedColumnSet, GridTHead thead) +146
   Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +1495
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +777
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +38
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +351
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
   Telerik.Web.UI.GridTableView.OnPreRender(EventArgs e) +57
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

If i set the datetime column to string per example it works perfectly.
bogdan
Top achievements
Rank 1
 answered on 24 Nov 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
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?