Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
120 views
Hi,

I have implemented a RadGrid in my application, In RadGrid I have a textbox and combobox and I also have a submit button. When user clicks on Submit button a confirmation will be shown to user (through javascript confirmation is being displayed)

On click of Ok I need to focus the textbox inside radgrid.
On Click of Cancel I need to focus Combobox inside radgrid.

How to do the above two things programatically?

Regards,
Medac
Princy
Top achievements
Rank 2
 answered on 17 Sep 2009
3 answers
149 views
Can I add headings with html text & images to the exported document(pdf/excel) at the time of exporting.
Princy
Top achievements
Rank 2
 answered on 17 Sep 2009
1 answer
158 views
Hello,

This is very annoying because I need to have the keys for each row and these values must not be presented to users (Guid, int), and I remark that with the parameters
       <telerik:RadGrid ID="Grid1" runat="server" AllowPaging="True" 
            AllowSorting="True" ShowStatusBar="true"  PageSize="20" GridLines="None" AutoGenerateColumns='false'>  
            <PagerStyle Mode="NextPrevAndNumeric" /> 
            <ClientSettings > 
                    <Resizing AllowColumnResize="True"  ResizeGridOnColumnResize="true" ClipCellContentOnResize="true"/>  
                    <Scrolling AllowScroll="True" ScrollHeight='500px' UseStaticHeaders="True" SaveScrollPosition="True" /> 
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
            <MasterTableView DataKeyNames="Type,CrmId,FieldId" TableLayout="Fixed" > 
            <Columns> ...  
            </Columns> 
            <EditFormSettings> 
              <EditColumn ButtonType="ImageButton" /> 
            </EditFormSettings> 
        </MasterTableView> 
        </telerik:RadGrid> 
  

If I have the CrmId column visible but not diplayed, I am unable to resize columns without having everything moving around, totally crazy ! Even worse, the columns won't get their initial size fixed by header normally.
When I turn display on, everything works normally: colummn are display with correct header size and I am able to resize one column without having the others changed.

very easy to reproduce under FireFox.

Thanks for help.

CS
Martin
Telerik team
 answered on 17 Sep 2009
2 answers
107 views
Hi: I am getting error on the page when datasource in empty for datail table. I am assigning the datasource in

RadGrid2_DetailTableDataBind. 

 I have set HierarchyDefaultExpanded="true" inside MasterTableView. If it is set to false I am not getting the error but I want all complete hierarchy to be expanded by default.

Any help is much appreciated.

Thanks!

 

 

 

 

 

Yavor
Telerik team
 answered on 17 Sep 2009
3 answers
212 views
Hi,

I have a rad grid in which I display some data. There is a coloumn (which is not shown in the grid itself) which I need to use to colour the background of the row. So if it has a certain value then I need to make the background for that record to be red when the data is exported to excel.

I have searched through the forums and I have searched online and seen the demo's. However I woudl appreciate if someone could give me some pointers on this.
Daniel
Telerik team
 answered on 17 Sep 2009
3 answers
329 views
Dear Telerik,

This example shows how to add a Tooltip to an appointment, and this example shows how to add a RadToolTip by making use of the Client-side API. Would it be possible to combine these two examples so I can add a RadToolTip to my Appointments by making use of the client-side API? And how would I do that?

Thanks in advance!
Peter
Telerik team
 answered on 17 Sep 2009
10 answers
333 views

Hi!

Complicated title, but is what it is. I'm creating tabs from client side that when pass the visible area area scrollable. The problem is that from the 2nd time towards, the same event for a particular tab (e.g., button event) should select the corresponding tab previously dynamically created in the client side and show the tab. I can easily select and show the content of the chosen tab by an exterior event, but it looks that using the scrollIntoView() method is messing all up.

My results, when selecting a tab from a client event of a button, for instance, where (with some variations):
IE8:
The tabs is selected, but the tab bar goes to a look-like random position (sometimes the selected tab is not in the visible part).

IE8 with compatibility mode to IE7:
When selecting a non-visible at the moment tab, only on the right of the visible area, the tab bar don't scroll to the selected one be visible.

FF:
Like IE8, all messed up.

The code:
<head runat="server"> 
    <title></title> 
 
    <script type="text/javascript"> 
 
        function SelecTabIndex(_index) { 
            var _rts = $find("RadTabStrip1"); 
 
            var _tab = _rts.get_tabs().getTab(_index); 
            _tab.scrollIntoView(); 
            _tab.select(); 
        } 
 
        function CreateDynamicTabs() { 
            var names = new Array("Advanced", "Automatic Updates", "Remote", "General", "Computer Name", "Hardware", "System Restore"); 
 
            var _rts = $find("RadTabStrip1"); 
            if (!_rts) 
                _rts = RadTabStrip1; 
 
            var _tab; 
            for (x in names) { 
                _tab = new Telerik.Web.UI.RadTab(); 
                _tab.set_text(names[x]); 
                _rts.get_tabs().add(_tab); 
            } 
            _tab.select(); 
            _rts._resize(); // to make the scroll buttons appear 
             
            return; 
        } 
    </script> 
 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <div> 
        <input id="Button8" type="button" value="Create Dynamic Tabs" onclick="CreateDynamicTabs()"/><br /> 
     
        <input id="Button1" type="button" value="Advanced" onclick="SelecTabIndex(0);" /> 
        <input id="Button2" type="button" value="Automatic Updates" onclick="SelecTabIndex(1);" /> 
        <input id="Button3" type="button" value="Remote" onclick="SelecTabIndex(2)" /> 
        <input id="Button4" type="button" value="General" onclick="SelecTabIndex(3);" /> 
        <input id="Button5" type="button" value="Computer Name" onclick="SelecTabIndex(4)" /> 
        <input id="Button6" type="button" value="Hardware" onclick="SelecTabIndex(5)" /> 
        <input id="Button7" type="button" value="System Restore" onclick="SelecTabIndex(6)" /> 
         
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Width="400px" ScrollChildren="True" 
            ScrollButtonsPosition="Middle" Height="26px"> 
 
        </telerik:RadTabStrip> 
    </div> 
    </form> 
</body> 
</html> 


Using static/hardcoded tabs the results where:
IE8:
When selecting tabs that aren't on the instant visible area of the Tab Bar, it shows some random area of the Tab Bar.

IE8 with compability to IE7:
Seems to work fine. :-)

FF:
Same as IE8.

Code (with some variations):
<head runat="server"> 
    <title></title> 
 
    <script type="text/javascript"> 
 
        function SelecTabIndex(_index) { 
            var _rts = $find("RadTabStrip1"); 
 
            var _tab = _rts.get_tabs().getTab(_index); 
            _tab.scrollIntoView(); 
            _tab.select(); 
        } 
 
    </script> 
 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <div> 
        <input id="Button1" type="button" value="Advanced" onclick="SelecTabIndex(0);" /> 
        <input id="Button2" type="button" value="Automatic Updates" onclick="SelecTabIndex(1);" /> 
        <input id="Button3" type="button" value="Remote" onclick="SelecTabIndex(2)" /> 
        <input id="Button4" type="button" value="General" onclick="SelecTabIndex(3);" /> 
        <input id="Button5" type="button" value="Computer Name" onclick="SelecTabIndex(4)" /> 
        <input id="Button6" type="button" value="Hardware" onclick="SelecTabIndex(5)" /> 
        <input id="Button7" type="button" value="System Restore" onclick="SelecTabIndex(6)" /> 
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Width="400px" ScrollChildren="True" 
            ScrollButtonsPosition="Middle" Height="26px"> 
            <Tabs> 
                <telerik:RadTab Text="Advanced" Value="2"> 
                </telerik:RadTab> 
                <telerik:RadTab Text="Automatic Updates" Value="1"> 
                </telerik:RadTab> 
                <telerik:RadTab Text="Remote" Value="3"> 
                </telerik:RadTab> 
                <telerik:RadTab Text="General" Value="4"> 
                </telerik:RadTab> 
                <telerik:RadTab Text="Computer Name" Value="5"> 
                </telerik:RadTab> 
                <telerik:RadTab Text="Hardware" Selected="True" Value="6"> 
                </telerik:RadTab> 
                <telerik:RadTab Text="System Restore" Value="7"> 
                </telerik:RadTab> 
            </Tabs> 
        </telerik:RadTabStrip> 
    </div> 
    </form> 
</body> 
</html> 


Hope you can help me. It's very important, for me, to achieve the described.


Regards,

Rodrigo S.

Sigmund Lunde
Top achievements
Rank 1
 answered on 17 Sep 2009
1 answer
121 views
Hello,

I am using an GridHTMLEditorColumn and in edit mode, when I edit for first time, the size for content is quite zero, and size for upper control bar and lower status bar are over sized ???

Here is my code

       <telerik:RadGrid ID="LocalizeGrid" runat="server" AllowPaging="True" 
            AllowSorting="True" ShowStatusBar="true"  PageSize="20" GridLines="None" AutoGenerateColumns='false'>  
            <PagerStyle Mode="NextPrevAndNumeric" /> 
            <ClientSettings > 
                    <Resizing AllowColumnResize="True"  ResizeGridOnColumnResize="true" ClipCellContentOnResize="true"/>  
                    <Scrolling AllowScroll="True" ScrollHeight='500px' UseStaticHeaders="True" SaveScrollPosition="True" /> 
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
            <MasterTableView DataKeyNames="TypeName,CrmId,FieldId" TableLayout="Fixed" > 
            <Columns> 
                <telerik:GridClientSelectColumn HeaderStyle-Width="40px" />   
                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton"  HeaderStyle-Width="40px" /> 
                <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName='Delete' ButtonType="ImageButton"  HeaderStyle-Width="40px"   
                ConfirmDialogType="RadWindow" /> 
                <Telerik:GridBoundColumn DataField="CrmId" DataType='System.Guid' HeaderText="CRMID" UniqueName="CrmId" HeaderStyle-Width="200px" ReadOnly="true" /> 
                <Telerik:GridBoundColumn DataField="FieldId" DataType='System.Int32' HeaderText="FIELDID" HeaderStyle-Width="80px" UniqueName="FieldId" ReadOnly="true" /> 
                <Telerik:GridBoundColumn DataField="ShortValue" HeaderText="SHORTVAL" HeaderStyle-Width="300px" UniqueName="ShortValue" /> 
                <telerik:GridHTMLEditorColumn UniqueName="LongValue" SortExpression="LongValue" HeaderText="LONGVAL" 
                    DataField="LongValue" HeaderStyle-Width="500px">  
                </telerik:GridHTMLEditorColumn> 
            </Columns> 
            <EditFormSettings> 
              <EditColumn ButtonType="ImageButton" /> 
            </EditFormSettings> 
        </MasterTableView> 
        </telerik:RadGrid> 
  
 
Am i the only ?

Thanks for help.

CS
Martin
Telerik team
 answered on 17 Sep 2009
3 answers
538 views
Hello,

I had an issue of empty cells in grid don't have borders,
I resolved it with adding &nbsp to all cells:

protected void grid_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
    {
        if (e.Column is GridBoundColumn)
        {
            (e.Column as GridBoundColumn).DataFormatString = "<nobr>&nbsp{0}</nobr>";
            //(e.Column as GridBoundColumn).DataFormatString = "<nobr>{0}</nobr>";
        }
    }

However this causes me another problem: the &nbsp is present when exporting to Excel.

What should I do?
Martin
Telerik team
 answered on 17 Sep 2009
5 answers
355 views
Hi,

    <asp:ListBox ID="m_UIlbTest" runat="server" SelectionMode="Multiple" OnSelectedIndexChanged="m_UIlbTest_SelectedIndexChanged" AutoPostBack="true"> 
        <asp:ListItem Text="1" /> 
        <asp:ListItem Text="2" /> 
        <asp:ListItem Text="3" /> 
    </asp:ListBox> 
     
    <telerik:RadListBox ID="m_UIrlbTest" runat="server" SelectionMode="Multiple" OnSelectedIndexChanged="m_UIlbBranches_SelectedIndexChanged" AutoPostBack="true"> 
        <Items> 
            <telerik:RadListBoxItem Text="1" /> 
            <telerik:RadListBoxItem Text="2" /> 
            <telerik:RadListBoxItem Text="3" /> 
        </Items> 
    </telerik:RadListBox> 

If I have all three items selected in ASP's ListBox and I hold down Ctrl and click on one item to unselect it (leaving two items still selected), the event handler  m_UIlbTest_SelectedIndexChanged is being hit.  The same does not hold true for telerik's ListBox.  Is there anything I can do to change this?
Genady Sergeev
Telerik team
 answered on 17 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?