Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
247 views
Hi

This is my requirement

I want to disable the DownloadFile option  if i click on folder and once i select the folder if no records are there in grid that time also it should disable downloadFile option.
If click on file DownloadFile option shuld be enable
All these things happen rad gridview context menu shown and file or folder click.
Note:DownloadFile i added custom button.

i have done like this for if no records are there to display in gridview.But in case of if click on folder i want to disable download option and if i click on file download file option shuld be enable.

 

 

function OnClientShown(oMenu, args) {

 

 

 

var iCount =0;

 

 

 

var deleteMenuItem = oMenu.findItemByValue("Delete");

 

 

 

var radExplorer = $find("<%# radFileExplorer.ClientID %>");

 

 

 

var getGrid = radExplorer.get_grid();

 

 

 

var table = getGrid.get_masterTableView();

 

 

 

var rows = table.get_dataItems();

 

 

 

var downloadFileItem = oMenu.findItemByValue("Download_File");

 

 

 

if (rows.length == 0) {

 

downloadFileItem.set_enabled(

 

false);

 

 

 

 

deleteMenuItem.set_enabled(

 

true);

 

}



Please can u solve this prob.

Thanks
Bhavani.
Dobromir
Telerik team
 answered on 25 Jul 2012
2 answers
180 views
Asp. Net Versión: Aspnet 2.0
OS:  Windows 7, 
Navegador: chrome 18.0.1025.152 m
Versión Telerik: ASP.NET AJAX Q2 2010
Lenguaje de Programación VB. NET 2008


I am experiencing a problem using RadGrid and RadWindow when property is set AllowPaging = "True", the paging controls do not work:

a) Click the page numbers in the RadWindow is closed
b) Click on Next Page displays the following error: Argument for repayment orinvalid callback. Event validation is enabled using <pagesenableEventValidation="true"/>


Thanks for your help 
Olivier
Top achievements
Rank 2
 answered on 25 Jul 2012
3 answers
146 views

I have grid on my page located in div with id "Lists":

<div id="Lists"
    <telerik:RadGrid runat="server" ID="mygrid"
    <ClientSettings> 
        <ClientEvents OnGridCreated="document_Grid_OnGridCreated" /> 
    </ClientSettings
    </telerik:RadGrid
</div>
<div id="ParentList">
</div>

when grid is created documentGrid variable is set with that grid:

<script type="text/javascript" >
    var documentGrid = null;
    function document_Grid_OnGridCreated(sender, args) {
        documentGrid = sender;
    }
</script>

to this point everything seems to be fine, I can call following code:
function updateDocumentGrid(){
    documentGrid.get_masterTableView().rebind();
}

after I move Lists div inside another div with id ParentList
global variable window.documentGrid is null.

is there any way to prevent variable documentGrid from beeing set to null?
Kostadin
Telerik team
 answered on 25 Jul 2012
3 answers
171 views
Dear All,

i am developing product in asp.net using c sharp and I have listbox in my page and i have list items in Listbox which is added dynamically
here i need to insert value against partcular listbox item after inserting value corresponding listbox item should be disable.how to implement this..

Thanks in advance....
Nencho
Telerik team
 answered on 25 Jul 2012
5 answers
345 views
I have a problem where the DateInput and DatePopupButton follows the screen if I scroll down.

I have solved the scrolling problem for DatePopupButton with:

.rcSingle .rcCalPopup
{
    position:static !important;
}

But the DateInput control still scolls with the screen.


This helped me with some the problem: http://www.telerik.com/community/forums/aspnet-ajax/calendar/alignment-problem-w-raddatepicker.aspx 
Kostadin
Telerik team
 answered on 25 Jul 2012
3 answers
161 views
Hi,
I have a page which has multiple tabs ( .ascx) controls, each tab has a RadEditor. I open a popup window from each tab and trying to set the Content of the parent window RadEditor Control.

By doing
var editor = opener.document.getElementById('ctl00_ContentPlaceHolder1_Ctrl_Operation_RadEditorOP_SmartOperationalGoal'); I can get the control and can set the innerHTML but that's about it. I need to set the content of and and when ever I use

editor.set_html('test'); I get this object is supported error.

Need help in setting the value from a popup to the parent window control content.
Thanks,
Roomi
Marin Bratanov
Telerik team
 answered on 25 Jul 2012
1 answer
124 views
Hi,

In TimeSlotCreated we do lot of processing on server and accordingly set the slot availibility.

In NavigationComplete we get the new visible dates from VisibleRangeStart and VisibleRangeEnd. If the VisibleRangeStart and VisibleRangeEnd changes i.e. if they are outside our cache data, we need to refresh our data and then set the slot availibility in TimeSlotCreated.

But we noticed that when user changes the date or moves back/forward using the navigation link, TimeSlotCreated is called before (with old dates) and after NavigationComplete event (with new dates).

Why TimeSlotCreated is called before NavigationComplete is called since the new dates are not set anyway?

Is there a way to prevent this? i.e. TimeSlotCreated gets called only after NavigationComplete? Or is there a way to get the new visible dates before TimeSlotCreated is called?

Thanks,
Abhijeet

Peter
Telerik team
 answered on 25 Jul 2012
8 answers
157 views

I had this problem before and never got and answer to it when i submitted a help ticket and now I am back to it becuase I have another case where I need to impliment it in a radgrid and cannot go back to a asp grid.  What is happening is that I need a link button or hyperlink button on a radgrid that when they click on it it opens in a new window a page to email personnel.  problem is when I do this it forwards the page to the email name or site in this case, need it to stay at grid and open a the email page and pass a variable to it.

   <telerik:GridTemplateColumn HeaderText="MAC #">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lnkEmail" runat="server" CommandName="Email" CommandArgument='<% #Bind("intUserId") %>' text='<% #Bind("strMacNum") %>'
                                                ToolTip="Email the IMO"></asp:LinkButton>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>


Right now its redirecting but i cannot have this, just needs to open the email page in another window while staying on grid page.

 If (e.CommandName = "Email") Then
            Dim RecordId As Integer = e.CommandArgument

            Response.Redirect("Email.aspx?Email=" & RecordId)

        End If

also tried this but no go, forwards the grid to email page.
 ClientScript.RegisterStartupScript(Me.GetType(), "OpenWin", "<script>openNewWin('" & url & "')</script>")

Kevin
Top achievements
Rank 1
 answered on 25 Jul 2012
5 answers
111 views

My Scenario
I have a grid which allows inline editing. When the user clicks a hyperlink in any row I open a radwindow. The hyperlink is a template cell  and I open the RadWindow via javascript which all works fine except that I need to be able to save the row before opening the radwindow if it is in edit mode because I'm passing in the unique id of the row and if it is a new row I need to perform the insert command first so that the Id is generated on the server. The data is in SQL and the Id is an Identity column. I'm also using automatic updates on the grid. 

My Question
Is it possible to save the row and invoke the insert command when the user clicks the hyperlink/template cell? If so can you provide sample code on how this could be done from javascript or server side code. Both would be idea. Thank you!

Here is the template column used to open the RadWindow
<telerik:GridTemplateColumn HeaderText="Selection Options" UniqueName="SelectionOptions" AllowFiltering="false">

    <ItemTemplate><a href="#"

     onclick='openAnswerOptionsWindow(&#039;<%# DataBinder.Eval(Container.DataItem, "LCFormMetadataId") %>&#039;); return false;'>

     SelectionOptions</a></ItemTemplate>

</telerik:GridTemplateColumn>


Here is the javascript I use to open the RadWindow

function openLCFormManagementWindow() {
    var oWnd = radopen("LCFormMaintenance.aspx");
    oWnd.Center();

}

Maria Ilieva
Telerik team
 answered on 25 Jul 2012
9 answers
371 views
Hi There,

in the demo below:
http://demos.telerik.com/aspnet-ajax/upload/examples/async/webmail/defaultcs.aspx

If you select two files to be uploaded and then delete one by pressing the delete icon and then press send both files appear on the next page.  In my testing I have not been able to inform the Upload control to not process the deleted file.  So on postback the FileUploaded event gets fired and the upload control still has 2 files attached.

I understand that the files get uploaded to the temporary location but it would be good to have a property in the FileUploadedEventArgs for the file if it was deleted client side.

Any ideas on a work around would be greatly appreciated.

Regards
Jason
Genady Sergeev
Telerik team
 answered on 25 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?