Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
347 views
Is it possible to call the radopen function without causing a postback?

Here is what I am trying to do.

I am trying to use a modal RadWindow to inform the user that their (forms authentication) session is about to expire.  When I display the RadWindow using the radopen function, a postback occurs and the session expiration is reset (which causes the information in the popup window to become inaccurate).

Is there a better way to accomplish what I am trying to do or will the RadWindow not work in a scenario such as this.

Thank you,

Jason Richmeier
Jason Richmeier
Top achievements
Rank 1
 answered on 16 Sep 2009
1 answer
98 views
I'm trying to set up a grid that start in edit mode for all rows.  I'm also using LINQ.  What do I need to do to save the data?
Does anyone have an example?

Thanks!


My code:
<telerik:RadGrid ID="RdGrid" runat="server"
     DataSourceID="dsProducts"
     AllowFilteringByColumn="True"
     AllowPaging="True"
     AllowSorting="True"
     AllowMultiRowEdit = "True"
     AllowMultiRowSelection = "True"
     AllowAutomaticInserts="True"
     AllowAutomaticUpdates="True"
     AllowAutomaticDeletes="True"
     AutoGenerateColumns = "False"
     GridLines="None"
     PageSize="20"
     Skin="Office2007"
     ClientSettings-EnableDragToSelectRows="True"
     ClientSettings-Selecting-AllowRowSelect="True"
     PagerStyle-Mode = "NextPrevAndNumeric"
     PagerStyle-NextPageText ="Next"
     PagerStyle-PrevPageText ="Prev"
     OnItemCommand="RdGrid_ItemCommand"
     OnItemDataBound="RdGrid_ItemDataBound"
            OnItemUpdated="RdGrid_ItemUpdated"
           OnItemInserted="RdGrid_ItemInserted"
     OnItemDeleted="RdGrid_ItemDeleted"
  >
  <HeaderContextMenu>
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
  </HeaderContextMenu>
  <MasterTableView
     autogeneratecolumns="False"
     datakeynames="ProductID"
     CommandItemDisplay="Top"
     AllowMultiColumnSorting="True"
     EditMode="InPlace"
  >
    <RowIndicatorColumn>
     <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>
    <ExpandCollapseColumn>
     <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
    <CommandItemTemplate >
      <div style="padding:10px 0px;">
              <asp:LinkButton ID="lnkcmdEditAllRows"    runat="server"   CommandName="UpdateAll" ><img style="border:0px;vertical-align:middle;" alt="" src="Images/Update.gif" /> Save Changes</asp:LinkButton>
              <asp:LinkButton ID="lnkcmdRefresh" runat="server" visible="true" CommandName="RebindGrid"><img style="border:0px;vertical-align:middle;" alt="" src="Images/Refresh.gif" /> Refresh grid</asp:LinkButton>
     </div>
   </CommandItemTemplate>
   <Columns>
      <telerik:GridBoundColumn
        DataField="ProductID"
        DataType="System.Int32"
        HeaderText="Product ID"
        SortExpression="ProductID"
        UniqueName="ProductID"
        ItemStyle-HorizontalAlign="Right"
        DataFormatString="{0:N0}"
      >
      </telerik:GridBoundColumn>
       <telerik:GridTemplateColumn
         HeaderText="Product Name"
         UniqueName="unqProductName"
       >
        <ItemTemplate>
         <asp:TextBox ID="txtProductName"  runat="server"
              Columns="50"
              MaxLength="80"
              Text='<%# Bind("ProductName") %>'/>
        </ItemTemplate>
        <EditItemTemplate>
         <asp:TextBox ID="txtProductName2"  runat="server"
              Columns="50"
              MaxLength="80"
              Text='<%# Bind("ProductName") %>'/>
        </EditItemTemplate>
      </telerik:GridTemplateColumn>
    </Columns>
   </MasterTableView>
   <FilterMenu>
     <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
   </FilterMenu>
</telerik:RadGrid>
<asp:LinqDataSource
    ID="dsProducts"
    runat="server"
    ContextTypeName="NorthwindDataContext"
    TableName="Products"
    OrderBy="ProductName"
    EnableDelete="True"
    EnableInsert="True"
    EnableUpdate="True"
    OnInserting="LinqDataSourceProducts_Inserting"
    OnUpdating="LinqDataSourceProducts_Updating"
    
 >
 </asp:LinqDataSource>

public partial class Prod : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e) {
 }
 protected void RdGrid_ItemCommand(object source, GridCommandEventArgs e) {
     if (e.CommandName == "UpdateAll")
     {
         foreach (GridEditableItem editedItem in RdGrid.EditItems)
         {
             //Example for SQLDataSource
             // What's needed for a LINQ data source???
             Hashtable newValues = new Hashtable();
             //The GridTableView will fill the values from all editable columns in the hash  
             e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);
            // SqlDataSource1.UpdateCommand = String.Format("Update Customers SET ContactName='{0}' WHERE CustomerIDCustomerID='{1}'", newValues["ContactName"], editedItem["CustomerID"].Text);
            // SqlDataSource1.Update();
             editedItem.Edit = false;
         }
     }
     RdGrid.Rebind();
 }
protected void RdGrid_ItemDataBound(object source, GridItemEventArgs e)  {
}
protected void LinqDataSourceProducts_Inserting(object sender, LinqDataSourceInsertEventArgs e)
 {
}
protected void LinqDataSourceProducts_Updating(object sender, LinqDataSourceUpdateEventArgs e)
 {
}
 protected void RdGrid_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)
 {
 }
 protected void RdGrid_ItemInserted(object source, GridInsertedEventArgs e)
 {
 }
 protected void RdGrid_ItemDeleted(object source, GridDeletedEventArgs e)
 {
 }
 private void SetMessage(string message,string exceptionMessage, Boolean Append)
 {
 }
}

Sebastian
Telerik team
 answered on 16 Sep 2009
2 answers
239 views
Is it possible to get all dataitems in a grid and put in a javascript var.
Then, take that variable and set it to the datasource of another grid?
I found the get_dataItems() method, however, I dont know if this is
possible.

OR

Is there a way I can get the grid data into a C# datatable on the server
if I am using client side databinding?

Thanks.
Josh
Top achievements
Rank 1
 answered on 16 Sep 2009
1 answer
196 views
Want to minimze or show on one corner of the screen
  function OnClientClick_Button()
        {    
            var oWindow = GetRadWindow().BrowserWindow;    
            oWindow.radopen("default.aspx", "RadWindow");   

              var oWin = null;
            oWin = window.frameElement.radWindow;
            oWin.BrowserWindow.location.reload("Product Info Form.aspx");
        
        } 

I hv one form Add Cart.aspx open in Child radwindows. How to open the click on Info button on Addcart.aspx refresh the product parent windows . How to refresh the parent page. when i click on child rad windows button  id don't want to close child windows ?



Fiko
Telerik team
 answered on 16 Sep 2009
1 answer
129 views
In the demo, for Deutsch
http://demos.telerik.com/aspnet-ajax/upload/examples/localization/defaultcs.aspx?RadUrid=9fdcc304-8718-43a3-8b8e-29b21e53eeab

The text is almost cut off. How do you expand the width of that select/Auswahlen button?
Schlurk
Top achievements
Rank 2
 answered on 16 Sep 2009
3 answers
523 views
I have a situation where I am defining mutliple Radwindows under Radwindow Manager.

<Rad windowmanager  id = RdManager1 >

<windows>
<radwindow1 id = rdwindoweasy> </radwindow>
<radwindow1 id = rdwindowhard> </radwindow>
</windows>
</radwindowmanager>

Here I want to set the radwindow size individually for each windows..But when I set so its not applying...It applies to all whn I set to radwindow manager.Please any suggestions on how do I set the radwindow size..i do not want to set it dynamically.



Fiko
Telerik team
 answered on 16 Sep 2009
3 answers
165 views
I have an link in my radgrid.When I click the link, a radwinow opens .After editing the data in the radwindow, the user will click the SUBMIT button to update the data in the sqlserver and the window will close.
My Question is how can I update the data in the radgrid when the user clicks the Submit button/ Close button of radwindow.Please help..
Thanks in advance
Fiko
Telerik team
 answered on 16 Sep 2009
1 answer
113 views
Hi,i am using teleric version Q1 2007.
Toolbar is getting disappered when we set enable docking property as "false".however when we set docking property as "true",toolbar becomes dockable.we don't want docking toolbar.what should we do?

Regards
Rahul ,Zcon Solutions
Rumen
Telerik team
 answered on 16 Sep 2009
0 answers
262 views
Hi,
i've got a RadTabStrip with few tabs, and i need to set a focus to a first element in javascript when clicking on tab.

already tryed solution provided in this thread :
but it throws me an exception :
 Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

Would be glad to hear any solituion or advice how to achieve such functionality.

Thank You !
Taburetka Kekc
Top achievements
Rank 1
 asked on 16 Sep 2009
8 answers
470 views
scenario:

I have an asp:dataGrid. for each row in the grid there is a templateColumn containing a radDatePicker. Out to the side of each RadDatePicker i have an Image button that, when clicked, I need it to take the value of the radDatePicker that is to the left of the button and set all of the other RadDatePickers within the grid to that same value (Client Side).

Since all of the radDatePickers are within the grid, I wasn't sure how to pull the ID's of each. So instead, I was trying to get them the same class and then use Jquery to find them and then use the set_selectedDate(newDate) method on the client side. This is not working as I get the following message: Object doesn't support this property or method.

Not sure what I'm doing wrong...

here's my code:

<script type="text/javascript"> 
 
function setAllCheckDates (datevalue) { 
 
$('.rdpControl').set_selectedDate(new Date(datevalue)); 
} 
</script> 
 
 
<asp:TemplateColumn HeaderText="Check Date"> 
   <ItemTemplate> 
    <telerik:RadDatePicker Visible="true" id="rdpCheckDate" Skin="Office2007" Width="100px" Runat="server" Culture="English (United States)" TabIndex="3" Font-Size="11px" EnableEmbeddedScripts="true" CssClass="rdpControl"> 
 <calendar ID="Calendar1" runat="server" usecolumnheadersasselectors="False" FastNavigationStep="12" ShowRowHeaders="False" userowheadersasselectors="False" viewselectortext="x" width="170px" Skin="Office2007"></calendar> 
 <DateInput ID="DateInput1" runat="server" Font-Size="11px" DateFormat="MM/dd/yyyy" EmptyMessage="mm/dd/yyyy" TabIndex="3" CssClass="checkdateinput" /> 
 <datepopupbutton CssClass="RadDatePicker_btnCalendar" hoverimageurl="_images/calendar_hover.gif" imageurl="_images/calendar.gif" TabIndex="3"></datepopupbutton> 
 </telerik:RadDatePicker><asp:ImageButton runat="server"  ID="imgSetAllCheckDates" ImageUrl="_images/icons/icon_dates_set_all.gif" /> 
    </ItemTemplate> 
</asp:TemplateColumn> 
 
 
    Private Sub dgInterfaces_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dgInterfaces.ItemDataBound 
        Select Case e.Item.ItemType 
            Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.SelectedItem 
                Dim btnImgSetAllCheckDates As ImageButton = CType(e.Item.FindControl("imgSetAllCheckDates"), ImageButton) 
                Dim rdpTemp As Telerik.Web.UI.RadDatePicker = CType(e.Item.FindControl("rdpCheckDate"), Telerik.Web.UI.RadDatePicker) 
 
                btnImgSetAllCheckDates.Attributes.Add("onclick", String.Format("setAllCheckDates({0}.value);return false;", rdpTemp.DateInput.ClientID)) 
        End Select 
 
    End Sub 





Sebastian
Telerik team
 answered on 16 Sep 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?