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

I use the tabstrip with usercontrols- load on demand:
http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultvb.aspx

I want to use this inside a form with validation.
On every tab, there are different form elements, and each of them has to be validated, if AND ONLY IF the user has seleceted the tab.
When a user clicks on every tab, they get loaded to the system, and the form validation fires on every tab.
- The validation should of cause only happen on the the form elements for the selected tab.
How can this be done?

I believe i don't need to send code? - I have form on the master page, some form elements on the master page, and different form elements on the usercontrols -pages.

Any ideas?
thanx.

best regards,
Frank



Roland
Top achievements
Rank 1
 answered on 02 Dec 2009
1 answer
158 views
When manually adding data to a grid, the first two columns go missing.
See attached Bitmap and code below.
I am simply adding data to a Grid through via a table.
DataTable dt = new DataTable();     
  for (int i = 0; i < 5; i++)     
   dt.Columns.Add(new DataColumn("Col: " + i.ToString(), typeof(string)));     
  for (int i = 0; i < 5; i++)     
  {     
   DataRow dr = dt.NewRow();     
   dt.Rows.Add(dr);     
  }     
  RadGrid1.DataSource = dt;     
  RadGrid1.Rebind();     
  for (int i = 0; i < 5; i++)     
   for (int j = 0; j < dt.Columns.Count; j++)     
    RadGrid1.Items[i].Cells[j].Text = j.ToString();    
 
I thought this was going to be simple, but has turned into something a little more challenging.
Any thoughts?
Thanks,
HH
Roland
Top achievements
Rank 1
 answered on 02 Dec 2009
3 answers
148 views

Hello,

I have a RadGrid created at runtime columns , commandItem...everything

How can i access the form/container to add some control also in runtime?

I mean , i'd like to add some controls after the buttons update/insert/cancel when i edit/insert a record in grid (  MasterTableView.EditMode = GridEditMode.EditForms;)

Thanks in advance

Gilberto
Johny
Top achievements
Rank 1
 answered on 02 Dec 2009
6 answers
725 views
Hi guys,

I'm often get the "Element '[xxx]' is not a known element"-warning in VS 2008.

I have added the line beneath, the site built and all works fine, but there is just no intellisense.

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 

I've found the thread which probably should be the same problem, but since it is recommend in another thread (which I can't found now) not to do it this way and I besides this doesn't know where to find my PublicKeyToken, I wan't to hear if there are any other ideas.

Some times the intellisens is there and some times it isn't.
Kevin
Top achievements
Rank 2
 answered on 02 Dec 2009
4 answers
204 views
Hi all,

I'm kinda wondering. I ran into the trouble with upload and ajax (which as I understand is not working). I followed the example of:

http://www.telerik.com/help/aspnet-ajax/upload_uploadingajax.html

But I still have no proper upload. Basicly I have a tabbed control ajaxfied. I created a small sample demonstrating where I am now:

-- aspx

<%

@ Page Language="vb" AutoEventWireup="false" CodeBehind="test.aspx.vb" Inherits="cms2009beheer.test" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml">

<

head runat="server">

<title>Untitled Page</title>

</

head>

<

body>

<form id="form1" runat="server">

<radscriptblock id="RadScriptBlock1" runat="server">

<script type="text/javascript">

// on upload button click temporarily disables ajax to perform

// upload actions

function conditionalPostback(sender, args)

{

if(args.EventTarget == "<%= Button1.UniqueID %>")

{

args.EnableAjax =

false;

}

}

</script>

</

radscriptblock>

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"

Width="75px">

<img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'

style="border: 0px;" />

</telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableHistory="True"

DefaultLoadingPanelID="RadAjaxLoadingPanel1">

<ClientEvents OnRequestStart="conditionalPostback" />

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="RadTabStrip1">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" MultiPageID="RadMultiPage1">

<Tabs>

<telerik:RadTab Text="t1">

</telerik:RadTab>

<telerik:RadTab Text="t2">

</telerik:RadTab>

</Tabs>

</telerik:RadTabStrip>

<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">

<telerik:RadPageView runat="server" ID="p1">

<telerik:RadUpload ID="RadUpload1" runat="server" />

<asp:Button ID="Button1" runat="server" Text="Button" />

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

</telerik:RadPageView>

<telerik:RadPageView runat="server" ID="p2">

just a sample

</telerik:RadPageView>

</telerik:RadMultiPage>

</form>

</

body>

</

html>



-- vb

Partial

Public Class test

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

If RadUpload1.UploadedFiles.Count > 0 Then

System.Threading.Thread.Sleep(3000)

End If

 e

nd Sub

End

Class

This is just a simple test to see if I can touch the uploaded files

Veselin Vasilev
Telerik team
 answered on 02 Dec 2009
1 answer
107 views
When I apply

    <tools name="DropdownToolbar" dockable="true" >
        <tool name="ApplyClass" width="130px" popupwidth="130px"/>

The mouse over "gray" appears to be of fixed width.
See attached screenshot.

Marc




Dobromir
Telerik team
 answered on 02 Dec 2009
3 answers
130 views
Hi,

We are using UserControl editForm to insert/update records. We need to perform some client side validations .
So we have included a onclick attribute and associate a javascript function for the Update button inside the usercontrol.The Client side Onclick event is getting fired only on the parent page and not on the user control. so we placed the client side function on the parent page and upon returning true the pgae is not getting submitted.

Is something we are missing.Any help on this would be greatly apprecaiated.
Please find below the client sid ecode in the parent page

function

 

OnUpdateClick()

 

{

 

var hasActiveChild = document.getElementById("<%=hdnHasActiveChild.ClientID%>").value;

 

 

var confirmMsg = 'There are active children which would also become inactive, Do you want to continue?';

 

 

var hasConsolidation = document.getElementById("<%=hdnHasConsolidation.ClientID%>").value;

 

 

var allowPostBsckforActive = '';

 

 

var allowPostBsckforConsolidation = '';

 

 

 

 

if(hasActiveChild =='Yes' && isActiveChecked =='No')

 

{

 

var result = confirm(confirmMsg);

 

 

if(result)

 

{

document.getElementById(

"<%=hdnDeActiveChildProducts.ClientID%>").value = 'Yes';

 

allowPostBsckforActive =

'Yes';

 

 

}

 

else

 

{

document.getElementById(

"<%=hdnDeActiveChildProducts.ClientID%>").value = 'No';

 

allowPostBsckforActive =

'No';

 

}

}

 

//

 

 

 

if(hasConsolidation == 'Yes')

 

{

 

var result = confirm('The selected consolidation will be deleted, do you want to proceed?');

 

 

if(result)

 

{

document.getElementById(

"<%=hdnDeleteConsolidation.ClientID%>").value = 'Yes';

 

allowPostBsckforConsolidation =

'Yes';

 

 

}

 

else

 

{

document.getElementById(

"<%=hdnDeleteConsolidation.ClientID%>").value = 'No';

 

allowPostBsckforConsolidation =

'No';

 

 

}

}

 

 

if((allowPostBsckforConsolidation == 'Yes' && (allowPostBsckforActive=='' || allowPostBsckforActive=='No')) || (allowPostBsckforActive == 'Yes' && (allowPostBsckforConsolidation=='' || allowPostBsckforConsolidation=='No') ))

 

{

alert(

'true');

 

 

return true;

 

_doPostback();

}

 

else

 

{

alert(

'false');

 

 

return false;

 

}

}



Thanks and Regards
V.Balamurali
Veli
Telerik team
 answered on 02 Dec 2009
2 answers
66 views
Hi All,

How can i force user to enter values in to the fields in Insert/Update.
Like Showing a message box with message which fields are empty.

Please help me regarding this.
PM
Top achievements
Rank 1
 answered on 02 Dec 2009
4 answers
120 views
I have produced the following code sample:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="exampleForTelerik._Default" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager> 
    <asp:UpdatePanel ID="updatePanel1" runat="server"> 
        <ContentTemplate> 
            <ajax:TabContainer runat="server" ID="tc"> 
                    <ajax:TabPanel runat="server" ID="tpGeneralInformation" HeaderText="General Information"> 
                        <ContentTemplate> 
            <telerik:RadEditor ID="edHeaderText" runat="server" EnableEmbeddedBaseStylesheet="true" Width="700px" ><CssFiles><telerik:EditorCssFile Value="" /></CssFiles></telerik:RadEditor> 
            </ContentTemplate> 
            </ajax:TabPanel> 
            <ajax:TabPanel runat="server" ID="tpSubmission" HeaderText="Submission"> 
                <ContentTemplate> 
                    <asp:Button runat="server" Text="Press me" /> 
                </ContentTemplate> 
            </ajax:TabPanel> 
            </ajax:TabContainer> 
        </ContentTemplate> 
    </asp:UpdatePanel> 
    </form> 
</body> 
</html> 
 


After clicking the button in the second tab and then clicking back to the first tab, the formatting of the Editor gets completely messed up.  Is there an easy way to fix this?  Note that I have to include the empty
            <CssFiles><telerik:EditorCssFile Value="" /></CssFiles>
part of my code so that my master css file doesn't overwrite the css of the editor.


Thanks in advance,
Ben
Rumen
Telerik team
 answered on 02 Dec 2009
1 answer
53 views
Hello all ,

 Lemme know what s the replacement / Alternate for RadEditor.get_uniqueID() in Telerik Control 2009 ? i found get_id() method shall i proceed with this ?

-Prince
Rumen
Telerik team
 answered on 02 Dec 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?