Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
140 views
I have validated all my controls but one and it is a checkbox on the form that needs to be validated that its checekd before submittal.  How can I achieve this on a radgrid insert, I could do server side but looking for a client side solution.

<FormTemplate>
                                   <table width="100%">
                                       <tr> 
                                           <td style="width:50%" align="right">Enter Last Name First Name of User </td>
                                           <td style="width:50%" align="left">
                                               <asp:TextBox ID="txtUser" runat="server" Width="260px"></asp:TextBox>
                                               <asp:AutoCompleteExtender ID="txtUser_ACE" runat="server" DelimiterCharacters="" Enabled="True" ServiceMethod="Findname" ServicePath="~/iMACService.asmx" TargetControlID="txtUser"
                                                UseContextkey="true" MinimumPrefixLength="2" OnClientItemSelected="SelectedName" EnableCaching="true" CompletionInterval="1" />
                                                <asp:TextBoxWatermarkExtender ID="txtName_WME" runat="server" TargetControlID="txtUser" WatermarkText="Enter Last Name First Name" WatermarkCssClass="WaterMark" />
                                                <asp:FilteredTextBoxExtender ID="txtUser_FTE" runat="server" TargetControlID="txtuser" FilterType="Custom, LowerCaseLetters, UpperCaseLetters"></asp:FilteredTextBoxExtender>
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr> 
                                           <td style="width:50%" align="right">Enter EDIPI </td>
                                           <td style="width:50%" align="left">
                                               <asp:TextBox ID="txtEDIPI" runat="server" Width="160px" MaxLength="10"></asp:TextBox>
                                               <asp:RequiredFieldValidator ID="valEDIPI" runat="server" ForeColor="Red" ControlToValidate="txtEDIPI" Display="Dynamic" SetFocusOnError="true" ErrorMessage="* Enter EDIPI" />
                                               <asp:FilteredTextBoxExtender ID="txtEDIPI_FTE" runat="server" TargetControlID="txtEDIPI" FilterType="Numbers"></asp:FilteredTextBoxExtender>
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr> 
                                           <td style="width:50%" align="right">Pick Type of Investigation </td>
                                           <td style="width:50%" align="left">
                                               <asp:DropDownList ID="ddlInvestigation" runat="server" Width="165px"></asp:DropDownList>
                                               <asp:RequiredFieldValidator ID="valInvest" runat="server" ForeColor="Red" ControlToValidate="ddlInvestigation" Display="Dynamic" SetFocusOnError="true" ErrorMessage="* Enter Investigation Type" InitialValue="0" />
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr> 
                                           <td style="width:50%" align="right">Pick Date of Investigation </td>
                                           <td style="width:50%" align="left">
                                               <asp:textbox ID="txtDtInvest" runat="server" Width="160px" style="cursor:pointer"></asp:textbox>
                                               <asp:CalendarExtender ID="calExt" runat="server" TargetControlID="txtDtInvest" PopupPosition="BottomRight"></asp:CalendarExtender>
                                               <asp:RequiredFieldValidator ID="valdtInvest" runat="server" ForeColor="Red" ControlToValidate="txtDtInvest" Display="Dynamic" SetFocusOnError="true" ErrorMessage="* Enter Investigation Date" />
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr> 
                                           <td style="width:50%" align="right">Pick Clearance </td>
                                           <td style="width:50%" align="left">
                                               <asp:DropDownList ID="ddlClearance" runat="server" Width="165px"></asp:DropDownList>
                                               <asp:RequiredFieldValidator ID="valClear" runat="server" ForeColor="Red" ControlToValidate="ddlClearance" Display="Dynamic" SetFocusOnError="true" ErrorMessage="* Enter Clearance Level" InitialValue="0" />
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr> 
                                           <td style="width:50%" align="right">Pick IT Level </td>
                                           <td style="width:50%" align="left">
                                               <asp:DropDownList ID="ddlITLevel" runat="server" Width="165px"></asp:DropDownList>
                                               <asp:RequiredFieldValidator ID="valItlevel" runat="server" ForeColor="Red" ControlToValidate="ddlITLevel" Display="Dynamic" SetFocusOnError="true" ErrorMessage="* Enter IT Level" InitialValue="0" />
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr> 
                                           <td style="width:50%" align="right">Check Approval </td>
                                           <td style="width:50%" align="left">
                                               <asp:CheckBox ID="cbApproval" runat="server" Text="I have done a background investigation of the above individual and approve." />
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr> 
                                           <td style="width:50%" align="right">Check DisApprove </td>
                                           <td style="width:50%" align="left">
                                               <asp:CheckBox ID="cbDisApprove" runat="server" Text="I have done a background investigation of the above individual and Disapprove." />
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr> 
                                           <td style="width:50%" align="right">Uploaded 2875 </td>
                                           <td style="width:50%" align="left">
                                               <asp:CheckBox ID="cbUpload" runat="server" Text="I have upload the original 2875 to FileNet Location." />
                                           </td>
                                       </tr>
                                       <tr>
                                           <td style="height:5px"></td>
                                       </tr>
                                       <tr>
                                           <td style="width:50%" align="right"></td>
                                           <td style="width:50%" align="left">
                                               <asp:LinkButton ID="lnkSubmit" runat="server" text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Approve", "Update") %>' 
                                               CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'></asp:LinkButton>
                                                     
                                               <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="false" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
                                           </td>
                                       </tr>
                                   </table>
                               </FormTemplate>
Jayesh Goyani
Top achievements
Rank 2
 answered on 09 Jun 2012
3 answers
83 views
Hello,
I have tried to respond to previous ticket but I mark the page error, that's why I'm opening a new one.

I managed to setup and tells me, but my problem is that I want to take control in the database selected day and time, not the full date. How could I do this?

D.B.
ID 1
Subject Example
Start 2012-06-06 09:00:00
End 2012-06-06 10:00:00
RoomID 1
UserID 1

I need:
ID 1
Subject Example
Start Monday 09:00:00
End Monday 10:00:00
RoomID 1
UserID 1
Jayesh Goyani
Top achievements
Rank 2
 answered on 09 Jun 2012
0 answers
110 views

 

I have the following problem, when I make the exportation to Excel using the following method
 
protected void Grid_ItemCommand(object source, GridCommandEventArgs e)

 



I have no problem sending me the excel, the problem is when I check the excel is empty and no why this happens, it happens to me all the grids of 7 with 2 happens to me only and the export processis the same


greetings and thanks for the support

Gustavo
Top achievements
Rank 1
 asked on 08 Jun 2012
1 answer
124 views
<style type="text/css">
  html, form
  {
    height: 100%;
    margin: 0px;
    padding: 0px;
  }
 
  body
  {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #333;
    height: 100%;
    margin: 0px;
    padding: 0px;
    background-color: #ffffff;
  }
   
  .topBar
  {
    width: 100%;
    padding: 5px;
    height: 35px;
    display: block;
    background-color: #336699;
  }
   
  .topBarLogo
  {
  
  }
</style>

<body>
<form id="form1" runat="server">
<div class="topBar">
<table width="100%">
<tr>
<td><div class="topBarLogo"><img src="/_Images/logo.png" /></div></td>
<td width="100"><a href="\login.aspx?logout=true" class="button">Logout</a></td>
</tr>
</table>
</div>
 
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%" BorderSize="0">
<telerik:RadPane ID="navigationPane" runat="server" Width="250px" BackColor="#ffffff" Scrolling="Y">
<div class="LeftPane">
My Nav menu
</div>
</telerik:RadPane>
<telerik:RadSplitBar ID="RadSplitbar1" runat="server" CollapseMode="Forward" />
<telerik:RadPane ID="contentPane" runat="server" ContentUrl="/login.aspx" BackColor="White">
</telerik:RadPane>
</telerik:RadSplitter>
</form>
</body>

The RadSplitter is rendering with both the browser's horizontal and vertical scrollbars. I suspect it has to do with the topBar div - but I want the splitter to be 100% of the remaining width/height of the browser after the topBar?

David
Top achievements
Rank 1
 answered on 08 Jun 2012
5 answers
156 views
Hello,

I have a column with two textboxes with BREAK. I need those breaks. Here is my HTML. Depending on the codition, I may or may not display the second textbox. If I am not displaying second textbox, how can I make the first textbox in the middle of the row.

<telerik:GridTemplateColumn HeaderText="Exception Price" UniqueName="ExceptionPrice" ItemStyle-Width="8%">
                   <ItemTemplate>
                     <telerik:RadNumericTextBox  ID="txtNewPrice" runat="server" MaxLength="10" AutoCompleteType="None" CssClass="txtException" MinValue="0"
                                Width="50px"     Type="Number" ShowSpinButtons="false" AllowOutOfRangeAutoCorrect="false" InvalidStyle-Font-Bold="true">
                                    <NumberFormat  AllowRounding="false" DecimalDigits="2"  KeepNotRoundedValue="true" GroupSizes="3"/>
                                    <ClientEvents OnValueChanging="ValueChanges" OnError="HandleError"/>
                                </telerik:RadNumericTextBox>
                                <br /><br />
                   <div style="vertical-align:bottom" >
                   <telerik:RadNumericTextBox  ID="TxtNewPSPrice" runat="server" MaxLength="10" AutoCompleteType="None"  MinValue="0"  Visible="false"
                          Width="50px" Type="Number" ShowSpinButtons="false" AllowOutOfRangeAutoCorrect="false" InvalidStyle-Font-Bold="true" CssClass="txtException">
                       <NumberFormat AllowRounding="false" DecimalDigits="2"  KeepNotRoundedValue="true" GroupSizes="3"/>
                         <ClientEvents OnValueChanging="ReinstatementChange" OnError="HandleError"/>
                      </telerik:RadNumericTextBox>
                    </div>
                                
                    </ItemTemplate>
               </telerik:GridTemplateColumn>
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Jun 2012
1 answer
167 views
I've been struggling for days now to try to figure out why the tooltips are positioned in the bottom of the screen instead of where they are supposed to. IE9 positions the tooltips correctly while FF.11 and Chrome.19 places the tooltips on the bottom of the screen.

I've got two RadToolTipManagers. One that is set to autotooltipify, where all the tooltips actually are correctly positioned in all browsers. The other where the tooltip is set "FromCode" is only correct positioned in IE. I've tried removing the css to make sure that doesn't messes up anything and also played around with the DocType. Same result.

As the demo-telerik-stuff is positioned correct I assume there must be something in the way the content is organizes in <div>'s etc... Are there any special things that I should try to investigate that could lead to this behaviour?
Jugoslav
Top achievements
Rank 1
 answered on 08 Jun 2012
1 answer
118 views
I have a radgrid. When I go to update a record the dropdown does not populate with the value of the current record.

I understand how to set the selectedvalue, but i dont understand how to retrieve the records value for this field to set the selectedvalue to.

This is my code that isnt working. Any help is appreciated.

ASPX Code:
<telerik:GridDropDownColumn DataSourceID="ReportFormatddlist" ListTextField="ReportFormat"
    ListValueField="ReportFormat" UniqueName="ddReportFormat" SortExpression="ReportFormat"
    HeaderText="Report Format" DropDownControlType="DropDownList" DataField="ReportFormat">
</telerik:GridDropDownColumn>


.VB Code:
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
    If (TypeOf e.Item Is GridEditableItem AndAlso CType(e.Item, GridEditableItem).IsInEditMode) Then
 
        'Report Render Format. The 3 values are just plugged into a list
        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
        Dim editMan As GridEditManager = editedItem.EditManager
        Dim editor As GridDropDownListColumnEditor = CType(editMan.GetColumnEditor("ddReportFormat"), GridDropDownListColumnEditor)
        Dim ReportFormatddList As DropDownList = editor.DropDownListControl
 
        'populate the list
        ReportFormatddList.Items.Insert(0, New ListItem("Excel", "Excel"))
        ReportFormatddList.Items.Insert(1, New ListItem("PDF", "PDF"))
        ReportFormatddList.Items.Insert(2, New ListItem("HTML4.0", "HTML4.0"))
        ReportFormatddList.DataBind()
 
        'prime value for update
           '**this is where I am having trouble**
        Dim ReportFormatEditor As GridDropDownListColumnEditor = editMan.GetColumnEditor("ddReportFormat")
        Dim ReportFormatValue = ReportFormatEditor.SelectedText
        editor.SelectedText = ReportFormatValue.ToString
 
        'Report name. The values are pulled from the db.
        editor = CType(editMan.GetColumnEditor("ddReportName"), GridDropDownListColumnEditor)
        editor.DataSource = (From r In DbContext.SubscriptionReportNames Select r).ToList()
        editor.DataBind()
 
    End If
End Sub
Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Jun 2012
1 answer
75 views

 

Hi,
 
We are using RadGrid. I am having same issue. In debug mode, error is generating right after End of InsertCommand

Insert Item is available only when grid is in insert mode
 
Please help!!!!!!

Jayesh Goyani
Top achievements
Rank 2
 answered on 08 Jun 2012
18 answers
594 views
I need to save images using FileExplorer into SQL database, I created a classDataServer.cs and DBContentProvider.cs, I placed them in the App_Code folder. The class DataServer.cs I changed the name of the table Items in Pictures and name of the column ItemID PictureID. Everything else remained unchanged.

The Handler created I changed only the ConnectionString.

After running everything works, but the image is not stored in the database.
Where we make mistaken?
Dobromir
Telerik team
 answered on 08 Jun 2012
3 answers
252 views
I want to  show a radTooltip from codebehind and use it as a type of msgbox. I want to give the user 'on the fly' database information from serverside, so I need to be able to build the radtooltip content codebehind aswell. Do you have any VB.net example and javascript to accomplish this ?  

I have access to the client user screen pixel where the user clicked. ( I do not want to use a targetcontrolID, tis is goolemap in a <div>) 

How can I call radtooltip to apear clientside on a given x,y pixel on client screen ?

'################################################################################################
This is how I show a radcontextmenu from codebehind/.showat x,y , Does radtooltip have a similar property ? please advise !!!
   ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "RCM", "function pageLoad(){$find('RCM').showAt(" & txtlath.Value & "," & txtlngh.Value & ");}", True)
'################################################################################################

  

  
rdmptn
Top achievements
Rank 1
 answered on 08 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?