Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
327 views
Hi,
I have been trolling through the forums and documentation for the AsyncUpload control and I was trying to find out if there is a method or property available client-side that would let me get the size of the file uploaded. It could be either before or after the file is uploaded, although I would prefer before. I was trying to use the following - 
sender._uploadedFiles[0].fileInfo.ContentLength
But that only works on smaller files. If I upload a 5mb file the content length is only around 500,000 or so, and on a 3mb file it is 1,800,000. I would have thought something like InputStream.Length would be available client side???

Thanks

Matt.
Matthew
Top achievements
Rank 2
 answered on 04 Jan 2011
3 answers
119 views
Hi, sorry if this is a basic question but I need some direction on how to call editItem() client-side on a child row in a hierarchical grid (which could have 3 or more levels).

I understand that the get_itemIndexHierarchical() returns a string representing the path and also how some recommend using the last part after the last underscore.  But I have had no luck figuring out how to use it and all my iterations of code end up either blowing up with id or object is null or it selects the parent.

Current iteration of my code:

function ElementRowDblClick(sender, eventArgs) {
        var grid = sender;
        var MasterTable = grid.get_masterTableView();
        var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
 
        debugger;
        $find("<%= rgData.MasterTableView.ClientID %>").editItem(row);
}

Can anyone help point me in the right direction? 

I have pondered using the string ("0:0_0:0_0") and parsing it to calculate a row index however it seems I would have to traverse child items or recursively search for an item to pass it to editItem()? I have set HierarchyLoadMode="Client" and GroupLoadMode="Client" although I'm not using groups anyway. And client settings are:

<ClientSettings  AllowExpandCollapse="true"  >
        <ClientEvents OnRowDblClick="ElementRowDblClick" />
            <Selecting AllowRowSelect="True" />
        </ClientSettings>

I have trawled many forum postings but can't seem to find anything similar to what I want to achieve, i.e. putting the row I double click into edit, via editItem(), and not just the parent row.

Any help very much appreciated.
web
Top achievements
Rank 1
 answered on 04 Jan 2011
2 answers
175 views
Is there a way to make it so the listbox only postbacks on check and not also on selection?

I have AutoPostBack="true" and OnItemCheck set to my server side function.  It works great, but when you click on an item and not the check box, it posts back as well.  Is there a way to stop that postback but still allow the checkbox check postback?
Ernest Mombay
Top achievements
Rank 1
 answered on 04 Jan 2011
3 answers
426 views
I  am opening  a page in rad window. ( Radwindow manager is on the maser page described as follow). I have cacel button on the page.
Which has code according to your example.
When I cancel out it closes the window but when I open window second time and click on cancel it closes current window and now it's showing the old window again. For this example I am using radWINModalPostLogin windwow.

<

 

telerik:RadWindowManager ID="radWindowManager" Style="z-index: 8001;"

 

 

runat="server" Skin="Vista" OnClientClose="OnClientClose" EnableViewState="false" ShowContentDuringLoad="false" >

 

 

<Windows>

 

 

<telerik:RadWindow ID="radWINModalPostLogin" runat="server" ReloadOnShow="True" DestroyOnClose="true" Behaviors="None"

 

 

Left="" VisibleTitlebar="False" VisibleOnPageLoad="false" Style="display: none;" Top="" Modal="True" KeepInScreenBounds="True" >

 

 

</telerik:RadWindow>

 

 

<telerik:RadWindow ID="radWINDialogPostLogin" VisibleStatusbar="false" runat="server" VisibleOnPageLoad="false"

 

 

Left="" VisibleTitlebar="True" Style="display: none;" Top="" Modal="False" Behaviors="Close" >

 

 

</telerik:RadWindow>

 

 

</Windows>

 

 

</telerik:RadWindowManager>

 

Anumeha
Top achievements
Rank 1
 answered on 04 Jan 2011
0 answers
86 views
I am using Dynamic data with DynamicRadGrid, and i am running into problem with paging.
<XXX:DynamicRadGrid ID="RadGrid1" AllowPaging="True" AutoGenerateColumns="false"              runat="server" DataSourceID="GridDataSource" OnItemDataBound="RadGrid1_ItemDataBound"                OnItemCommand="RadGrid1_ItemCommand"
                   <PagerStyle CssClass="clPanelPaging" BackColor="White" ShowPagerText="true" Mode="NumericPages" /> 
                   <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" /> 
                   <MasterTableView EditMode="InPlace"
                       <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings
                          
                   </MasterTableView
               </XXX:DynamicRadGrid
           <asp:DataServiceLinqDataSource ID="GridDataSource" runat="server" EnableDelete="true"  EnableUpdate="true" AutoPage="false"
           </asp:DataServiceLinqDataSource>

If i set autopage to false, i see page by page. But as its server side paging i dont get correct item count. If i set the autopage to false, then i get the complete data set, but paging doesnt work.

When i click on page-2, it binds the data again and moves back to page-1.
Any suggestions?

thanks in advance!!
-guru
Guru
Top achievements
Rank 1
 asked on 04 Jan 2011
4 answers
104 views

... i binded to in codebehind?

I Have started to get up and running with my small test-projekt for evaluating Telerik ...

I have managed to bind a datattable through NeedDatasource. Like this:

'Set datasource
ProductGrid.DataSource = New Products.Table(Client.ConnectionString)

The tableobject is a custom object wich inherit a Data.DatatTable wich has connection and adapter objects etc. Insert, Update and delete commands are generated and I can save all changes by simply calling

ProductTable.Save()
 
Nothing fancy about it ... When building WinForm I just bind to my table make some chnages in grid and then call save and voila ... Done!

But can I do this way too when working with RadGrid? Or do I have to retrieve all values and do a manual update?

//h
Henrik
Top achievements
Rank 1
 answered on 04 Jan 2011
1 answer
82 views
Hi

I not able to overlay RadMenu when using jquery dialog with modal option.

Any ideas on how to fix this issue so that I can disable the RadMenu along with rest of page when calling the dialog. This is code

$(

"#dialog1").dialog({modal:true,   });

 

Thanks

Mustapha
Top achievements
Rank 1
 answered on 04 Jan 2011
3 answers
122 views

Hello ,

i have a radtagcloud item , i want use it like shopping - basket.

user select a row from RadGrid in Client ,  and i want to add "ID" value on grid into RadTagCloud via Java Script. How can i do that ?

here is the code below :

 

function

 

OnRowSelected(sender, eventArgs) {

 

 

// add into radtagcloud

 

 

 

var colIndex = 0;

 

 

var rowIndex = eventArgs._itemIndexHierarchical;

 

 

if (rowIndex > -1) {

 

 

var value = sender._selection._masterTable.children[rowIndex].cells[colIndex].innerText;

 

 

if (value != null) {

 

 

// add this item into cloud.

 

??

 

 

 

 

 

 

                         }

}

 

}

}

thanks

Pero
Telerik team
 answered on 04 Jan 2011
1 answer
69 views
Hi,

I want the selected item image to be shown in my combo boxes and found this code snippet:
http://www.telerik.com/community/code-library/aspnet-ajax/combobox/show-the-selected-item-image-in-input.aspx

Unfortunately, it seems to work in IE but not Firefox. Any possible workarounds?

Regards,
JH
Kalina
Telerik team
 answered on 04 Jan 2011
1 answer
115 views
Hi all,

How can I spell check the ASP:textbox TextBoxcomments in this repeater? If I specify isClientID="true" it runs but says it can't find a valid HTML item. If I remove the isClientId I get a message saying it can't be Null. Thanks in advance, Dan

<asp:Repeater ID="repeaterApproveDept" Runat="server">
                    <ItemTemplate>
                        <TR>
                            <TD class="APR_ARIAL_10PT" width="100">
                                <%# FormatName((System.Data.DataRowView)Container.DataItem)%>
                            </TD>
                            <td valign="middle">
                            <cc1:myCCFDropDownList Enabled = "false" id="Myccfdropdownlist2" runat="server" Width="100" SetValue='<%# DataBinder.Eval(Container.DataItem, "RecommendedRating")%>' AutoPostBack="False" apAssessmentID='<%# DataBinder.Eval(Container.DataItem, "apAssessmentID")%>' siStaffID='<%# DataBinder.Eval(Container.DataItem, "siStaffID")%>' DeptAssignID='<%# DataBinder.Eval(Container.DataItem, "DeptAssignID")%>' IsLeadership='<%# DataBinder.Eval(Container.DataItem, "IsLeadership")%>' BogReviewerStatus='<%# DataBinder.Eval(Container.DataItem, "BogReviewerStatus")%>' DivStatus='<%# DataBinder.Eval(Container.DataItem, "DivStatus")%>'>
                                    <asp:ListItem Value="">Not Selected</asp:ListItem>
                                    <asp:ListItem Value="E">Exceeds</asp:ListItem>
                                    <asp:ListItem Value="A">Achieves</asp:ListItem>
                                    <asp:ListItem Value="I">Needs Improvement</asp:ListItem>
                                    <asp:ListItem Value="NR">NR</asp:ListItem>
                                    <asp:ListItem Value="RET">RET</asp:ListItem>
                                    <asp:ListItem Value="TNTR">TNTR</asp:ListItem>
                                    <asp:ListItem Value="WR">WR</asp:ListItem>
                                </cc1:myCCFDropDownList>
                            </td>
  
                            <TD width="85%" valign="middle">
                                <asp:textbox cssclass="APR_ARIAL_10PT" id="TextBoxComments" TextMode="MultiLine" runat="server" Rows= 5 Columns = 140 Text='<%# DataBinder.Eval(Container.DataItem, "Comments")%>'>
                                </asp:textbox>
                            </TD>
                            <td align="center">
                                <asp:CheckBox ID="CheckBoxCompleted" Runat="server" Checked='<%# DataBinder.Eval(Container.DataItem, "IsCompleted").ToString()=="1"%>' onclick="return false;">
                                </asp:CheckBox>
                            </td>
                        </TR>
                        <tr>
                            <td colspan="4"><hr>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
Dan
Top achievements
Rank 1
 answered on 04 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?