Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
82 views
Hello Hello!

Help me please with the easiest way to approach Trimming of long filenames to fit given Width of Control.

http://imm.io/iTgT

Can be that edited via js e.g. in FileSelected event or restricted by css, text is rendered to span, so I haven't found obvious solution yet. Thanks.
Max
Top achievements
Rank 1
 answered on 15 Mar 2012
11 answers
285 views
I'm sure someone has figured this out by now. I'm at my wits end trying to get it to work. Very little help in the documentation and forums on how to do this.

I have a Grid with about 4 nested tables:


I've tried this but it will not work on any nested DetailTables:

Public Sub HideExpandColumnRecursive(ByVal tableView As GridTableView)
        Dim test As String = Nothing
        Dim nestedViewItems As GridItem() = tableView.GetItems(GridItemType.NestedView)
        For Each nestedViewItem As GridNestedViewItem In nestedViewItems
            For Each nestedView As GridTableView In nestedViewItem.NestedTableViews
                If nestedView.Items.Count = 0 Then
                    Dim cell As TableCell = nestedView.ParentItem("ExpandColumn")
                    cell.Controls(0).Visible = False
                    nestedViewItem.Visible = False
                End If
                If nestedView.HasDetailTables Then
                    HideExpandColumnRecursive(nestedView)
                End If
            Next
        Next
    End Sub

I understand the I have to do a recursive search and set visible to false for all the detailTables as above but I cant figure out how to do this. I read the online help and still cant get it to work. Does anyone have an example on how to hide the expand/collapse image in a multi nested table scenario?

Thank you for your help. Shouldn't this be built in???



<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSourceParent"
            GridLines="None" Skin="Telerik" ShowGroupPanel="True">
            <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSourceParent" DataKeyNames="PART_ID" NoDetailRecordsText="" HierarchyLoadMode="ServerBind">
                <DetailTables>
                    <telerik:GridTableView runat="server" DataKeyNames="PART_ID" DataSourceID="sqlDataSourceSub"
                        GridLines="Both" NoDetailRecordsText="">
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <DetailTables>
                            <telerik:GridTableView runat="server" DataSourceID="sqlDataSourceSub0"
                                DataKeyNames="PART_ID" NoDetailRecordsText="">
                                <DetailTables>
                                    <telerik:GridTableView runat="server" DataSourceID="sqlDataSourceSub1"
                                        DataKeyNames="PART_ID" NoDetailRecordsText="">
                                        <DetailTables>
                                            <telerik:GridTableView runat="server" DataKeyNames="PART_ID"
                                                DataSourceID="SqlDataSourceSub2">
                                                <ParentTableRelation>
                                                    <telerik:GridRelationFields DetailKeyField="PART_ID" MasterKeyField="PART_ID" />
                                                </ParentTableRelation>
                                                <RowIndicatorColumn>
                                                    <HeaderStyle Width="20px" />
                                                </RowIndicatorColumn>
                                                <ExpandCollapseColumn>
                                                    <HeaderStyle Width="20px" />
                                                </ExpandCollapseColumn>
                                            </telerik:GridTableView>
                                        </DetailTables>
                                        <ParentTableRelation>
                                            <telerik:GridRelationFields DetailKeyField="PART_ID" MasterKeyField="PART_ID" />
                                        </ParentTableRelation>
                                        <RowIndicatorColumn>
                                            <HeaderStyle Width="20px" />
                                        </RowIndicatorColumn>
                                        <ExpandCollapseColumn Visible="True">
                                        </ExpandCollapseColumn>
                                    </telerik:GridTableView>
                                </DetailTables>
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="PART_ID" MasterKeyField="PART_ID" />
                                </ParentTableRelation>
                                <RowIndicatorColumn>
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Visible="True">
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                            </telerik:GridTableView>
                        </DetailTables>
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="PART_ID" MasterKeyField="PART_ID" />
                        </ParentTableRelation>
                        <ExpandCollapseColumn Visible="True">
                        </ExpandCollapseColumn>
                    </telerik:GridTableView>
                </DetailTables>
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="PART_ID" HeaderText="PART_ID" SortExpression="PART_ID"
                        UniqueName="PART_ID">
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridBoundColumn DataField="BASE_ID" HeaderText="BASE_ID" SortExpression="BASE_ID"
                        UniqueName="BASE_ID">
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridBoundColumn DataField="DESCRIPTION" HeaderText="DESCRIPTION" SortExpression="DESCRIPTION"
                        UniqueName="DESCRIPTION">
                    </telerik:GridBoundColumn>
                    
                     <telerik:GridBoundColumn DataField="QTY_ON_HAND" HeaderText="QTY_ON_HAND" SortExpression="QTY_ON_HAND"
                        UniqueName="QTY_ON_HAND">
                    </telerik:GridBoundColumn>
                    
                </Columns>
            </MasterTableView>
            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True"
                ReorderColumnsOnClient="True">
            </ClientSettings>
        </telerik:RadGrid>
Princy
Top achievements
Rank 2
 answered on 15 Mar 2012
3 answers
274 views
I noticed that on my menu dropdowns and split button dropdowns certain icons/images seem to get cut off if they have anything in their bottom area.  The images are 16x16 as specified in documentation and to Microsoft standards.  You can see it in the attached images. I'll attach the original icons/images as well so you can see their size. Is this as designed? Bug? What should I do?
Kate
Telerik team
 answered on 15 Mar 2012
4 answers
102 views
Hi Team,
Greetings for the day..!!

I have a rad-grid with some template columns and some bound columns..
One column holds Amount .
If user enters some garbage value like ANVDSfdsfvgds@#$%  ..  in Amount column filter, I get some run-time error.
Same thing happens when garbage value is entered in Date column.
Is it possible to overcome this? Is there any way which can prevent user from entering such garbage values ??
Can we show some message to user saying "Please enter valid ....date or amount ..."

My tester is literally harassing me on this.. 

Any help appreciated.

Thanks, 
Lok..
Lokesh
Top achievements
Rank 1
 answered on 15 Mar 2012
1 answer
99 views

i  used rad chart and facing problem in grouping column .
AM4 displaying three bar values  insteadof  two values and  AM5,AM6  is showing incorrect values .

please suggest me solution.

siteStatus                                  UserName

Assigned                                     AM4                    1

Submitted For Approval              AM4                    15

To Be Assigned                           AM5                     2

To Be Assigned                           AM6                     1

To Be Assigned                           AM7                      2



            chartBarRoleWise.DataSource = siteStatus;
            chartBarRoleWise.DataGroupColumn = "SiteStatus";
            chartBarRoleWise.PlotArea.XAxis.DataLabelsColumn = "UserName";
            chartBarRoleWise.Legend.Appearance.GroupNameFormat = "#VALUE";
            chartBarRoleWise.DataBind()
            ;
Evgenia
Telerik team
 answered on 15 Mar 2012
4 answers
124 views
I have a RadFileExplorer on a page with custom buttons in the toolbar.  Logoff and Administration buttons should go to the right.  Here is my CSS on the control:

<style type="text/css">
    div.RadToolBar .rtbUL { width: 100%; }

    div.RadToolBar .rightButton  {
        float: right;
    }
    /* Set the desired properties to the custom buttons */
    a.adminLoginStyleClass.rtbWrap .rtbText
    {
        font-size: 12px;
        background: url('./images/administration.png') no-repeat left center;
    }
            
    a.logoffStyleClass.rtbWrap .rtbText
    {
        font-size: 12px;
        background: url('./images/logoff.png') no-repeat left center;
    }
</style>

And my codebehind in the Page_Load:

RadToolBarButton logoffbutton = new RadToolBarButton("Logoff");
logoffbutton.Value = "logoffcommand";
logoffbutton.CssClass = "logoffStyleClass";
logoffbutton.OuterCssClass = "rightButton";
logoffbutton.Attributes.Add("onclick", "window.location.href='EndSession.aspx'");
RadFileExplorer1.ToolBar.Items.Add(logoffbutton);

RadToolBarButton adminLogin = new RadToolBarButton("Administration");
adminLogin.Value = "admincommand";
adminLogin.CssClass = "adminLoginStyleClass";
adminLogin.OuterCssClass = "rightButton";
adminLogin.Attributes.Add("onclick", "window.location.href='Admin'");
RadFileExplorer1.ToolBar.Items.Add(adminLogin);

This works beautifully in Chrome and IE however in FireFox the buttons show in the right on a second row.  I have attached a screenshot.  Can anyone help?
Adam
Top achievements
Rank 1
 answered on 15 Mar 2012
3 answers
65 views
Hi
I have a page which has a UserControl, and within the Usercontrol I have a RadUpload with a RadUploadProgressHandler control. I can upload files without any problems, and the progress handler displays as it should. However, after uploading a file, if I wait a few minutes and then make another ajax callback on the page with a different control, I get the error "RadUpload Ajax callback error. Source url returned error:12029 .. Unknown... Did you register the RadUploadProgressHandler in web.config?"  . Which is a bit strange because I have already done the file uploading and the action which triggers this error message has nothing to do with file uploading!

I am using version Q2 2010.

Any help would be appreciated

Thanks
Genady Sergeev
Telerik team
 answered on 15 Mar 2012
1 answer
243 views
Hi,

I am using Radtooltip and under that I have placed a RadText box control.

Basically I want to use Jquery Autocomplete to fetch the data for my Radtextbox using wcf web service. The webservice returns that data but the problem is that I can't use autocomplete operation for my radtextbox because Jquery works on HTML element. Is there any client side function which I can use to get the html element Id of my radtextbox.

<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">

    function GetJobs(sender, args) {

        var s = new PS.PSService();
        s.GetJobs(function (data) {
            $(sender).autocomplete({
                source: data,
                minLength: 2
            });

        });
    }        
</script>



<
telerik:RadToolTip ID="rttMore" runat="server" TargetControlID="tbSearch" EnableEmbeddedBaseStylesheet="true"
                                                            RelativeTo="Element" ShowCallout="true" HideDelay="4000" HideEvent="LeaveTargetAndToolTip"
                                                            Position="BottomCenter" Width="500px" Height="90px">
                                                            <fieldset id="fsMain" runat="server">
                                                                <legend class="fieldsetLegend" id="fslgndMain" runat="server">Select Filter </legend>
                                                                <asp:Panel ID="pnlSearch" runat="server" DefaultButton="btnGoSearchByJobName">
                                                                    Search by job <b>name / number</b>
                                                                    <telerik:RadTextBox ID="tbSearchByJobName" MaxLength="50" EmptyMessage="Leave empty for all jobs or enter a Job Name / Job No (Press Enter Key for search)"
                                                                        Width="430px" runat="server">
                                                                        <ClientEvents OnLoad="GetJobs" />
                                                                    </telerik:RadTextBox>
                                                                    <asp:RegularExpressionValidator ID="valSearch" runat="server" ForeColor="Red" Display="Dynamic"
                                                                        ErrorMessage="Please enter a valid Job Name / Job Number" ControlToValidate="tbSearchByJobName"
                                                                        ValidationExpression="[a-zA-Z|\d|\s]*"></asp:RegularExpressionValidator>
                                                                    <asp:Button ID="btnGoSearchByJobName" runat="server" Text="Go" OnClick="btnGoSearchByJobName_Click" />
                                                                    <br />
                                                                </asp:Panel>
                                                            </fieldset>
                                                        </telerik:RadToolTip>
Kevin
Top achievements
Rank 2
 answered on 15 Mar 2012
6 answers
220 views
I'd like to close the opend window i called in a cross domain site.
So, when the user hits the "Close" button on the child page (different domain) the radwindow shall close.

This is easily possible with normal popup windows, just use the javascript code. window.close();
In Demos you can find an example for Dialog returning values and there is a javascript method to find the radwindow and than call the close event, but this doesnt work in cross domain scenarios.

Example from Demos
function GetRadWindow() {
 
var oWindow = null;
 if (window.radWindow)
oWindow = window.radWindow;
 
//Throws an Error in cross domain, because window.frameElement isnt accessible
else if (window.frameElement.radWindow)
oWindow = window.frameElement.radWindow;
 
return oWindow;
 
 }


To Close just say...
var oWnd = GetRadWindow();
oWnd.close(oArg);


Hope you guys can help me close a radwindow in cross domain scenario.
Kevin
Top achievements
Rank 2
 answered on 15 Mar 2012
1 answer
108 views
The project i am currently working on requires me to launch RadAsyncUpload (select files and upload) when a radio button is selected (see image below - the event should trigger when user clicks on "Upload Images" ).  Is there anyway to force RadAsyncUpload to launch when the radio button is select on the clientside (something on the lines of $find("<%= RadAsyncUpload1.ClientID%>").open(); )?

Thanks again for the help.

-  Pat
Bozhidar
Telerik team
 answered on 15 Mar 2012
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?