Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
171 views
Hello,

For a ComboBox like this:

<telerik:RadComboBox ID="Persons" runat="server" DataTextField="Name" DataValueField="Id" MarkFirstMatch="true" AppendDataBoundItems="true">
    <Items>
        <telerik:RadComboBoxItem runat="server" Value="0" Text="" />
    </Items>
</telerik:RadComboBox>

When I select an item then click somewhere else, the combobox seems to reset or clear the selection. This is happening with various comboboxes on my page.

How can I get the selected item to stay where it should? There is no postback or anything. This happens on the client side and the control binds with data with no issue.

Richard
Richard Weeks
Top achievements
Rank 2
 answered on 29 Mar 2011
1 answer
176 views
I have a telerik radgrid with paging enabled and attaching the oncommand client event messes up paging.
Without the oncommand event, I am able to click on page numbers on the pager and it properly shows the selected page number text in bold.
But if I attach a oncommand event, it does not highlight the selected page number at all. And all the page numbers remain as hyperlinks including the selected page. Here is the sample code to reproduce this issue. Can some one please let me know if there is a fix ? I need to be able to trap the commands and cancel them if possible before postback happens to the server. And pagination is very critical for me as well. I tried to attach the oncommand event handler in the server side code(on page load event) but it doesnt help.

<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
  <script type="text/javascript">
      function onInqGridCmd(sender, eventArgs) {
      }
   </script>
</telerik:RadCodeBlock>   
 
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" EnableEmbeddedSkins="true" Skin="Gray" AllowSorting="True"
    AllowPaging="True" PageSize="5" runat="server" GridLines="None" Width="100%">
    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
    <ClientSettings>
        <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true"   />
        <ClientEvents  OnCommand="onInqGridCmd"></ClientEvents>
    </ClientSettings>
     
</telerik:RadGrid>
 
<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM              Customers" runat="server"></asp:SqlDataSource>

Appreciate your help.
Daniel
Telerik team
 answered on 29 Mar 2011
4 answers
235 views
Hi all,

I have a custom command created like so:

DockCommand settingsCommand = new DockCommand();
settingsCommand.Name = "Local Settings";
settingsCommand.Text = "Local Settings";
settingsCommand.CssClass = "LocalSettings";
settingsCommand.AutoPostBack = false;
settingsCommand.OnClientCommand = "ShowLocalSettings";
Commands.Add(settingsCommand);

function ShowLocalSettings(sender, eventArgs) {
    radDock = sender;
    var oWindow = window.radopen(null, "LocalSettingsWindow");
    oWindow.center();
}


The RadWindow appears fine and everything works as expected, but, in the background I can see my page refreshing when I click the custom command button -- even though autopostback is set to false. My RadWindow doesn't flash, and it's modal so the background can't be interacted with, but it is still distracting to see it refreshing once when my RadWindow is already displayed.

Any ideas on why this would be happening?

Sean
Top achievements
Rank 2
 answered on 29 Mar 2011
2 answers
88 views
Hello,

I am creating raddocs dynamically. I do have dynamic radzones. Also I wish to create raddocs with varible height dynamically. Its height should get varied as per the contents inside it.

If I do not set the height of raddoc while creating it dynamically then it set to some default value and displayes scrollbar.

Prayag
prayag ganoje
Top achievements
Rank 1
 answered on 29 Mar 2011
2 answers
140 views
Hallo community, I want to integrate mails into my webapplikation (like the demo). What mailserver is best to do this? Thank you!
Bernhard Rosenfelder
Top achievements
Rank 1
 answered on 29 Mar 2011
1 answer
125 views
Hi,

I have never posted before, I hope this is the correct place. My markup is below. When I click the edit button on a row and make a change in the Edit form, no update events are raised on the datasource . I have copied the sample several times from the website but I still cannot get my events wired up properly. I am using WCSF and am quite familiar with this framework. The datasource seems to work fine if I use an asp.net GridView. Any help would be appreciated.
Thanks

    <pp:ObjectContainerDataSource ID="ds1" runat="server" 
        DataObjectTypeName="Foo.Infrastructure.Interface.Object" 
        ondeleted="ds1_Deleted" UsingServerPaging="True" UsingServerSorting="True" 
        oninserted="ds1_Inserted" onselecting="ds1_Selecting" onupdated="ds1_Updated" />
    <telerik:RadGrid 
        ID="grid" runat="server" GridLines="None" AutoGenerateColumns="False"
        AllowAutomaticInserts="True"
        AllowAutomaticUpdates="True"
         PageSize="100" AllowPaging="True" AllowSorting="True"
        Width="100%" 
        AutoGenerateEditColumn="True" CellSpacing="0" DataSourceID="ds1">
        <MasterTableView CommandItemDisplay="Top" EditMode="EditForms" HorizontalAlign="NotSet"
            AllowAutomaticInserts="false" AllowAutomaticUpdates="true" InsertItemDisplay="Top"
            runat="server" DataSourceID="ds1">
            <Columns>
                <telerik:GridBoundColumn DataField="Id" HeaderText="Id" DataType="System.Int32" />
                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" DataType="System.String" />
                <telerik:GridBoundColumn DataField="ApplicationDomain" HeaderText="Domain" DataType="System.String" />
                <telerik:GridBoundColumn DataField="DefaultTheme" HeaderText="Theme" DataType="System.String" />
                <telerik:GridBoundColumn DataField="DateCreated" HeaderText="Created" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
                <telerik:GridBoundColumn DataField="DateOnline" HeaderText="Online" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
                <telerik:GridBoundColumn DataField="DateOffline" HeaderText="Offline" DataType="System.DateTime" DataFormatString="{0:MMM dd yyyy}" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
Ian
Top achievements
Rank 1
 answered on 29 Mar 2011
2 answers
134 views
I have a RadGrid with a GridButtonColumn that has CommandName="Delete".  When I click this button, the events for ItemCommand and DeleteCommand both fire.  In the ItemCommandEvent I run some code to delete the record from the database.

The record gets deleted from the DB, but the row still exists on the UI.  I've tried calling the Rebind() and DataBind() methods on my radgrid, but that makes no difference.

I've also tried using a GridClientDeleteColumn instead of the GridButtonColumn.  This causes the row to disappear from the UI, but no server-side events fire, so I cannot actually delete the data from the DB.
Jayd
Top achievements
Rank 1
 answered on 29 Mar 2011
5 answers
114 views
Hello,

Im trying to use modernizr.js in my application. It attaches classes to the <html> tag. When the page loads Telerik wipes out those classes and adds its own.

How do i prevent this? is there an option to append the classes without overwriting the ones im setting?

please advise.

Thank you
Niko
Telerik team
 answered on 29 Mar 2011
1 answer
50 views
For some unknown reason, my RadUpload 2009.1.527.35 (ASPNET AJAX Q1 2009) has malfanctioned both in my production and development servers on an application that has been online for years (with regular updates but nothing file related recently)

I have re-downloaded and installed the .MSI on my local machine and the live Upload samples are not working correctly either. The files (2MB - 99MB) upload fine, but there is no progress indicators.

If anyone else is recently having this problem, speak up so I know I am not crazy.

Local Machine: Win7, Asp.net 3.5, VS 2008 Web Server
Production: Win Server 2003 , Asp.net 2.0, IIS 6
Genady Sergeev
Telerik team
 answered on 29 Mar 2011
3 answers
230 views
Hello,

If I set the text of a RadTextBox to something like the following:
"\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text"

I believe there should be three empty lines and then on the fourth, "Some text".  This is how the standard asp.net textbox works when in multiline mode.

If I modify the text to:
"a\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text"
Then both textboxes behave the same.

The problem I have is that after a postback, if I intended there to be three empty lines before the text, only two are displayed on the page.  Thus, only two are returned in the Viewstate.  Upon a second postback, only one line exists in the Viewstate and so forth until non-space characters are all that is left at the beginning.

I have mocked up a simple page showing this issue.  After each click of the 'Postback' button another line is removed.  The Asp.Net textbox works just fine.  Is there a simple way to fix this?

<body>
    <form id="form1" runat="server">
    <div>  
        <telerik:RadScriptManager ID="ScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadTextBox ID="txtMessage" runat="server" TextMode="MultiLine" Rows="10" Columns="200"/>
        <asp:TextBox ID="txtASPMessage" runat="server" TextMode="MultiLine" Rows="10" Columns="200"></asp:TextBox>
        <br />
        <asp:Button ID="btnPost" runat="server" onclick="btnPost_Click" Text="PostBack" />
    </div>
    </form>
</body>

    protected void Page_Init(object sender, EventArgs e)
    {
        txtMessage.Text = "\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text";
        txtASPMessage.Text = "\r\n\r\n\r\nSome text\r\n\r\n\r\nSome more text";
    }

    protected void btnPost_Click(object sender, EventArgs e)
    {
    }


Thank you in advance!

Chris
Maria Ilieva
Telerik team
 answered on 29 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?