Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
283 views
I have a rad combo box that I bind in my code with a data table. Whenever I select an item and then click out of the combo box, it doesn't keep the item I had picked selected. You can see my problem here http://michael.sprayapplications.com/temp.aspx . Just pick an item and then click out of the dropdown. Here is my aspx code

<telerik:RadComboBox ID="salesInput" runat="server" Width="200px" MarkFirstMatch="true">
</telerik:RadComboBox>

here's my vb code behind and the function it calls
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        If (Not Page.IsPostBack) Then
            'populate the dropdown
            Dim tableOfData As DataTable = MyFunctions.createCrewDeleteTable()
            salesInput.DataSource = tableOfData
            salesInput.DataTextField = "Salesman"
            salesInput.DataValueField = "CrewId"
 
            salesInput.DataBind()
        End If
End Sub

And the function
    'this function gets the data for the crew dropdown
    'this sub returns a data table to bind to the dropdown
    Public Shared Function createCrewDeleteTable()
 
        'a new data table
        Dim table As DataTable = New DataTable()
        table.Columns.Add("Salesman")
        table.Columns.Add("CrewId")
 
        Dim type
 
        'my sql connection
        Dim myConn As New Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("connection").ToString)
 
        'the name of the stored procedure
        Dim strSQL = "select FirstName+' '+LastName as Name, CrewType, CrewId from Crew where Deleted <> 'yes' " & _
        "AND crewid > 1 order by LastName, Firstname"
 
        Try
 
            myConn.Open()
            Dim readCommand As New Data.SqlClient.SqlCommand(strSQL, myConn)
 
            'while we have rows from the stored procedure
            'we will add them to a data table
            Dim cdr As SqlDataReader = readCommand.ExecuteReader()
            While cdr.Read()
 
                If (cdr(1).ToString = "3") Then
                    type = "Salesman"
                ElseIf cdr(1).ToString = "2" Then
                    type = "Crew Chief"
                Else
                    type = "Crew"
                End If 'if cdr(2)
 
                If (cdr.Item(0).ToString <> "") Then
 
                    table.Rows.Add(New String() {cdr.Item(0) & " - " & type, cdr.Item(1)})
 
                End If
 
            End While 'while cdr.Read()
 
        Catch ex As Exception
 
        End Try
        myConn.Dispose()
 
        Return table
 
End Function



Cat Cheshire
Top achievements
Rank 1
 answered on 17 Aug 2011
1 answer
30 views
I have a radpane, and inside I have a splitter.

I have a custom jquery function that when an icon is clicked, it shows/hides a html table.   The problem is when the table is visible, a scrollbar appears.  How can I auto-expand the radpane section and auto-shrink when the html table is shown/hidden?
Marin Bratanov
Telerik team
 answered on 17 Aug 2011
1 answer
111 views
I'm trying to assign a ASPX page, which returns a streamed PDF, to a RadWindow.
This is working in Chrome and FF, but not in IE.

I have seen some threads in this forum about similar topics,
but still not clear to me if this is a supported scenario or not (-> it works).
And what would be the best solution.

Thanks for clarifying
Eric


Marin Bratanov
Telerik team
 answered on 17 Aug 2011
1 answer
61 views
Hi all,

I was wondering if there was a form of custom dictionary that would allow the detection of common abbreviations and suggest their expanded version.

For example.

IBM    International Business Machines
mph    miles per hour

etc etc.

As it's not really a phoenetic expansion, I'm not sure where to start.


Thanks,


Alan
Marin Bratanov
Telerik team
 answered on 17 Aug 2011
1 answer
207 views
In one of my form @ page load ievent i set radeditor visible=false,
but in that page after some clientside click event i set radeditor visible=true.

For this i use custom dictionarysuffix &
spellchecksettings-spellcheckprovider="PhoneticProvider"

at that time spell check raise me an error :
The spell check command not implemented yet..

But it works fine in other page which having rad editor visible=true

my code for that ,

 
<TELERIK:RADEDITOR stripformattingoptions="NoneSupressCleanMessage, Span" id="FTBGoal"
                                                           visible="true" enabled="true" editmodes="Design" height="140px" width="650px"
                                                           toolsfile="~/App_Themes/RadEditorTools.xml" dialoghandlerurl="Telerik.Web.UI.DialogHandler.axd"
                                                           spellchecksettings-ajaxurl="Telerik.Web.UI.SpellCheckHandler.axd" runat="server"
                                                           bordercolor="#333333" borderstyle="Solid" borderwidth="1px" spellchecksettings-spellcheckprovider="PhoneticProvider">
                                                           <CSSFILES>
                                                               <TELERIK:EDITORCSSFILE value="~/App_Themes/RadEditor.css" />
                                                           </CSSFILES>
                                                       </TELERIK:RADEDITOR>
   <TELERIK:RADSPELL id="RadSpell1" runat="server" buttontype="none" />
   <script type="text/javascript">
       function check(b) {
           Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor) {
           var spell = GetRadSpell('<%= RadSpell1.ClientID %>');
               spell.spellCheck(new PrometheusTextSource(editor));
               return false;
           }
           var PrometheusTextSource = function(editor) {
               this._editor = editor;
               this.get_text = function() { return this._editor.get_html(); };
               this.set_text = function(value) { this._editor.set_html(value); };
           }
       }
</script>
Marin Bratanov
Telerik team
 answered on 17 Aug 2011
3 answers
81 views
HI
I'm using radcontrols in my asp.net website.
And these controls visually and functionality wise nice.

I have one scenario .
I have radpanelbar with 4 panel items.
each item contains one radgrid.
Now I'm binding every grid with theie needdatasource event.
My problem is suppose user select first item  can go through radgrid paging at pageindex 5 and if he collapse the current panlelitem and expand other and comes expand the previous one still he will see the radgrid with pageindex 5.
So I want bind the grid while expand the panel item.

Hope u understand my problem.

please help me as early as possible.
Nikolay Tsenkov
Telerik team
 answered on 17 Aug 2011
3 answers
263 views
Hi Telerik,

This is from Stack Overflow, sorry for the copy-paste.

I have a dashboard web application. It contains some controls on it which are sized based on the browser and are also resizeable by the user. They are dynamically created and, as such, I persist their dimensions through page postbacks by storing their state in Session and in a database.

When my dashboard first loads there is a chance that I am pulling data out of the Database onto a monitor which is not the same size as when the data was written to the Database. The controls need to be resized proportional to how they were before. Fortunately, it appears that the controls are able to resize themselves to the correct, proportional dimensions if they believe they need to re-calculate their dimensions.

As such, on first page load, I would like to simulate the browser resizing. Is it possible to do something like this in javascript?


So, what I've done is this:

protected void Page_Load(object sender, EventArgs e)
{
    RegenerationManager.Instance.RegenerateDockContents();
    //Reload controls once to have them auto-detect browser settings.
    if (!IsPostBack) ScriptManager.RegisterStartupScript(Page, Page.GetType(), "KEY01", "ForceResize();", true);
}

function ForceResize() {
 
    setTimeout(function () {
        window.onresize = function () { alert('Thanks, its resized!!'); };
 
        $(window).resize();
    }, 100);
}

The window's onresize event is confirmed to be firing, but I do not see the controls on the page respond in the same way that they do when I click the shrink/expand browser window icon in the upper right hand corner of the browser.

That is to say, I have OnClientResizing events for some RadPanes. These events do not fire when I call browser resize. What are they bound to?

I have tried forcing a postback on the RadPanes parent splitter. This does not seem to be sufficient enough to cause them to adjust their dimensions appropriately.

Thoughts?
Dobromir
Telerik team
 answered on 17 Aug 2011
4 answers
164 views
Hi,

I'm using the code behind to perform insert/update/delete. a sample is as follows

 

 

protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)

 

{
//insert something here

 

}

after inserting, the grid stays within the edit mode. Please let me know of the setting to exit and refresh the grid....also to refresh the grid after deletion.


thanks,
Minh Bui

Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Aug 2011
1 answer
114 views
Hi,

I have a Radgrid as shown below and for some reason vertical scrollbar does not appear.  Please help.

<telerik:RadGrid ID="RadGrid1"  runat="server" EnableAJAX="True" GridLines="None" 
    OnNeedDataSource="RadGrid1_NeedDataSource"  
    OnItemCreated="RadGrid1_ItemCreated"
    OnItemCommand="RadGrid1_ItemCommand"
    AllowPaging="False" AllowSorting="True" BorderColor="Gray" BorderWidth="1px" 
        Width="700px" PageSize="5" 
        OnItemDataBound="RadGrid1_ItemDataBound" ShowStatusBar="True" 
        Title="Report Queue" GroupingEnabled="False"  AllowMultiRowSelection="True" 
        AutoGenerateColumns="False" AllowMultiRowEdit="True" Skin="WebBlue">
    <MasterTableView CommandItemDisplay="Top">
  
  
  
  
        <RowIndicatorColumn Visible="False">
            <HeaderStyle Width="20px"/>
        </RowIndicatorColumn>
          
        <ExpandCollapseColumn Visible="False">
            <HeaderStyle Width="19px" />
        </ExpandCollapseColumn>
        <CommandItemSettings  AddNewRecordText="" RefreshImageUrl="../RadControls/Refresh_new.gif"  />
        <Columns>
            <telerik:GridButtonColumn
                HeaderText="Cancel ?" UniqueName="KillProcesses"  AutoPostBackOnFilter="True" Text="Cancel" ButtonType="PushButton" CommandName="remove">
            </telerik:GridButtonColumn>
            <telerik:GridBoundColumn UniqueName="JobID" DataField="JobID" HeaderText="Job Id">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="SubmittedBy" DataField="SubmittedBy" HeaderText="Submitted By">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="TimeSubmitted" DataField="TimeSubmitted" HeaderText="Time Submitted">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="JobStatus" DataField="JobStatus" HeaderText="Job Status">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="ReportName" DataField="ReportName" HeaderText="Report">
            </telerik:GridBoundColumn>
        </Columns>
      
        </MasterTableView>
       <ClientSettings >
            <Selecting AllowRowSelect="True" AllowCellSelect="True" AllowColumnSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"/>
        </ClientSettings>
  
        <SelectedItemStyle BackColor="#00C0C0" />
</telerik:RadGrid>


Thanks,

Olga
Olga
Top achievements
Rank 1
 answered on 17 Aug 2011
2 answers
59 views
Hi all,

I have a Grid (master grid) which contains a Detail Grid for each row. In Detail Grid, I have created GridTemplateColumn with HeaderTemplate and ItemTemplate.
HeaderTemplate contains some image buttons which allow user interacting with them. 

In NeedDataSource event of DetailGrid, I have fetched data from DB to bind its data. Depending on a property of each item (row), these image buttons are [displayed and set some properties] or not.

How can I access these image buttons for setting (invisible/visible, CommandArgument -  from DataItem) for them ?

Thanks a lot for your help,
Phuc PHAM

Phuc
Top achievements
Rank 1
 answered on 17 Aug 2011
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?