Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
36 views
I have a grid with a detail table. I can expand each row and see the cooresponding detail record. I have a custom procedure on the grid event OnItemDataBound. I wanted to turn a couple images on or off based on a value in the database as well has build a URL for another hyperlink control. When the image control visibility is set to false or the navigateurl on the hyperlink is set, the row will not expand. I have verified that the page is posting back and making a call to the database when I attempt to expand the row. Any other row that I did not touch the image or hyperlink control still expands without a problem.

Thanks in advance.
Radoslav
Telerik team
 answered on 24 May 2011
3 answers
131 views
Hi,

I am basing my code off of the sample you have here:
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

In your sample, on the aspx page for "Dialog2.aspx" is a javascript function:
function returnValue()
{
    //get the RadComboBox's selected item's text
    var combo = $find("<%= RadComboBox1.ClientID %>");
    var selectedCapital = combo.get_text();
 
    //Get a reference to the parent page (Default.aspx)
    var oWnd = GetRadWindow();
 
    //get a reference to the second RadWindow
    var dialog1 = oWnd.get_windowManager().getWindowByName("RadWindow1");
 
    // Get a reference to the first RadWindow's content
    var contentWin = dialog1.get_contentFrame().contentWindow
     
    //Call the predefined function in Dialog1
    contentWin.populateCityName(selectedCapital);
 
    //Close the second RadWindow
    oWnd.close();
}

This line here, works great, but I need to try to modify:
contentWin.populateCityName(selectedCapital);

instead of calling a function (in this case "populateCityName") I want to be able to set the control's value directly.
Is this possible?
So instead of the above line of code, I would like to do something like:
contentWin.document.getElementById("cityName").value = "hello";
Georgi Tunev
Telerik team
 answered on 24 May 2011
1 answer
209 views
Hi,

Is it possible to display an image in a grid cell based on the grid cell value. For example, if the cell value is say 'True/false', show a thumbs up or a thumbs down image.

Are there any inbuilt methods for doing this?

Or do we need to manipulate in the item_databound event?

Will there be performance issues if this is done for say (10 columns * 100 rows), i.e approximately 1000 cells?

Thanks,
Saravanan
Jayesh Goyani
Top achievements
Rank 2
 answered on 24 May 2011
2 answers
76 views
Hi
I have grid which has 1000 rows, is there an example for filtering in client side in the 1000 rows(Not post back)?
thanks
Tsvetoslav
Telerik team
 answered on 24 May 2011
3 answers
99 views
<telerik:RadDataPagerTemplatePageField
    <PagerTemplate
        <asp:DropDownList ID="DropDownList1" runat="server"
        </asp:DropDownList
        <asp:Label ID="lblTimeAmount" runat="server" Text="..." ></asp:Label
    </PagerTemplate
</telerik:RadDataPagerTemplatePageField>
protected void Page_Load(object sender, EventArgs e)  
{
   //How to Get or Set Control's Value to Any in DropDownList1 or lblTimeAmount
  
}
also:
<telerik:RadToolBarButton runat="server" Text="SearchBox"
     <ItemTemplate
         <telerik:RadComboBox ID="RadComboBox1" Runat="server"
             <Items
                 <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" 
                     Value="RadComboBoxItem1" /> 
                 <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" 
                     Value="RadComboBoxItem2" /> 
                 <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem3" 
                     Value="RadComboBoxItem3" /> 
             </Items
         </telerik:RadComboBox
     </ItemTemplate
 </telerik:RadToolBarButton
 <telerik:RadToolBarButton runat="server" Text="SearchCount"
     <ItemTemplate
         <asp:Label ID="lblTimeAmount" runat="server" Text="..." ></asp:Label>
     </ItemTemplate
 </telerik:RadToolBarButton>
protected void Page_Load(object sender, EventArgs e)   
   //How to Get or Set Control's Value to Any in DropDownList1 or lblTimeAmount
}
gzzn
Top achievements
Rank 1
 answered on 24 May 2011
2 answers
88 views
Hello All,

I have one small issue while Saving RadGrid Settings using GridPersister Class.
Actually I want to Save All supported "PersistedSettingTypes" but not Paging settings.
So any one have idea how to exclude only Page Settings while Saving Grid Settings?

Thanks in Advance & Regards,

Dharmesh
Tsvetina
Telerik team
 answered on 24 May 2011
4 answers
182 views

Hi there,

Thanking you for very quick responses,

What I am trying to do is for a grid

1. add template columns to the grid
2. display the grid in edit mode
3. when click "save all", update all edited rows

What I did
for 1

GridTemplateColumn assResult = new GridTemplateColumn();  
this.RadGridGradingBatchEntry.MasterTableView.Columns.Add(assResult);  
assResult.DataField = "UniqueDateField";  
assResult.UniqueName = "UniqueDateField";  
assResult.SortExpression = "UniqueDateField";  
assResult.HeaderText = "UniqueDateField";  
assResult.SortExpression = "UniqueDateField";  
assResult.DataType = System.Type.GetType("System.Int32");  
assResult.Resizable = true;  
assResult.ItemStyle.Wrap = true;  
assResult.ItemStyle.Width = 15;  
assResult.ItemTemplate = new MyTemplate()  // Mytemplate returns implements Itemplate and I created this class according to one of forums I found here.  

for 2

protected void RadGridGradingBatchEntry_PreRender(object sender, System.EventArgs e)  
    {  
        foreach (GridDataItem item in RadGridGradingBatchEntry.Items)  
        {  
            item.Edit = true;  
            RadGridGradingBatchEntry.Rebind();  
        }  
    } 

for 3

protected override void RaisePostBackEvent(IPostBackEventHandler source, string eventArgument)  
    {  
        base.RaisePostBackEvent(source, eventArgument);  
        if (source is RadGrid)  
        {  
            string[] postBackEventArgumentData = eventArgument.Split(':');  
            switch (postBackEventArgumentData[0])  
            {  
                case "SaveAll":  
                    foreach (string l_EachItem in postBackEventArgumentData[1].Split(','))  
                    {  
                        if (!(l_EachItem == ""))  
                        {  
                            GridItem item = (GridItem)((Table)RadGridGradingBatchEntry.MasterTableView.Controls[0]).Rows[int.Parse(l_EachItem)];  
                            GridEditableItem editedItem = (GridEditableItem)item;  
                            Hashtable newnewValues = new Hashtable();  
                            item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem);  
 
                        }  
                    }  
 
                    break;  
            }  
        }  
    } 

Now problem is that when I look up newValues, all dynamically created columns are not visible but only columns that have been specified as bound column are available to access.

Your help will be appreciated as always,

Toby 

Sebastian
Telerik team
 answered on 24 May 2011
1 answer
75 views
Hi,

I have searched some data using filtering column then export grid as PDF and excel format.
The filtering text also exported to pdf and excel.
Give me the solution ASAP. It's urgent.

Thank you,
Nagarajan
Princy
Top achievements
Rank 2
 answered on 24 May 2011
3 answers
123 views
Hello, 
I am running into an issue where I need to set document.domain in order to allow communication between rad windows.  an unintended consequence seems to be that radeditors no longer function.  Is there a work around, or fix for this issue?  

Version : 2010.2.929.40

Thanks
Dobromir
Telerik team
 answered on 24 May 2011
1 answer
109 views
I have a RadGrid set up to do automatic inserts and updates. I get the edit links, which open the edit form, as it should. I can enter and retrieve the new values with no problems. However, because we are connecting to a legacy mainframe application, we have to send ALL the on screen data in one message; I can't just do a simple update of the single record I'm editing.

In order for the pop-up editing to work in the grid I'm using the OnNeedDataSource event. I believe this is causing the problem.

I have code behind the Update command for this grid (rgdDetails) to update the selected row's "ItemClass" cell. I know it's hitting this code, because the "Record Updated" message is being displayed, but the text in the cell is not being changed. Am I not handling the OnNeedDataSource event properly? Is it reloading and overwriting the data that I want to change with the original data? Or am I doing something incorrectly when trying to enumerate the cell I want to change?

        Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
        editedItem = e.Item
        editedItem("ItemClass").Text = "Testdata"

       rgdDetails.MasterTableView.ClearEditItems()
        Master.MessagePanel.InfoMessage("Record Updated")


Here is a section of the OnNeedDataSource code. It's opening a query and setting the datasource for the grid.

 

        Dim pDate As String = _Control.SelectedDate.ToString
        Dim pStore As String = _Control.SelectedStore
        Dim pTerm As String = _Control.SelectedTerminal
        Dim pTran As String = _Control.SelectedTransaction


        If (pStore <> "0") And (pTerm IsNot Nothing) And (pTran IsNot Nothing) And (pTran <> "") Then
            Dim ds1 As DataSet = TransDetailDAL.GetTranItemsDetail(pDate, pStore, pTerm, pTran)
            rgdDetails.DataSource = ds1


            Dim dr As DataRow = TransDetailDAL.GetTranHDRDetail(pDate, pStore, pTerm, pTran)


       

Tsvetoslav
Telerik team
 answered on 24 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?