Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
206 views
hi.

i have a form that i want user can insert rows in it client-side and without any PostBack. and after click on Save button, my application saves all of rows by batch method.
i don't want to use from grid.
my first idea is using from dynamically control creation for any new row.

can you help me?
tanks.
Shinu
Top achievements
Rank 2
 answered on 12 Oct 2012
1 answer
42 views
Hello Group,

I have a question about the radgrid control. The problem is that when I add templatecolumns to the grid from a datatable programmacally then columns aren't visible. The only way there are visible is when I connect de radgrid to an sqldatasource. But the when i click a link in the grid the complete grid vanishes.

Code for the first grid: this one binds fine although very slow but thats is another question.

<telerik:RadGrid ID="RgNav" runat="server" CellSpacing="0" DataSourceID="SDS_PPB_Project"
                        GridLines="None" Skin="Default" AutoGenerateColumns="false" CssClass="PpbNav">
                        <MasterTableView DataSourceID="SDS_PPB_Project" DataKeyNames="DossierCode" HeaderStyle-Height="48"
                            HierarchyDefaultExpanded="true">
                            <DetailTables>
                                <telerik:GridTableView AutoGenerateColumns="false" DataSourceID="SDS_PPB_Sales" Width="100%"
                                    DataKeyNames="DetailCode,DetailSubCode" ShowHeadersWhenNoRecords="false" HierarchyDefaultExpanded="false">
                                    <DetailTables>
                                        <telerik:GridTableView DataSourceID="SDS_PPB_ProdDossiers" AutoGenerateColumns="false"
                                            DataKeyNames="DetailCode,DetailSubCode,ProdHeaderDossierCode" HierarchyDefaultExpanded="false">
                                            <ParentTableRelation>
                                                <telerik:GridRelationFields DetailKeyField="DetailCode" MasterKeyField="DetailCode" />
                                                <telerik:GridRelationFields DetailKeyField="DetailSubCode" MasterKeyField="DetailSubCode" />
                                            </ParentTableRelation>
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="ProdHeaderDossierCode" HeaderText="ProdDossier">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="ProdStatusCode" HeaderText="StatusCode">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="PhQty" HeaderText="Aantal">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                            <DetailTables>
                                                <telerik:GridTableView AutoGenerateColumns="false" DataSourceID="SDS_PPB_Operations"
                                                    Width="100%" DataKeyNames="ProdHeaderDossierCode" ShowHeadersWhenNoRecords="false"
                                                    HierarchyDefaultExpanded="false">
                                                    <ParentTableRelation>
                                                        <telerik:GridRelationFields DetailKeyField="ProdHeaderDossierCode" MasterKeyField="ProdHeaderDossierCode" />
                                                    </ParentTableRelation>
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="MachGrpCode" HeaderText="Bew.">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="ProdBooStatusCode" HeaderText="StatusCode">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="MachPlanTime" HeaderText="Bew.PT">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="OperStartedInd" HeaderText="Gestart">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="OperFinishedInd" HeaderText="Gereed">
                                                        </telerik:GridBoundColumn>
                                                    </Columns>
                                                </telerik:GridTableView>
                                            </DetailTables>
                                        </telerik:GridTableView>
                                    </DetailTables>
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="DetailCode" HeaderText="Vk.Rgl">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="DetailSubCode" HeaderText="SubRgl">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="DDDescription" HeaderText="Omschrijving">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="DDCalcQty" HeaderText="Aantal">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="DDCompletedInd" HeaderText="Gereed">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                    <DetailTables>
                                        <telerik:GridTableView AutoGenerateColumns="false" DataSourceID="SDS_PPB_Delivery"
                                            Width="100%" DataKeyNames="DetailCode,DetailSubCode,DelMainCode" ShowHeadersWhenNoRecords="false"
                                            HierarchyDefaultExpanded="false">
                                            <ParentTableRelation>
                                                <telerik:GridRelationFields DetailKeyField="DetailCode" MasterKeyField="DetailCode" />
                                                <telerik:GridRelationFields DetailKeyField="DetailSubCode" MasterKeyField="DetailSubCode" />
                                            </ParentTableRelation>
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="DelMainCode" HeaderText="HVS">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="DelDescription" HeaderText="Omschrijving">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                            <DetailTables>
                                                <telerik:GridTableView AutoGenerateColumns="false" DataSourceID="SDS_PPB_DeliveryLines"
                                                    Width="100%" DataKeyNames="DelMainCode" ShowHeadersWhenNoRecords="false" HierarchyDefaultExpanded="false">
                                                    <ParentTableRelation>
                                                        <telerik:GridRelationFields DetailKeyField="DelMainCode" MasterKeyField="DelMainCode" />
                                                    </ParentTableRelation>
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="DelLineQty" HeaderText="Aantal">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="DelLineCompletedInd" HeaderText="Gereed">
                                                        </telerik:GridBoundColumn>
                                                    </Columns>
                                                </telerik:GridTableView>
                                            </DetailTables>
                                        </telerik:GridTableView>
                                    </DetailTables>
                                </telerik:GridTableView>
                            </DetailTables>
                            <Columns>
                                <telerik:GridBoundColumn DataField="QuotNr" HeaderText="OfferteNr.">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="OrdNr" HeaderText="OrdNr.">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="DmDescription" HeaderText="Project">
                                </telerik:GridBoundColumn>
                            </Columns>
                            <DetailTables>
                                <telerik:GridTableView AutoGenerateColumns="false" DataSourceID="SDS_PPB_AllDelivery"
                                    Width="100%" DataKeyNames="DelMainCode" ShowHeadersWhenNoRecords="false">
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="DelMainCode" HeaderText="HVS">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="DelDescription" HeaderText="Omschrijving">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                    <DetailTables>
                                        <telerik:GridTableView AutoGenerateColumns="false" DataSourceID="SDS_PPB_DeliveryLines"
                                            Width="100%" DataKeyNames="DelMainCode" ShowHeadersWhenNoRecords="false">
                                            <ParentTableRelation>
                                                <telerik:GridRelationFields DetailKeyField="DelMainCode" MasterKeyField="DelMainCode" />
                                            </ParentTableRelation>
                                            <Columns>
                                                <telerik:GridBoundColumn DataField="DelLineQty" HeaderText="Aant.">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="DelLineCompletedInd" HeaderText="Gereed">
                                                </telerik:GridBoundColumn>
                                            </Columns>
                                        </telerik:GridTableView>
                                    </DetailTables>
                                </telerik:GridTableView>
                            </DetailTables>
                            <DetailTables>
                                <telerik:GridTableView AutoGenerateColumns="false" DataSourceID="SDS_PPB_Invoices"
                                    Width="100%" ShowHeadersWhenNoRecords="false">
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="InstNr" HeaderText="Termijn">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn DataField="InstDescription" HeaderText="Omschrijving">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </telerik:GridTableView>
                            </DetailTables>
                        </MasterTableView>
                    </telerik:RadGrid>

The second grid should generate the same template structure as the first one with weeknames as columns. The code for the second radgrid columns generation: This grid is added statically to the page.

Private Sub SetColumnHeaders_v2()
        Dim Dt As DataTable = GetTimeTableWeeks_v2(PhaseId)
        Dim TemplateColumn As GridTemplateColumn = Nothing
        For Each dr As DataRow In Dt.Rows
            TemplateColumn = New GridTemplateColumn
            With TemplateColumn
                .HeaderText = dr.Item(0).ToString.Trim
                .HeaderStyle.Width = 20000
            End With
            RgMain.Columns.Add(TemplateColumn)
        Next
End Sub



Please help.

René
Shinu
Top achievements
Rank 2
 answered on 12 Oct 2012
1 answer
63 views
Hi all member
I want to change default font of RibbonBarApplicationMenuItem when skin of ribbon is WebBlue
please help to me
thanks
Princy
Top achievements
Rank 2
 answered on 12 Oct 2012
3 answers
228 views
HI  Telerik Support,

I am using RadGrid and filtering option is true on the columns.

Now let say I filter the one column by text. it filter data properly.

Now I want to clear the Filter persistence by clicking a button (which is outside the Grid).

Can somebody provide the solutions ASAP. I really need this.

Thanks
Nick

Shinu
Top achievements
Rank 2
 answered on 12 Oct 2012
0 answers
82 views
Hello, I have a RadTabStrip
This screen calls default.asp
It contains a button that calls the registration screen
This registration screen I have to put a message if the user clicks a tab, "you lost data"
I tried using the function OnClientTabSelecting
But I have to make sure that the User is in the registration screen, and not in default.aps
I tried to use session to store the value, but I noticed that javascript does not work
Would any idea to help me

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link href="../css/SGTWebStyles.css" rel="stylesheet" type="text/css" />
    <telerik:RadCodeBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            var isTabClicked = "false";    


            function OnClientTabSelecting(sender, args) {
                isTabClicked = "false";
                var cadastre = '<%=Session("cadastre")%>';
                if (cadastre == true) {
                    if (isTabClicked == "false") {
                        //cancel the action 
                        args.set_cancel(true);
                        //get the tab which is clicked 
                        var tab = args.get_tab();


                        function CallBackFn(arg) {
                            if (arg) {
                                isTabClicked = "true";
                                tab.click();
                            }
                        }
                        //ask the user for confirmation                
                        radconfirm("Os dados informados serão perdidos, deseja continuar?", CallBackFn);
                    }
                }
            }
            function OnClientTabSelected() {
                //reset the isTabClicked variable
                isTabClicked = "false";
            }
          
        </script>
    </telerik:RadCodeBlock>
</head>
<body onload="window.history.forward();" class="BODY">
    <form runat="server" id="mainForm" method="post">   
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadWindowManager ID="RadWindowManager" runat="server" EnableShadow="true">
    </telerik:RadWindowManager>
    <asp:UpdatePanel ID="UpdatePanelProjeto" runat="server" RenderMode="Inline">
        <ContentTemplate>
            <div class="DivTab">
                <telerik:RadTabStrip ID="RadTabStripProjeto" runat="server" MultiPageID="RadMultiPageProjeto"
                    SelectedIndex="2" Align="Justify" ReorderTabsOnSelect="True" Width="600px" OnClientTabSelected="RadTabStripProjeto_TabSelected">
                    <Tabs>
                        <telerik:RadTab Text="Projetos Cadastrados" runat="server" Value="Cadastro">
                        </telerik:RadTab>
                        <telerik:RadTab Text="Função" Value="Função">
                        </telerik:RadTab>
                        <telerik:RadTab Text="Locais de Alocação" Value="Locais de Alocação" Selected="True">
                        </telerik:RadTab>
                        <telerik:RadTab Text="Equipe do Projeto" Value="Equipe do Projeto">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>
                <telerik:RadMultiPage ID="RadMultiPageProjeto" runat="server" SelectedIndex="2" Height="100%"
                    CssClass="tabStrip">
                    <telerik:RadPageView ID="RadPageViewProjetosCadastrados" runat="server" Height="100%">
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageViewFuncao" runat="server" Height="100%" Width="100%">
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageViewLocaisAlocacao" runat="server" Height="100%">
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageViewEquipeProjeto" runat="server" Height="100%">
                    </telerik:RadPageView>
                </telerik:RadMultiPage>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>


Code Behind
Imports Telerik.Web.UI
Partial Class projeto_Principal
    Inherits System.Web.UI.Page
    Dim cSinonimos As New ClassSGT.cSinonimos
    Dim vCadastro As String




#Region "Eventos "
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Page.Title = "Dextera"
            If (Not IsNothing(Session("NOME"))) AndAlso (Session("NOME").ToString() <> String.Empty) Then
                ScriptManager.RegisterStartupScript(Me, Me.GetType(), "blockTabPaste", "if (top.location.pathname != '" & Request.ApplicationPath & "/Principal.aspx') {top.location = '" & Request.ApplicationPath & Application.Item("vDirecionaURLDireta") & "';}", True)
                cSinonimos.CarregaTelerik(RadTabStripProjeto)
                'RadTabStripProjeto.SelectedTab.PageView.ContentUrl = "../projeto/Default.aspx"


                If ClassSGT.cSession.aplicaPermissoesAbas("Projetos", RadTabStripProjeto, Session("NOME").ToString()) Then
                    RadTabStripProjeto_TabClick(RadTabStripProjeto, New RadTabStripEventArgs(RadTabStripProjeto.SelectedTab))
                Else
                    Response.Redirect("../AcessoNegado.aspx")
                End If
            Else
                ScriptManager.RegisterStartupScript(Me, Me.GetType(), "loggin", Application.Item("vDirecionaLogin"), True)
            End If
        End If
    End Sub
#End Region


    Protected Sub RadTabStripProjeto_TabClick(sender As Object, e As Telerik.Web.UI.RadTabStripEventArgs) Handles RadTabStripProjeto.TabClick
        If e.Tab.PageView.ID = "RadPageViewProjetosCadastrados" Then
            e.Tab.PageView.ContentUrl = "../projeto/Default.aspx"
        ElseIf e.Tab.PageView.ID = "RadPageViewFuncao" Then          
                 e.Tab.PageView.ContentUrl = "../projeto/Funcao.aspx"          
        ElseIf e.Tab.PageView.ID = "RadPageViewLocaisAlocacao" Then
            e.Tab.PageView.ContentUrl = "../projeto/LocalAlocacao.aspx"
        ElseIf e.Tab.PageView.ID = "RadPageViewEquipeProjeto" Then
            e.Tab.PageView.ContentUrl = "../projeto/EquipeProjeto.aspx"
        End If
    End Sub
End Class


Button in ../projeto/Default.aspx"
Protected Sub btnNovo_Click(sender As Object, e As System.EventArgs) Handles btnNovo.Click
        Try
            lblError.Text = ""
            Session("cadastre") = True
            Response.Redirect("..\projeto\DefaultCadastro.aspx?vComando=Novo")
        Catch ex As Exception
            lblError.Text = ex.Message
        End Try
    End Sub


Please help me, I'm desperate, excuse the English because I'm from Brazil and do not have much knowledge
Davi
Top achievements
Rank 1
 asked on 11 Oct 2012
0 answers
92 views
Is there a quick way to figure out if the fields under the tab changed either by mouse or via keyboard etc when I change the tab. Does Telerik provide a way to track if fields changed for that particular tab?

For ex;
If there are 3 tabs
First, Second and Third

If I change it to Second tab...is there a way to determine what changed on First tab?

Using Javascript I know that I can compare the values with default values

The no of fields can vary on the first tab...it can have about 4 or 18 fields on the First tab and 15 fields on the second tab...I want to track whenever something changed on a tab in order to determine whether to save the data or not.

Please reply asap

Thanks in advance!

Jinisha
Jinisha
Top achievements
Rank 1
 asked on 11 Oct 2012
13 answers
131 views
4 answers
103 views
Which is the client event fired when selecting TimeSlots? I tried with OnClientTimeSlotClick but it doesn't seem to fire.
Thanks!
Veena
Top achievements
Rank 1
 answered on 11 Oct 2012
1 answer
460 views
Is there a way to prohibit default RadGrid CSS classes from being output to the markup? For example I can set my
HeaderStyle
for a column as a CSS class, but then it gets appended with a default RadGrid class like rgHeader or rgGroupCol. I would like this to not happen because when exporting to Excel, when I apply my custom CSS to the RadGrid on the HTMLExporting event, any RadGrid cells that have multiple classes on the like - class="MyCustomCSSClass rgHeader" do not get their styles applied. If I set the CSS class of a cell on ItemDataBound this solves the problem and the default RadGrid classes are not output, but is there a way to make sure no RadGrid default CSS classes are added to any part of the grid?
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Oct 2012
1 answer
80 views
Hello

I have a radgrid that has drag to select enabled. There is a postback on clicking a row but not when i use drag to select rows. Is there a way to postback on drag select

Any help or other solutions will be appreciated
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?