Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
122 views

On click of “Add new item”  the template is shown with Insert and Cancel button.But on click of insert I am not getting the event on the codebehind.

It’s the same on edit……when I click “Update" button.

I have pasted the code here.


 

 <telerik:RadGrid id="RadGrid1" runat="server" Skin="Office2007"  Width="40%"

                            AllowSorting="true" AllowMultiRowSelection="true" AllowMultiRowEdit="true"

                            AutoGenerateColumns="False">

                            <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="ID">

                                <CommandItemTemplate>

                                    <table>

                                        <tr>

                                            <td width="30%">

                                                <asp:LinkButton ID="btnAdd" Text="Add new item" CommandName="InitInsert" runat="server"></asp:LinkButton>

                                                <asp:LinkButton ID="btnEdit" Text="Edit selected" CommandName="EditSelected" runat="server"></asp:LinkButton>

                                            </td>

                                            <td width="40%">

                                            </td>

                                            <td width="30%">

                                                <asp:LinkButton ID="btnRefresh" Text="Refresh data" CommandName="Rebind" runat="server"></asp:LinkButton>

                                                <asp:LinkButton ID="btnUpdate" Text="Update edited" CommandName="UpdateEdited" runat="server"></asp:LinkButton>

                                            </td>

                                        </tr>

                                    </table>

                                </CommandItemTemplate>

                                <Columns>

                                 <telerik:GridEditCommandColumn ButtonType="ImageButton">

                                 </telerik:GridEditCommandColumn>

                                    <telerik:GridBoundColumn DataField=" ID" HeaderText="ID" SortExpression="TR_ID"

                                        Visible="false" UniqueName="ID">

                                    </telerik:GridBoundColumn>

                                    <telerik:GridBoundColumn DataField="Customer" FilterControlWidth="40px" HeaderText="Customer"

                                        SortExpression="Customer" UniqueName="Customer">

                                    </telerik:GridBoundColumn>

                                    <telerik:GridBoundColumn DataField="ProjectNumber" FilterControlWidth="40px" HeaderText="Project Number"

                                        SortExpression="ProjectNumber" UniqueName="ProjectNumber">

                                    </telerik:GridBoundColumn>

                                    <telerik:GridBoundColumn DataField="TestNumber" FilterControlWidth="40px" HeaderText="Test Number"

                                        SortExpression="TestNumber" UniqueName="TestNumber">

                                    </telerik:GridBoundColumn>

                                </Columns>

                                <EditFormSettings EditFormType="Template">

                                    <FormTemplate>

                                        <table id="Table2" cellspacing="2" cellpadding="1" width="900px" border="1" rules="none"

                                            style="border-collapse: collapse; background: white;">

                                            <tr>

                                                <td style="width: 50%">

                                                    <table width="100%">

                                                        <tr>

                                                            <td colspan="2">

                                                                <asp:Label ID="Label1" CssClass="tableheading" runat="server" Text="Test Info :"

                                                                    Font-Bold="True"></asp:Label>

                                                            </td>

                                                        </tr>

                                                        <tr>

                                                            <td style="width: 30%">

                                                                <asp:Label ID="Label3" CssClass="data" runat="server" Text="Run No"></asp:Label>

                                                            </td>

                                                            <td>

                                                                <telerik:RadTextBox ID="RadTextBox11" Text='<%# Bind( "Customer" ) %>' runat="server"

                                                                    CssClass="data">

                                                                </telerik:RadTextBox>

                                                            </td>

                                                        </tr>

                                                        <tr>

                                                            <td style="width: 30%">

                                                                <asp:Label ID="Label4" CssClass="data" runat="server" Text="Bucket Type"></asp:Label>

                                                            </td>

                                                            <td>

                                                                <telerik:RadTextBox ID="RadTextBox12" Text='<%# Bind( "ProjectNumber" ) %>' runat="server"

                                                                    CssClass="data">

                                                                </telerik:RadTextBox>

                                                            </td>

                                                        </tr>

                                                    </table>

                                                </td>

                                                <td>

                                                    <table>

                                                        <tr>

                                                            <td colspan="2">

                                                                <asp:Label ID="Label31" CssClass="tableheading" runat="server" Text=""></asp:Label>

                                                            </td>

                                                        </tr>

                                                           <tr>

                                                            <td style="width: 30%">

                                                                <asp:Label ID="Label2" CssClass="tableheading" runat="server" Text="Name"></asp:Label>

                                                            </td>

                                                            <td style="width: 70%">

                                                                <telerik:RadComboBox ID="ddldrp" Width="100%" runat="server"  >                                                               </telerik:RadComboBox>

                                                            </td>

                                                        </tr>

                                                        <tr>

                                                            <td style="width: 30%">

                                                                <asp:Label ID="Label5" CssClass="data" runat="server" Text="TestNumber"></asp:Label>

                                                            </td>

                                                            <td>

                                                                <telerik:RadTextBox ID="RadTextBox13" Text='<%# Bind( "TestNumber" ) %>' runat="server"

                                                                    CssClass="data">

                                                                </telerik:RadTextBox>

                                                            </td>

                                                        </tr>

                                                    </table>

                                                </td>

                                            </tr>

                                            <tr>

                                                <td align="right" colspan="2">

                                                    <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'

                                                        runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'>

                                                    </asp:Button>&nbsp;

                                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"

                                                        CommandName="Cancel"></asp:Button>

                                                </td>

                                            </tr>

                                        </table>

                                    </FormTemplate>

<EditColumn UniqueName="EditCommandColumn1"></EditColumn>

 

                                    <FormTableButtonRowStyle HorizontalAlign="Right"></FormTableButtonRowStyle>

                                    <FormCaptionStyle></FormCaptionStyle>

                                </EditFormSettings>

                            </MasterTableView>

                            <ClientSettings>

                                <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" />

                            </ClientSettings>

                        </telerik:RadGrid>

Pavlina
Telerik team
 answered on 03 Mar 2010
3 answers
272 views
hi

can you provide me a simple project will allow me to choose vari skin for my web page?

i dont really get how its works..

thanks in advance
Dimo
Telerik team
 answered on 03 Mar 2010
3 answers
152 views
I wonder how to skip certain database rows.

 Dim adapter As New SqlDataAdapter(strSQL, dbs)  
                        adapter.SelectCommand.Parameters.Add("@MenuIDvalue", SqlDbType.Int, 4)  
                        adapter.SelectCommand.Parameters("@MenuIDvalue").Value = MenuIDvalue  
                        adapter.SelectCommand.Parameters.Add("@LangID", SqlDbType.Int, 4)  
                        adapter.SelectCommand.Parameters("@LangID").Value = LangID  
 
                        Dim Menu As New DataSet()  
 
                        rst.Close()  
 
 
                        adapter.Fill(Menu)  
                        panelmenu1.DataTextField = "Pagename" 
                        panelmenu1.MaxDataBindDepth = Dropdownlevels  
 
                        panelmenu1.DataFieldID = "ID" 
                        panelmenu1.DataFieldParentID = "PageID" 
 
                        panelmenu1.DataSource = Menu  
                        panelmenu1.DataBind() 

So this works perfectly, But i want to skip a row if the column "hiddenpage = 1" in de SQL.
I cannot do it directly in the SQL code because of there are childnodes it gives an error that it cannot find the parent node.

Anyone have an idea ?
Peter
Telerik team
 answered on 03 Mar 2010
3 answers
309 views
Greetings. I've searched through the forums but haven't been able to find the perfect solution to what I need. Basically, I need for the ComboBox (using the Office 2007 theme) to have no border and no background behind the arrow when it's collapsed (closed), but when hovered over retains all the normal Office 2007 styles (including border and background). I've managed to get rid of the border, but the arrow continues to cause problems. My hunch is it has something to do with the sprites and the background-position, but I'm not 100% sure. Can someone please assist?

Many thanks,

Tye
Kamen Bundev
Telerik team
 answered on 03 Mar 2010
2 answers
65 views
When I develop a web .Net WebSite, I came across a problem.

There are two pages,first page is main page,the second page is child page.
When I open the child page , I found the child page is under the RadMenu.
I try all the properties in the RadMenu,but I didn't find any solution.

I tried EnableEmbeddedBaseStylesheet,EnableEmbeddedSkins and so on.
Anyone here can give me some ideas!
Thanks!
liu qingshui
Top achievements
Rank 1
 answered on 03 Mar 2010
5 answers
141 views


Hi,,

http://i50.tinypic.com/2meoc45.png

Even spent many hours , I can't find a way to remove ' AddNew' link button in radgrid.
Why 'Show csv/excel/pdf' properties available but add new is the permanent one ??

Please help..
Thanks n rgds,
Daniel
Telerik team
 answered on 03 Mar 2010
3 answers
133 views
Hi
First of all a Great product. I have used this example below and built a page.
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx


Everything works perfectly , I see the grid, I am able to Edit/Insert rows into the grid. I have one small problem though. When I insert a new row, I am able to add the row using the webuser control but the webuser control stays on the grid, The grid does not get refreshed and the edit form does not go away, but on edit, everything works as required, the edit form shows up, I am able to make changes and when I click update the grid shows up with the updated row.

Any ideas on why the insert would not refresh the grid ?

thanks
Sekar

Princy
Top achievements
Rank 2
 answered on 03 Mar 2010
3 answers
158 views
Is there a way we can change mouse style to something custom instead of standard style when dragging and dropping of rows in grid. Right now it shows the whole record that is being dragged.

Thanks
Venkat
Yavor
Telerik team
 answered on 03 Mar 2010
1 answer
85 views
Hi,

For most of my RadGrid, I use ItemStyle wrap="false" and headerstyle wrap="false" to take the maximum size without any extra space or wrapping. But for frozen column that does not work. I saw in some forum posts that to scroll through all the columns properly, I have to give Headerstyle width to some fixed pixel at Mastertableview level and then increase or decrease the width as per the requirement for other columns explicilty. It works ok but there are extra white space or sometimes wrapping if the column value is big. Is there a way to have wrap="false" for Item and headerstyle with frozen column?

Thanks.
 
Pavlina
Telerik team
 answered on 03 Mar 2010
1 answer
337 views

 

I have a RadGrid using XML file as data source and the field on this XML file is not formatted.  We need to format the value in the field as percentage with two decimal digits and I have coded as shown below:

        <telerik:GridBoundColumn DataField="Percentage" HeaderText="Percentage" SortExpression="Percentage"   
            UniqueName="Percentage" DataFormatString="{0:#####.## %}"   
            EditFormHeaderTextFormat="{0:#####.## %}" > 
        </telerik:GridBoundColumn> 

However, no matter what I change on the DataFormatString the value shows without formatting.  Can you please help?  Thank you.

 

 

 

Princy
Top achievements
Rank 2
 answered on 03 Mar 2010
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?