Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
127 views
hi,
this is really great that this function keep the viewstate on dynamic loaded user controls, but this loads all pageviews and if i have alot then this will slow down the page, is there a way to apply on tab click event ? meaning that when i click on a tab it loads the pageview related to it with the dynamic controls in it and keep viewstate.

thx in advanced
feras
Top achievements
Rank 1
 answered on 30 Oct 2008
1 answer
199 views
Hi

I am using a RadGrid, and trying to use a custom User Control edit form. I have just created a test page, where I am binding the RadGrid to a List<T> of a custom Business Object.

When I click on the EditCommandColumn, I notice that the e.Item.IsInEditMode is always false, and I am unable to retrieve a reference to the UserControl using the documented method of:

GridEditableItem editedItem = e.Item as GridEditableItem;
UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);

userControl is always null :(

I am using a <telerik:AjaxScriptManager> to perform all operations using AJAX if this helps shed any light on the matter

Cheers

Simon

ASPX Page is as follows:
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
 <AjaxSettings>
  <telerik:AjaxSetting AjaxControlID="RadGrid1">
   <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
   </UpdatedControls>
  </telerik:AjaxSetting>
 </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadGrid ID="RadGrid1" runat="server" Skin="WebBlue" GridLines="None" AllowPaging="True" AllowSorting="True" Width="97%" AutoGenerateColumns="False" ShowStatusBar="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound">

 <MasterTableView GridLines="None" Width="100%" CommandItemDisplay="Top" DataKeyNames="Id">
  <Columns>
   <telerik:GridBoundColumn DataField="ProductCode" HeaderText="Prod Code" />
   <telerik:GridBoundColumn DataField="Description" HeaderText="Desc" />
   <telerik:GridBoundColumn DataField="Quantity" HeaderText="Qty" />
   <telerik:GridBoundColumn DataField="DeliveryDate" HeaderText="Del Date" DataFormatString="{0:dd/MM/yy}" />
   <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" />
  </Columns>
  <EditFormSettings UserControlName="/UserControls/ProductEditor.ascx" EditFormType="WebUserControl">
   <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
  </EditFormSettings>
 </MasterTableView>
</telerik:RadGrid>






CS File is as follows:

protected void RadGrid1_EditCommand(object source, GridCommandEventArgs e)
{
    GridEditableItem editedItem = e.Item as GridEditableItem;
    UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
    if ( userControl == null)
        throw new Exception("Unable to find UserControl");
}
private List<Objects.Product> ProductList
{
 get
 {
  Object oProductList = Session["Products"];
  if (oProductList != null)
   return oProductList as List<Objects.Product>;
  List<Objects.Product> productList = new List<Product>();
  Product prod1 = new Product
     {
     Id = 1,
     Description = "Product One (Event)",
     ProductCode = "1001",
     ProductType = Enums.ProductType.Event,
     DeliveryDate = DateTime.Now.AddMonths(1)
     };
  Product prod2 = new Product
     {
     Id = 2,
     Description = "Product Two (Material)",
     ProductCode = "1002",
     ProductType = Enums.ProductType.Material,
     DeliveryDate = DateTime.Now.AddMonths(2)
     };
  productList.Add(prod1);
  productList.Add(prod2);
  Session["Products"] = productList;
  return productList;
 }
}



										
Vlad
Telerik team
 answered on 30 Oct 2008
3 answers
183 views
Is there a way to make the dropdown list width adjust to accomodate the width of the items without wrapping? Standard asp.net dropdown list does it if the width is not specified.
Rosi
Telerik team
 answered on 30 Oct 2008
4 answers
132 views
I have this code which includes the runat="server" so I don't have to wrap a RadCode Block.
<table cellpadding="3" cellspacing="1" style="width: 100%"
    <tr> 
        <td align="right" runat="server"
            <asp:Button id="ContinueButton" OnClick="ContinueShopping" runat="server" Text='<%#RM.GetString("BASKET_CONTINUE_SHOPPING")%>' /> 
            <asp:Button id="CheckoutButton" OnClick="Checkout" runat="server" Text='<%#RM.GetString("BASKET_PROCEED_CHECKOUT")%>' /> 
        </td> 
    </tr> 
</table>     

One of the buttons gets a ToolTip attached programmatically.  When it renders in the browser it renders as:
<td align="right"
<input id="ctl00_MainContent_ShoppingCart1_ThemeShoppingCart1_ContinueButton" type="submit" value="Continue Shopping" name="ctl00$MainContent$ShoppingCart1$ThemeShoppingCart1$ContinueButton"/> 
<div id="ctl00_MainContent_ShoppingCart1_ThemeShoppingCart1_ctl00_MainContent_ShoppingCart1_ThemeShoppingCart1_CheckoutButtonPanel" style="display: block;"
<input id="ctl00_MainContent_ShoppingCart1_ThemeShoppingCart1_CheckoutButton" type="submit" value="Proceed to Checkout" name="ctl00$MainContent$ShoppingCart1$ThemeShoppingCart1$CheckoutButton"/> 
</div> 
</td> 
The "style=display:block" is causing it to render below my other button and it should render side by side.


Vlad
Telerik team
 answered on 30 Oct 2008
1 answer
376 views
Hi,

I want to pass two parameters from dataNavigateUrlFormatString, I want to generate a string for DataNavigateUrlFormatString like this:
javascript: void(popupwindow('test.aspx?id=xxx&type=xxx'));
two xxx represent two diffrent fields in the data source.

Thanks,
Vlad
Telerik team
 answered on 30 Oct 2008
1 answer
94 views
Hi,

I want to update a record in a Grid without using the Grid Edit and Update link.Instead of that when I click a record in a grid it should automatically fire the edit function and when I navigate the next row in the grid it should automatically update the previous record which I changed.
Could you please help me to fix this issue.
Please send me some sample code to implement this functionality.

Thanks,
Krishna Kumar.A
Shinu
Top achievements
Rank 2
 answered on 30 Oct 2008
1 answer
110 views

Would like to add a border to my RadWindow. Calling RadWindow from code behind.

 

MonthEventHyperLink.NavigateUrl =

"ProjCalendarDBMonth.aspx"
Dim MonthEverntWindowName As String = "EventMonth"
Dim clickEventHandlerStringEventMonth As String = "javascript:var w = window.radopen('" & _Convert.ToString("ProjCalendarDBMonth.aspx") & "', '" & _MonthEverntWindowName & "'); w.set_modal(false); w.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Reload +Telerik.Web.UI.WindowBehaviors.Close); w.moveTo(100, 100); w.setSize(1000, 600); return false;"
MonthEventHyperLink.Attributes.Add("onclick", clickEventHandlerStringEventMonth)

Any ideas?

Thanks in advance

 

Georgi Tunev
Telerik team
 answered on 30 Oct 2008
1 answer
103 views
Hi,
 I have data coming from a datatable which is dynamically generated and filled to the radrid control.
Can anyone please help me how to achieve grouping and sorting functinality for the same.
I did not add any code for the same?
Regards
Prathap.K.H
Shinu
Top achievements
Rank 2
 answered on 30 Oct 2008
1 answer
74 views
Hi,

I want to place an image button on extreme left of either header row or filter row inside the grid, i.e. at top left of grid.

Please let me know how to achieve this , if its possible ?


Thanks 

Shinu
Top achievements
Rank 2
 answered on 30 Oct 2008
6 answers
206 views
Hi,
 I have data in a Data table.This datatable is stored in a session for frequent retrieval.
The data table acts as a data source for the radgrid. I am not able to get the updated value after edit.
Can I have an example how to update the data after edit in Rad Grid
Regards
Prathap.K.H
Shinu
Top achievements
Rank 2
 answered on 30 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?