Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
182 views
hi,

I have a problem with binding data to a radgrid from client side!!!!
I have a WCFServiceLibrary where my service class and it's interface are in. In this service class I have defined the getAllPlaceDefinitions() method as follows :

public List<AccPlc> getAllPlaceDefinitions(int startIndex, int maxRowCount, int someParameter)
        {
            List<AccPlc> list = (from plc in Generals.DbList.AccPlcs
                                 select plc).ToList();

            return list;
        }


 In a WCFWebsite ,called http://localhost:11, I have defined my svc file(In folder BasicSetting). This file is called "PlacesDefinitionManager.svc".

In my ASP.Net website I used the radgrid, mastertable and I defined my columns in it.
Client Setting code is as follows :

<ClientSettings>
                        <DataBinding SelectMethod="getAllPlaceDefinitions"  Location="http://localhost:11/BasicSetting/PlacesDefinitionManager.svc"
                            EnableCaching="false">
                        </DataBinding>
                    </ClientSettings>

When I browse this page the grid brings some empty rows.:(  I think it doesn't find the svc file or cannot use it.
Would you please help me with my problem?!?!





Nikolay Rusev
Telerik team
 answered on 06 Aug 2009
1 answer
70 views
want to do sum of all the estimated cost but from code behind not using design time .  How to achieve this through code behind . I am trying to do this but it only the sum first five records in grid .


For Each ditim As GridDataItem In dgProposals.MasterTableView.Items
            Dim fieldValue As Double = CDbl(ditim("Estcost").Text.Substring(0))
            txtallproposal.Text = fieldValue + tm
            tm = txtallproposal.Text
        Next



Princy
Top achievements
Rank 2
 answered on 06 Aug 2009
1 answer
110 views
Is it possible to load a RadControl in a RadWindow?
Currently, I'm trying to load a radProgressArea into a
RadWindow as a modal so a user cannot navigate anywhere
else during upload process. Please let me know what you think.
Thank you
Georgi Tunev
Telerik team
 answered on 06 Aug 2009
1 answer
55 views
am i missing something or does the radwindowmanager dialog for creating windows not allow you to set multiple behaviours.


on the dialog you get a simple drop down that lets u select one behaviour but you cant pick multiple choices, in the source you have to enter "reload, resize" etc etc



thanks
kevin
Georgi Tunev
Telerik team
 answered on 06 Aug 2009
1 answer
108 views
Hello Sir

In my Radgrid one column contains date , i want to filter out the data yearly means if i enter the year 2008 then it will automatically search the record of year 2008.

and IInd is
In my Radgrid one column contains Cost , it contains the amount 3000.00 format ,, if i enter the value text format then it will give the error .. Is it possible to validate to users enters only Number format data .....


How to achieve this above two functionality ??


How to customize the Date  ? How to seach data yearly ?


Its urgent.....................................

Thanks
Regard
Rahul
Yavor
Telerik team
 answered on 06 Aug 2009
1 answer
318 views
Hi,

I have a RadContextMenu to which I am adding RadMenuItem's. Now for a particular RadMenuItem, I dont want to do a postback.

How can achieve this functionality???


Thanks,
Mahesh
Shinu
Top achievements
Rank 2
 answered on 06 Aug 2009
1 answer
109 views
hi,
i am new new in telerik, and i am try print the selected row in grid or the update window(pop-up).
i can do this?
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!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 id="Head1" runat="server">  
    <style type="text/css">  
    .CommandStyle, .EditCommandStyle  
    {  
        font-size:9.5pt;  
        font-family:Arial;  
        font-weight:bold;  
        color:#003399;  
    }  
    </style> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <table width="100%" dir=rtl>  
            <tr> 
                <td align="center">  
                    <table> 
                        <tr> 
                            <td> 
                                <img src="images/ramat.jpg" alt="" /> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td dir="rtl">  
                                  
                                <telerik:RadGrid ID="rgSapakim" runat="server" Skin="WebBlue"   
                                    HeaderStyle-HorizontalAlign="Right" 
                                    AllowAutomaticUpdates="True" AllowAutomaticInserts="True"   
                                    DataSourceID="sqlDSSapakim" GridLines="None" Font-Bold="False"   
                                    Font-Italic="False" Font-Overline="False" Font-Strikeout="False"   
                                    Font-Underline="False" HorizontalAlign="Right" AllowFilteringByColumn="True"   
                                    AllowSorting="True" AllowAutomaticDeletes="True" oninit="rgSapakim_Init">  
                                    <MasterTableView EditMode="PopUp" Width="100%"   AutoGenerateColumns="False" DataKeyNames="Kod_sapak" CommandItemDisplay="TopAndBottom"   
                                        DataSourceID="sqlDSSapakim" 
                                        CellSpacing="-1" GridLines="None" allowmulticolumnsorting="True">  
                                        <CommandItemSettings  AddNewRecordText="New" RefreshText="Refreh"></CommandItemSettings> 
 
                                        <Columns> 
                                            <telerik:GridBoundColumn DataField="Kod_sapak" DataType="System.Int32"   
                                                HeaderText="קוד ספק" ReadOnly="True" SortExpression="Kod_sapak"   
                                                UniqueName="Kod_sapak" FilterControlWidth="30px"   
                                                CurrentFilterFunction="EqualTo">  
                                            <ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridTemplateColumn DataField="Shem_sapak" HeaderText="שם הספק"   
                                                SortExpression="Shem_sapak" UniqueName="Shem_sapak">  
                                                <EditItemTemplate> 
                                                    <asp:TextBox ID="Shem_sapakTextBox" runat="server"   
                                                        Text='<%# Bind("Shem_sapak") %>'></asp:TextBox> 
                                                    <span style="color: Red">*</span> 
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator_ShemSapak" ControlToValidate="Shem_sapakTextBox" 
                                                        ErrorMessage="שדה חובה" runat="server">  
                            </asp:RequiredFieldValidator> 
                                                </EditItemTemplate> 
                                                <ItemTemplate> 
                                                    <asp:Label ID="Shem_sapakLabel" runat="server" Text='<%# Eval("Shem_sapak") %>'></asp:Label> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridBoundColumn EditFormColumnIndex="0" DataField="Shem_Male_ish_kesher"   
                                                HeaderText="שם מלא איש קשר"   
                                                SortExpression="Shem_Male_ish_kesher" UniqueName="column2">  
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn EditFormColumnIndex="0" DataField="Tel_misrad" HeaderText="טלפון משרד"   
                                                SortExpression="Tel_misrad" UniqueName="Tel_misrad"   
                                                 AllowFiltering="False" AllowSorting="False">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn EditFormColumnIndex="0" DataField="Tel_nayad" HeaderText="טלפון נייד"   
                                                SortExpression="Tel_nayad" UniqueName="Tel_nayad" 
                                                AllowFiltering="False" AllowSorting="False">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn EditFormColumnIndex="0" DataField="Fax" HeaderText="פקס" SortExpression="Fax"   
                                                UniqueName="Fax" AllowFiltering="False"   
                                                AllowSorting="False">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn Visible="false" EditFormColumnIndex="1" DataField="Email" HeaderText="אימייל"   
                                                SortExpression="Email" UniqueName="Email" FilterControlWidth="0px"   
                                                AllowFiltering="False" AllowSorting="False">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn Visible="false" EditFormColumnIndex="1" DataField="Ta_doaar" HeaderText="תא דואר"   
                                                SortExpression="Ta_doaar" UniqueName="Ta_doaar" FilterControlWidth="0px"   
                                                AllowFiltering="False">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn Visible="false" EditFormColumnIndex="1" DataField="Ktovet" HeaderText="כתובת"   
                                                SortExpression="Ktovet" UniqueName="Ktovet" FilterControlWidth="50px">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridCheckBoxColumn EditFormColumnIndex="1" DataField="Status_sapak" HeaderText="סטאטוס ספק"   
                                                SortExpression="Status_sapak" UniqueName="Status_sapak"   
                                                FilterControlWidth="40px">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridCheckBoxColumn> 
                                            <telerik:GridNumericColumn Visible="false" EditFormColumnIndex="1" DataField="Hanacat_sapak_kvuaa" NumericType="Percent" 
                                                DataType="System.Decimal" HeaderText="הנחת ספק קבועה"   
                                                SortExpression="Hanacat_sapak_kvuaa" UniqueName="Hanacat_sapak_kvuaa"   
                                                FilterControlWidth="30px">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridNumericColumn> 
                                            <telerik:GridDropDownColumn Visible="false" EditFormColumnIndex="2" DataField="Aminut" HeaderText="אמינות"    
                                                SortExpression="Aminut" UniqueName="Aminut" DataSourceID="sqlDSZion_Sapakim"   
                                                ListValueField="Kod_zion" ListTextField="Teur_zion"   
                                                FilterControlWidth="30px">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridDropDownColumn> 
                                            <telerik:GridDropDownColumn Visible="false" EditFormColumnIndex="2" DataField="Mecirim" HeaderText="מחירים"   
                                                SortExpression="Mecirim" UniqueName="Mecirim" DataSourceID="sqlDSZion_Sapakim"   
                                                ListValueField="Kod_zion" ListTextField="Teur_zion"   
                                                FilterControlWidth="30px">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridDropDownColumn> 
                                            <telerik:GridDropDownColumn Visible="false" EditFormColumnIndex="2" DataField="Nikayon" HeaderText="נקיון"   
                                                SortExpression="Nikayon" UniqueName="Nikayon" DataSourceID="sqlDSZion_Sapakim"   
                                                ListValueField="Kod_zion" ListTextField="Teur_zion"   
                                                FilterControlWidth="30px">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridDropDownColumn> 
                                            <telerik:GridDropDownColumn Visible="false" EditFormColumnIndex="2" DataField="Amida_be_luz" HeaderText="עמידה בלוז"   
                                                SortExpression="Amida_be_luz" UniqueName="Amida_be_luz" DataSourceID="sqlDSZion_Sapakim"   
                                                ListValueField="Kod_zion" ListTextField="Teur_zion"   
                                                FilterControlWidth="30px">  
<ItemStyle HorizontalAlign="Right"></ItemStyle> 
                                            </telerik:GridDropDownColumn> 
                                            <telerik:GridTemplateColumn DataField="Zion_sofi" DataType="System.Decimal"   
                                                EditFormColumnIndex="2" HeaderText="ציון סופי" SortExpression="Zion_sofi"   
                                                UniqueName="Zion_sofi">  
                                                <EditItemTemplate> 
                                                    <asp:Label ID="Zion_sofiLabel" runat="server" Text='<%# Eval("Zion_sofi") %>'></asp:Label> 
                                                </EditItemTemplate> 
                                                <ItemTemplate> 
                                                    <asp:Label ID="Zion_sofiLabel" runat="server" Text='<%# Eval("Zion_sofi") %>'></asp:Label> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridButtonColumn CommandName="Edit" Text="עריכה" 
                                                UniqueName="EditColumn">  
<ItemStyle HorizontalAlign="Right" CssClass="CommandStyle" ForeColor="#003399"></ItemStyle> 
                                            </telerik:GridButtonColumn> 
                                            <telerik:GridButtonColumn CommandName="Delete" Text="מחיקה" ConfirmText="האם אתה בטוח שברצונך למחוק ספק זה?" ConfirmDialogType="RadWindow" 
                                                ConfirmTitle="מחיקה" UniqueName="column1">  
                                                <ItemStyle CssClass="CommandStyle" ForeColor="#003399" /> 
                                            </telerik:GridButtonColumn> 
                                        </Columns> 
 
                                    <EditFormSettings ColumnNumber="3" PopUpSettings-Modal="true" PopUpSettings-Width="750px"  CaptionFormatString="עדכון ספק מספר : {0}" CaptionDataField="kod_sapak">  
<EditColumn CancelText="ביטול" UpdateText="שמירה" InsertText="שמירה"></EditColumn> 
<FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditCommandStyle"></FormTableButtonRowStyle> 
 
<PopUpSettings Modal="True" Width="700px"></PopUpSettings> 
 
                                    </EditFormSettings> 
                                        <EditItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
                                            Font-Underline="False" HorizontalAlign="Right" Wrap="True" /> 
                                    </MasterTableView> 
 
<HeaderStyle HorizontalAlign="Right"></HeaderStyle> 
                                    <ClientSettings> 
                                        <Selecting AllowRowSelect="True" /> 
                                    </ClientSettings> 
                                    <EditItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"   
                                        Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Right"   
                                        Wrap="True" /> 
                                    <PagerStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
                                        Font-Underline="False" HorizontalAlign="Right" Wrap="True" /> 
                                    <CommandItemStyle Font-Bold="True" Font-Overline="True" Font-Size="11pt" /> 
                                </telerik:RadGrid> 
                            </td> 
                        </tr> 
                    </table> 
                </td> 
            </tr> 
        </table> 
        <asp:SqlDataSource ID="sqlDSSapakim" runat="server"   
            ConnectionString="<%$ ConnectionStrings:ramatRachelConString %>"   
            DeleteCommand="DELETE FROM [whk_Sapakim] WHERE [Kod_sapak] = @Kod_sapak"   
            InsertCommand="INSERT INTO [whk_Sapakim] ([Shem_sapak], [Shem_Male_ish_kesher], [Tel_misrad], [Tel_nayad], [Fax], [Email], [Ta_doaar], [Ktovet], [Status_sapak], [Aminut], [Hanacat_sapak_kvuaa], [Mecirim], [Nikayon], [Amida_be_luz]) VALUES (@Shem_sapak, @Shem_Male_ish_kesher, @Tel_misrad, @Tel_nayad, @Fax, @Email, @Ta_doaar, @Ktovet, @Status_sapak, @Aminut, @Hanacat_sapak_kvuaa, @Mecirim, @Nikayon, @Amida_be_luz)"   
            SelectCommand="SELECT [Kod_sapak], [Shem_sapak], [Shem_Male_ish_kesher], [Tel_misrad], [Tel_nayad], [Fax], [Email], [Ta_doaar], [Ktovet], [Status_sapak], [Aminut], [Hanacat_sapak_kvuaa], [Mecirim], [Nikayon], [Amida_be_luz], (Aminut + Mecirim + Nikayon + Amida_be_luz)/4 AS Zion_Sofi FROM [whk_Sapakim]"   
            UpdateCommand="UPDATE [whk_Sapakim] SET [Shem_sapak] = @Shem_sapak, [Shem_Male_ish_kesher] = @Shem_Male_ish_kesher, [Tel_misrad] = @Tel_misrad, [Tel_nayad] = @Tel_nayad, [Fax] = @Fax, [Email] = @Email, [Ta_doaar] = @Ta_doaar, [Ktovet] = @Ktovet, [Status_sapak] = @Status_sapak, [Aminut] = @Aminut, [Hanacat_sapak_kvuaa] = @Hanacat_sapak_kvuaa, [Mecirim] = @Mecirim, [Nikayon] = @Nikayon, [Amida_be_luz] = @Amida_be_luz WHERE [Kod_sapak] = @Kod_sapak">  
            <DeleteParameters> 
                <asp:Parameter Name="Kod_sapak" Type="Int32" /> 
            </DeleteParameters> 
            <UpdateParameters> 
                <asp:Parameter Name="Shem_sapak" Type="String" /> 
                <asp:Parameter Name="Shem_Male_ish_kesher" Type="String" /> 
                <asp:Parameter Name="Tel_misrad" Type="String" /> 
                <asp:Parameter Name="Tel_nayad" Type="String" /> 
                <asp:Parameter Name="Fax" Type="String" /> 
                <asp:Parameter Name="Email" Type="String" /> 
                <asp:Parameter Name="Ta_doaar" Type="String" /> 
                <asp:Parameter Name="Ktovet" Type="String" /> 
                <asp:Parameter Name="Status_sapak" Type="String" /> 
                <asp:Parameter Name="Aminut" Type="Int32" /> 
                <asp:Parameter Name="Hanacat_sapak_kvuaa" Type="Decimal" /> 
                <asp:Parameter Name="Mecirim" Type="Int32" /> 
                <asp:Parameter Name="Nikayon" Type="Int32" /> 
                <asp:Parameter Name="Amida_be_luz" Type="Int32" />              
                <asp:Parameter Name="Kod_sapak" Type="Int32" /> 
            </UpdateParameters> 
            <InsertParameters> 
                <asp:Parameter Name="Shem_sapak" Type="String" /> 
                <asp:Parameter Name="Shem_Male_ish_kesher" Type="String" /> 
                <asp:Parameter Name="Tel_misrad" Type="String" /> 
                <asp:Parameter Name="Tel_nayad" Type="String" /> 
                <asp:Parameter Name="Fax" Type="String" /> 
                <asp:Parameter Name="Email" Type="String" /> 
                <asp:Parameter Name="Ta_doaar" Type="String" /> 
                <asp:Parameter Name="Ktovet" Type="String" /> 
                <asp:Parameter Name="Status_sapak" Type="String" /> 
                <asp:Parameter Name="Aminut" Type="Int32" /> 
                <asp:Parameter Name="Hanacat_sapak_kvuaa" Type="Decimal" /> 
                <asp:Parameter Name="Mecirim" Type="Int32" /> 
                <asp:Parameter Name="Nikayon" Type="Int32" /> 
                <asp:Parameter Name="Amida_be_luz" Type="Int32" /> 
            </InsertParameters> 
        </asp:SqlDataSource> 
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
        </telerik:RadScriptManager> 
        <asp:SqlDataSource ID="sqlDSZion_Sapakim" runat="server"   
            ConnectionString="<%$ ConnectionStrings:ramatRachelConString %>"   
              
            SelectCommand="SELECT [Kod_zion], [Teur_ zion] AS Teur_zion FROM [whk_Zion_Sapakim]"></asp:SqlDataSource> 
 
    </form> 
</body> 
</html> 
 
Yavor
Telerik team
 answered on 06 Aug 2009
2 answers
181 views
Scenario: I wanted to add the radgrid in a webpart childcontrols collection. Why do i need the scriptmanager how to avoid it?
Because i am getting an error stating the necessity of scriptmanager. Please do let me know on this.


Thanks a million in advance.
Princy
Top achievements
Rank 2
 answered on 06 Aug 2009
1 answer
117 views
I have several similar but not identical tables (which I'm binding various comboboxes to), and I'd like to use one form to edit them all.  Using autogenerated columns works fine, except I'd like to hide the primary key columns since the contents are meaningless and confusing for end users.  Is there any way to do this?
Princy
Top achievements
Rank 2
 answered on 06 Aug 2009
1 answer
134 views

 

When I drag reorder or reorder with the buttons, it works great, but then when I post back via a save button and loop through the items, the Text is in the right order, but the Value is the original value.

So a simple name list
Ken (id 1234)
Brian (id 2345)
Matt (id 3456)

if I reordered Matt to the top, the result during the "SAVE" postback would be:

Matt (id 1234)
Ken (id 2345)
Brian (id 3456)


(notice the IDs have not changed)

Can anyone help??

Here the code.

<
telerik:RadListBox ID="listReorder" Width="250px"

 

 

 

ButtonSettings-VerticalAlign="Middle" Height="300px" AllowReorder="true"

 

 

 

EnableDragAndDrop="true" DataKeyField="PersonID" DataTextField="PersonFullName"

 

 

 

ButtonSettings-ShowReorder="true" runat="server"/>


 

 

protected void btnSave_Click(object sender, EventArgs e)

 

{

 

 

foreach (RadListBoxItem item in listReorder.Items)

 

{
    string fullName =  = item.Text; //LOOKS GOOD

 

 

    int personID = Convert.ToInt32(item.DataKey); //ORIGINAL DATA BOUND VALUE

 

 

 

}
}

 

 

 

Ken Platt
Top achievements
Rank 1
 answered on 05 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?