Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
248 views
Team,

As per my requirement am converting HTML Table to DataTable.
And then I bind that DataTable as a Datasource of Radgrid.
My problem  is I dont want the header generated as Column0, Column1, Column2...
Instead of that I want first 2 rows of the DataTable to be the Header and frozen.

Pls. Reply, we bought your Tool for our application development.

Thanks
Dimo
Telerik team
 answered on 20 Sep 2010
6 answers
262 views
My setting is like this:     
 <telerik:RadToolTip ID="uxRadToolTip" runat="server" Height="80px" Width="250px"
        RelativeTo="BrowserWindow" Position="Center" ShowEvent="FromCode" Modal="true">

In Chrome, when you scroll down to the bottom of the page(the href which triggers this popup is on the top of the window now), click the href which triggers this popup, then you could see the backgroud is locked which is correct, but we can't see the popup itself(It's ok in IE67 and firefox23, but not in Chrome.).

Could you give me any suggestion?
Svetlina Anati
Telerik team
 answered on 20 Sep 2010
1 answer
117 views
Hi

I am trying to suppress the "SpellChecking Complete!" and "No mistakes found" messages displayed by the Rad Ajax Spellchecker embedded in the RadEditor (I am using version 2010.2.713.35 dll)

I found an approach in another very old forum post which i think may now be outdated which discussed setting a "UseEmbeddedScripts" property on my radEditor control.  This setting appears to have been deprecated as I cannot set it in my codebehind (where i create my editor).

What is the latest recommendation for achieving this ?

Thanks
Rumen
Telerik team
 answered on 20 Sep 2010
2 answers
285 views
Hello Telerik,

I have the following RadGrid on my page:

<telerik:RadGrid ID="rgVehicles" runat="server"
    AutoGenerateColumns="True"
    AllowFilteringByColumn="True" AllowPaging="True"
    AllowSorting="True">
    <PagerStyle Mode="NextPrevAndNumeric" />
    <GroupingSettings CaseSensitive="false" />
</telerik:RadGrid>

I then assign a DataTable to the RadGrid's DataSource property (on Page_Load):

rgVehicles.DataSource = dsVehicles.Tables[0];
rgVehicles.DataBind();

Filtering is completely disabled when I run the website and view this RadGrid. Your documentation states:

The built-in filtering feature is not supported when you bind the grid by explicitly calling DataBind().

My question is, how do I enable filtering then? Bare in mind AutoGenerateColumns is set to True, meaning when I call a Stored Procedure and populate a DataSet, I won't always know what the columns will be.
KobusVisagie
Top achievements
Rank 1
 answered on 20 Sep 2010
3 answers
86 views
i want to set Monday to Saturday as working-days by defaults it take Monday and Friday.
Veronica
Telerik team
 answered on 20 Sep 2010
1 answer
78 views
I add the Related Radboboxes (like city combobox and state combobox) as a usercontrol , there is a problem when i use this usercontrol twice in the same page, when i click the first usercontrol  state Combobox it will load the city combobox which is the second usercontrol not the first usercontrol. anybody can help me?
<script type="text/javascript">
    //global variables for the countries and cities comboboxes
    var countriesCombo;
    var citiesCombo;
  
    function pageLoad() {
        // initialize the global variables
        // in this event all client objects 
        // are already created and initialized 
        countriesCombo = $find("<%= ddlState.ClientID %>");
        citiesCombo = $find("<%= ddlCity.ClientID %>");
    }
  
    function GetStateList(combo, eventArqs) {
        var item = eventArqs.get_item();
        countriesCombo.set_text("Loading...");
        citiesCombo.clearSelection();
  
        // if a continent is selected
        if (item.get_index() > 0) {
            // this will fire the ItemsRequested event of the 
            // countries combobox passing the continentID as a parameter 
            countriesCombo.requestItems(item.get_value(), false);
        }
        else {
            // the -Select a continent- item was chosen
            countriesCombo.set_text(" ");
            countriesCombo.clearItems();
  
            citiesCombo.set_text(" ");
            citiesCombo.clearItems();
        }
    }
  
    function GetCityList(combo, eventArqs) {
        var item = eventArqs.get_item();
  
        citiesCombo.set_text("Loading...");
        // this will fire the ItemsRequested event of the
        // cities combobox passing the countryID as a parameter 
        citiesCombo.requestItems(item.get_value(), false);
    }
  
    function ItemsLoaded(combo, eventArqs) {
        if (combo.get_items().get_count() > 0) {
            // pre-select the first item
            combo.set_text(combo.get_items().getItem(0).get_text());
            combo.get_items().getItem(0).highlight();
        }
        combo.showDropDown();
    }
  
</script>
<tr>
        <td><asp:Label ID="Label1" runat="server" AssociatedControlID="ddlState">state:</asp:Label></td>
        <td>
            <telerik:RadComboBox ID="ddlState" runat="server" Height="200"
                OnClientSelectedIndexChanging="GetCityList" OnClientItemsRequested="ItemsLoaded" 
                OnItemsRequested="ddlState_ItemsRequested" >
            </telerik:RadComboBox>
        </td>
        <td></td>
    </tr>
    <tr>
        <td><asp:Label ID="Label3" runat="server" AssociatedControlID="ddlCity">city:</asp:Label></td>
        <td>
            <telerik:RadComboBox ID="ddlCity" runat="server" Height="200"
                OnClientItemsRequested="ItemsLoaded"
                OnItemsRequested="ddlCity_ItemsRequested">
            </telerik:RadComboBox>
        </td>
        <td></td>
    </tr>
    <tr>
        <td><asp:Label ID="Label2" runat="server" AssociatedControlID="ddlCountryID">contry:</asp:Label></td>
        <td>
            <telerik:RadComboBox ID="ddlCountryID" runat="server" Height="200"
                OnClientSelectedIndexChanging="GetStateList"
                OnItemsRequested="ddlCountryID_ItemsRequested">
            </telerik:RadComboBox>
        </td>
        <td></td>
    </tr>
<uc3:Address ID="ucBillingAddress" runat="server" 
                    DefaultMode="Edit"
                    ValidationGroup="address"
                    AddressID='<% #Bind("AddressID") %>'
                    FirstName='<% #Bind("FirstName") %>'
                    CompanyName='<% #Bind("CompanyName") %>'
                    PhoneNo='<% #Bind("PhoneNo") %>'
                    FaxNo='<% #Bind("FaxNo")%>'
                    Address1='<% #Bind("Address1") %>'
                    Address2='<% #Bind("Address2") %>'
                    CityID='<% #Bind("CityID") %>'
                    StateID='<% #Bind("StateID") %>'
                    CountryID='<% #Bind("CountryID") %>'
                    ZIPCode='<% #Bind("ZIPCode") %>'
                    />
<uc3:Address ID="ucShippingAddress" runat="server" 
                DefaultMode="Edit"
                ValidationGroup="address"
                AddressID='<% #Bind("AddressID") %>'
                FirstName='<% #Bind("FirstName") %>'
                CompanyName='<% #Bind("CompanyName") %>'
                PhoneNo='<% #Bind("PhoneNo") %>'
                FaxNo='<% #Bind("FaxNo")%>'
                Address1='<% #Bind("Address1") %>'
                Address2='<% #Bind("Address2") %>'
                CityID='<% #Bind("CityID") %>'
                StateID='<% #Bind("StateID") %>'
                CountryID='<% #Bind("CountryID") %>'
                ZIPCode='<% #Bind("ZIPCode") %>'
                />
sam
Top achievements
Rank 1
 answered on 20 Sep 2010
6 answers
533 views

I had a LinkButton that is repeated inside the repeater. The repeater is nested inside the RadGrid.
When clicked on the LinkButton, there is partial postback but loading panel is not shown.

How do I change it have loading panel once the link button is clicked?

<telerik:RadAjaxManager ID="AjaxManager" runat="server">
        <telerik:AjaxSetting AjaxControlID="Grid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Grid1" LoadingPanelID="AjaxLoadingPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  
<telerik:RadGrid ID="Grid1" runat="server" AutoGenerateColumns="False"
    <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID,Write" TableLayout="Fixed"
        <Columns
            .... 
            <telerik:GridTemplateColumn HeaderText="Sub Data" UniqueName="SubData"
                <ItemTemplate
                    <asp:Repeater ID="Repeater1" runat="server" DataSource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("SubData") %>' OnItemCommand="Repeater1_ItemCommand"> 
                        <ItemTemplate
                            <asp:LinkButton ID="LinkButton1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "[\"Name\"]")%>' CommandName="RELOAD" /> 
                        </ItemTemplate
                    </asp:Repeater
                </ItemTemplate
            </telerik:GridTemplateColumn
        </Columns
    </MasterTableView
    <ClientSettings
    ... 
    </ClientSettings
</telerik:RadGrid>

protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
    if (e.CommandName == "RELOAD")
    {
        ...
        // rebind the grid1
    }
}


Thanks in advance.

jing
Top achievements
Rank 1
 answered on 20 Sep 2010
1 answer
191 views
     Hi everybody.
      My database is oracle. and i use sqldatasource to access database. My RadGrid's datasource is the sqldatatabase. the oracle database have no bool datatype. So some fields i used the number 0 and 1 instead. the 1 is true and the 0 is false.  in the radgrid. I show the field by checkbox. the code like this:
  <telerik:GridTemplateColum>
     <ItemTemplate>
         <asp:CheckBox id="chkBool" checked='<%# DataBinder(Container,"DataItem.SomeField").ToString()=="1"?true:false %>' />
    </ItemTemplate>
  </telerik:GridTemplateColum>
     And In my edit form. I also use the CheckBox like this 
 <asp:CheckBox id="chkBool" checked='<%# DataBinder(Container,"DataItem.SomeField").ToString()=="1"?true:false %>' /> 
   so  how can it automatic update or insert the data to oracle?
     And when I want to Update a row by edit form, How can i update the data? And How do i write the Sqldatasource's updatecommand?


<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="DataEditor.aspx.cs" Inherits="Default2" %>
<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>
<asp:Content ID="Content1"  ContentPlaceHolderID="GlobeContentPH" Runat="Server">
    <link href="styles/style/css/main.css" rel="stylesheet" type="text/css" />
     <style type="text/css">
        .MyImageButton
        {
           cursor: hand;
        }
        .EditFormHeader td
        {
            font-size: 14px;
            padding: 4px !important;
            color: #0066cc;
        }
        </style>

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
<table style=" width:100%; border:0px">
  <tr style=" width:100%">
      <td style=" width:100%">
      <div id="RadGrid" style="width:100%">
 
   <telerik:RadGrid ID="RadGrid1" AllowAutomaticUpdates="True" Width="100%"   AllowAutomaticDeletes="True"
            DataSourceID="SqlDataSource1" AllowSorting="True"
            AllowPaging="True" runat="server" ShowFooter="True" AllowMultiRowSelection="True"
            PageSize="20" AllowMultiRowEdit="True" AllowAutomaticInserts="True"  OnItemUpdated="RadGrid1_ItemUpdated"
         Skin="Vista" GridLines="None">
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView Width="100%" CommandItemDisplay="Top"
                DataSourceID="SqlDataSource1" AutoGenerateColumns="False">
                <Columns>
                    <telerik:GridBoundColumn DataField="序号" DataType="System.Decimal"
                        HeaderText="序号" SortExpression="序号" UniqueName="序号">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="作业区" HeaderText="作业区" SortExpression="作业区"
                        UniqueName="作业区">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="监测点代号" DataType="System.Decimal"
                        HeaderText="监测点代号" SortExpression="监测点代号" UniqueName="监测点代号">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="监测点名称" HeaderText="监测点名称"
                        SortExpression="监测点名称" UniqueName="监测点名称">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="监测点部位" HeaderText="监测点部位"
                        SortExpression="监测点部位" UniqueName="监测点部位">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="建点日期" DataType="System.DateTime"
                        HeaderText="建点日期" SortExpression="建点日期" UniqueName="建点日期">
                    </telerik:GridBoundColumn>
        
                    <telerik:GridBoundColumn DataField="氢探针" HeaderText="氢探针" SortExpression="氢探针"
                        UniqueName="氢探针" DataType="System.Decimal">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="电阻探针" HeaderText="电阻探针"
                        SortExpression="电阻探针" UniqueName="电阻探针" DataType="System.Decimal">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="试片失重法" HeaderText="试片失重法"
                        SortExpression="试片失重法" UniqueName="试片失重法" DataType="System.Decimal">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="介质"
                        HeaderText="介质" SortExpression="介质" UniqueName="介质">
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridBoundColumn DataField="管线材质" HeaderText="管线材质" SortExpression="管线材质"
                        UniqueName="管线材质">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="管线规格" HeaderText="管线规格"
                        SortExpression="管线规格" UniqueName="管线规格">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="报废日期" HeaderText="报废日期"
                        SortExpression="报废日期" UniqueName="报废日期" DataType="System.DateTime">
                    </telerik:GridBoundColumn>
                 <%--   <telerik:GridBoundColumn DataField="是否现用" HeaderText="是否现用"
                        SortExpression="是否现用" UniqueName="是否现用" DataType="System.Decimal">
                    </telerik:GridBoundColumn>--%>
                    <telerik:GridTemplateColumn DataField="是否现用" HeaderText="是否现用"
                        SortExpression="是否现用" UniqueName="是否现用">
                        <ItemTemplate>
                           <asp:CheckBox ID="CheckBox1" Checked='<%# (DataBinder.Eval( Container, "DataItem.是否现用")).ToString()=="1"?true:false %>' runat="server" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="备注" HeaderText="备注" SortExpression="备注"
                        UniqueName="备注">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="管道名称" HeaderText="管道名称"
                        SortExpression="管道名称" UniqueName="管道名称">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="场站名称" HeaderText="场站名称"
                        SortExpression="场站名称" UniqueName="场站名称">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="照片ID" HeaderText="照片ID"
                        SortExpression="照片ID" UniqueName="照片ID">
                    </telerik:GridBoundColumn>
                </Columns>
              <EditFormSettings EditFormType="Template">
                    <FormTemplate>
                       <div>
                          <div id="show_title"></div>
                          <div id="show_area"></div>
                          <div id="show_main_edit">
                            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                               <tr>
                                <td class="show_main_td_first" >序&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 号:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox  Width="80%" ID="PipsegmentCode" Text='<%# DataBinder.Eval( Container, "DataItem.序号" ) %>' runat="server"></asp:TextBox>
                                            </td>
                                <td class="show_main_td_last">作 业 区:</td>
                                <td class="show_main_td_last">
                                      <asp:DropDownList ID="DropDownList1" Width="39%" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="DropDownList2" Width="39%" runat="server">
                                    </asp:DropDownList>
                        &nbsp; </td>
                              </tr>
                                <tr>
                                <td class="show_main_td_first" >监测点代号:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox Width="80%" ID="PipeSegmentLength" Text='<%# DataBinder.Eval( Container, "DataItem.监测点代号" ) %>' runat="server"></asp:TextBox>
                                            </td>
                                <td class="show_main_td_last">监测点名称:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox runat="server"  Text='<%# DataBinder.Eval( Container, "DataItem.监测点名称" ) %>'   Width="80%" ID="PipeDiameter"></asp:TextBox>
                                            </td>
                              </tr>
                              <tr>
                                <td class="show_main_td_first">监测点部位:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox ID="PipeThickness" Text='<%# DataBinder.Eval( Container, "DataItem.监测点部位" ) %>'  Width="80%" runat="server"></asp:TextBox>
                                            </td>
                                <td class="show_main_td_last">管线规格:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox ID="SteelClass" Text='<%# DataBinder.Eval( Container, "DataItem.管线规格" ) %>'  Width="80%" runat="server"></asp:TextBox>
                                            </td>
                              </tr>
                                <tr>
                                <td class="show_main_td_first" >管线材质:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox ID="MadeStyle" Text='<%# DataBinder.Eval( Container, "DataItem.管线材质" ) %>'  Width="80%" runat="server"></asp:TextBox>
                                            </td>
                                <td class="show_main_td_last">介&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 质:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox ID="JointMethod" Text='<%# DataBinder.Eval( Container, "DataItem.介质" ) %>' Width="80%" runat="server"></asp:TextBox>
                                            </td>
                              </tr>
                              <tr>
                                <td class="show_main_td_first">试片失重法:</td>
                                <td class="show_main_td_last">
                                      <%--<asp:DropDownList ID="DropDownList3" SelectedValue='<%# DataBinder.Eval( Container, "DataItem.试片失重法" ) %>'    Width="80%" runat="server">
                                       <asp:ListItem Value="1" Text="是"></asp:ListItem>                                  
                                       <asp:ListItem Value="0" Text="否"></asp:ListItem>
                                    </asp:DropDownList>  --%>
                                     <asp:CheckBox ID="chkSPSZF" Checked='<%# (DataBinder.Eval( Container, "DataItem.试片失重法")).ToString()=="1"?true:false %>' runat="server" />
                                            </td>
                                <td class="show_main_td_last">电阻探针:</td>
                                <td class="show_main_td_last">
                                  <%--  <asp:DropDownList ID="DropDownList4" SelectedValue='<%# Bind("电阻探针") %>'   Width="80%" runat="server">
                                       <asp:ListItem Value="1" Text="是"></asp:ListItem>                                  
                                       <asp:ListItem Value="0" Text="否"></asp:ListItem>
                                    </asp:DropDownList> --%> <asp:CheckBox ID="chkDZTZ" Checked='<%# (DataBinder.Eval( Container, "DataItem.电阻探针")).ToString()=="1"?true:false %>' runat="server" />
                                            </td>
                              </tr>
                                <tr>
                                <td class="show_main_td_first" >氢探针:</td>
                                <td class="show_main_td_last">
                                    <asp:CheckBox ID="chkQTZ" Checked='<%# (DataBinder.Eval( Container, "DataItem.氢探针")).ToString()=="1"?true:false %>' runat="server" />
                                            </td>
                                <td class="show_main_td_last">建点日期:</td>
                                <td class="show_main_td_last">
                                    <telerik:RadDatePicker ID="RadDatePicker2"   DbSelectedDate='<%# DataBinder.Eval( Container, "DataItem.建点日期" ) %>' Width="80%"   runat="server" >
                                      <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">
                                      </Calendar>
                                       <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                                     <DateInput DisplayDateFormat="yyyy-M-d"   DateFormat="yyyy-M-d"></DateInput>
                                    </telerik:RadDatePicker>

                                            </td>
                              </tr>
                                <tr>
                                <td class="show_main_td_first" >报废日期:</td>
                                <td class="show_main_td_last">
                                    <telerik:RadDatePicker ID="RadDatePicker1" DbSelectedDate='<%# DataBinder.Eval( Container, "DataItem.报废日期" ) %>'   Width="80%" runat="server" >

                        <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"></Calendar>

                        <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

                        <DateInput DisplayDateFormat="yyyy-M-d" DateFormat="yyyy-M-d"></DateInput>
                                    </telerik:RadDatePicker>

                                            </td>
                                <td class="show_main_td_last">是否现用:</td>
                                <td class="show_main_td_last">
                                    <asp:CheckBox ID="CheckBox1" Checked='<%# (DataBinder.Eval( Container, "DataItem.是否现用")).ToString()=="1"?true:false %>' runat="server" />
                                            </td>
                              </tr>
                                <tr>
                                <td class="show_main_td_first" >管道名称:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox ID="EFFECTIVEFROMDATE" Text='<%# DataBinder.Eval( Container, "DataItem.管道名称" ) %>' Width="80%" runat="server"></asp:TextBox>
                                            </td>
                                <td class="show_main_td_first">站场名称:</td>
                                <td class="show_main_td_last">
                                 <asp:TextBox ID="TextBox2" Text='<%# DataBinder.Eval( Container, "DataItem.场站名称" ) %>' Width="80%" runat="server"></asp:TextBox>
                                </td>
                              </tr>
                                   <tr>
                                <td class="show_main_td_first" >照片ID:</td>
                                <td class="show_main_td_last">
                                    <asp:TextBox ID="TextBox1" Text='<%# DataBinder.Eval( Container, "DataItem.照片ID" ) %>' Width="80%" runat="server"></asp:TextBox>
                                            </td>
                                <td class="show_main_td_last">&nbsp; </td>
                                <td class="show_main_td_last">&nbsp;</td>
                              </tr>
                                  
                              <tr>
                                <td class="show_main_td_first">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 注</td>
                                <td colspan="4" class="show_main_td_last">
                                <asp:TextBox ID="TextBox3" Text='<%# DataBinder.Eval( Container, "DataItem.备注" ) %>' TextMode="MultiLine" Width="90%" runat="server"></asp:TextBox></td>
                              </tr>

                            </table>
                            <div id="show_main_do">
                              <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                    </asp:Button>&nbsp;
<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
                        </div>
                          </div>
                        </div>
                    </FormTemplate>
               </EditFormSettings>

                    <CommandItemTemplate>
                    <div style="padding: 5px 5px;">
                        监测点信息表操作:&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" Visible='<%# RadGrid1.EditIndexes.Count == 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Edit.gif" />编辑选择项</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="btnUpdateEdited" runat="server" CommandName="UpdateEdited" Visible='<%# RadGrid1.EditIndexes.Count > 0 %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Update.gif" />更新</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="btnCancel" runat="server" CommandName="CancelAll" Visible='<%# RadGrid1.EditIndexes.Count > 0 || RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Cancel.gif" />取消编辑</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert" Visible='<%# !RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/AddRecord.gif" />添加新监测点</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="LinkButton3" runat="server" CommandName="PerformInsert" Visible='<%# RadGrid1.MasterTableView.IsItemInserted %>'><img style="border:0px;vertical-align:middle;" alt="" src="Images/Insert.gif" /> Add this Customer</asp:LinkButton>&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton1" OnClientClick="javascript:return confirm('删除所有选择的监测点吗?')"
runat="server" CommandName="DeleteSelected"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Delete.gif" />删除选择监测点</asp:LinkButton>&nbsp;&nbsp;
                        <asp:LinkButton ID="LinkButton4" runat="server" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Refresh.gif" />刷新监测点列表</asp:LinkButton>
                    </div>
                </CommandItemTemplate>
            </MasterTableView>
            <ClientSettings>
                <Selecting AllowRowSelect="True" EnableDragToSelectRows="True" />
            </ClientSettings>
        </telerik:RadGrid>

</div>
      </td>
  </tr>
</table>

<div id="DataSource">
<%--      <sds:SessionDataSource runat="server" ID="SessionDS"  ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
        ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"  ConflictDetection="CompareAllValues"  
        SelectCommand="SELECT &quot;序号&quot;, &quot;作业区&quot;, &quot;监测点代号&quot;, &quot;监测点名称&quot;, &quot;监测点部位&quot;, &quot;建点日期&quot;, &quot;氢探针&quot;, &quot;电阻探针&quot;, &quot;试片失重法&quot;, &quot;介质&quot;, &quot;管线材质&quot;, &quot;管线规格&quot;, &quot;报废日期&quot;, &quot;是否现用&quot;, &quot;备注&quot;, &quot;管道名称&quot;, &quot;场站名称&quot;, &quot;照片ID&quot; FROM &quot;监测点名称表&quot;"
        DeleteCommand="DELETE FROM 监测点名称表 WHERE (监测点代号 = ?)"  >
          <DeleteParameters>
        <asp:Parameter Name="监测点代号"  Type="String" />
        </DeleteParameters>
      </sds:SessionDataSource>--%>
       <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
        ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"
        SelectCommand="SELECT &quot;序号&quot;, &quot;作业区&quot;, &quot;监测点代号&quot;, &quot;监测点名称&quot;, &quot;监测点部位&quot;, &quot;建点日期&quot;, &quot;氢探针&quot;, &quot;电阻探针&quot;, &quot;试片失重法&quot;, &quot;介质&quot;, &quot;管线材质&quot;, &quot;管线规格&quot;, &quot;报废日期&quot;, &quot;是否现用&quot;, &quot;备注&quot;, &quot;管道名称&quot;, &quot;场站名称&quot;, &quot;照片ID&quot; FROM &quot;监测点名称表&quot;"
        DeleteCommand="DELETE FROM 监测点名称表 WHERE (监测点代号 = :监测点代号)"
       
        UpdateCommand="UPDATE 监测点名称表 SET 序号 = :序号, 作业区 = :作业区, 监测点代号 = :监测点代号, 监测点名称 = :监测点名称, 监测点部位 = :监测点部位, 建点日期 = :建点日期, 氢探针 = :氢探针, 电阻探针 = :电阻探针, 试片失重法 = :试片失重法, 介质 = :介质, 管线材质 = :管线材质, 管线规格 = :管线规格, 报废日期 = :报废日期, 是否现用 = :是否现用, 备注 = :备注, 管道名称 = :管道名称, 场站名称 = :场站名称, 照片ID = :照片ID WHERE (监测点代号 = :监测点代号)">
        <UpdateParameters>
            <asp:Parameter Name="序号" Type="Int32" />
            <asp:Parameter Name="作业区" Type="String" />
            <asp:Parameter Name="监测点代号" Type="String" />
            <asp:Parameter Name="监测点名称" Type="String" />
            <asp:Parameter Name="监测点部位" Type="String" />
            <asp:Parameter Name="建点日期" Type="DateTime" />
            <asp:Parameter Name="氢探针" Type="Int16" />
            <asp:Parameter Name="电阻探针" Type="Int16" />
            <asp:Parameter Name="试片失重法" Type="Int16" />
            <asp:Parameter Name="介质" Type="String" />
            <asp:Parameter Name="管线材质" Type="String" />
            <asp:Parameter Name="管线规格" Type="String" />
            <asp:Parameter Name="报废日期" Type="DateTime" />
            <asp:Parameter Name="是否现用" Type="Int16" />
            <asp:Parameter Name="备注" Type="String" />
            <asp:Parameter Name="管道名称" Type="String" />
            <asp:Parameter Name="场站名称" Type="String" />
            <asp:Parameter Name="照片ID" Type="String" />
        </UpdateParameters>
        <DeleteParameters>
        <asp:Parameter Name="监测点代号"  Type="String" />
        </DeleteParameters>
    </asp:SqlDataSource>
</div>
</asp:Content>

 

Tsvetina
Telerik team
 answered on 20 Sep 2010
2 answers
90 views
Hello,
I have two questions :
1 ) How can I put default value for RadFilterDateFieldEditor ? Now its default value is 1/1/0001 12:00:00 AM and I wanted to changed it to something like DateTime.Now.


2) How can I take the last value from RadFilterDateFieldEditor .
When I try to take it even after I changed it for example to 09/14/2010 12:00:00 AM through UI
RadFilterSqlQueryProvider provider = new RadFilterSqlQueryProvider();
provider.ProcessGroup(RadFilter1.RootGroup);
string timeStr = provider.Result;

The provider.Result equals  the same 1/1/0001 12:00:00 AM

Please help !!!
Nikolay Rusev
Telerik team
 answered on 20 Sep 2010
1 answer
92 views
Never Mind, I found the answer: http://www.telerik.com/support/kb/aspnet-ajax/editor/error-web-config-registration-missing-the-telerik-dialogs-require-a-httphandler-registration-in-the-web-config-file.aspx

I am attempting to use the RadEditor inside a custom web part; i don't want it to be a standalone wep part, so I'm not using the one developed for that purpose; I'm using the one normally used on ASP.NET pages.

I have successfully installed AJAX 3.5, and am using the generic ASP.NET ScriptManager, not the RadScriptManager.

The RadEditor opens in my custom web part, and basically works, but when I open editing dialogs, I get the "Web.config registration missing" error, and a "Web page cannot be found" screen.

I have registered the HttpHandler in the SharePoint site's base web.config file (the one in the root directory) as :
<system.webServer>
      <validation validateIntegratedModeConfiguration="false"/>
      <modules>
            (modules registered here)
      </modules>
      <handlers>
            (other handlers here)
             <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode"
             path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI,
             Version=2010.2.713.35 , Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
      </handlers>
</system.webServer>

Is there something else I have to do? Any assistance would be greatly appreciated.

Never Mind, I found the answer: http://www.telerik.com/support/kb/aspnet-ajax/editor/error-web-config-registration-missing-the-telerik-dialogs-require-a-httphandler-registration-in-the-web-config-file.aspx
Stanimir
Telerik team
 answered on 20 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?