Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
195 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
84 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
127 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
117 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
1 answer
222 views
This is how I formed my control

<telerik:RadBinaryImage ID="imageThumbnail" runat="server" DataValue='<%# Eval("imageThumbData") %>' ImageUrl="~/imageLibrary/common/nopic.gif" Width="125" Height="125" />

When I run the application I get an error saying

Unable to cast object of type 'System.DBNull' to type 'System.Byte[]'.


Isnt the imageURL suppose to handle this null case? How can I fix it?

Thank you.
Canis Lupus
Top achievements
Rank 1
 answered on 24 May 2011
2 answers
78 views
If you go to the online demos, each page includes various code files. In the area that the content of these files is displayed the is a link in the upper right corner which reads "Show code in new window".

Click on this link and a new window does, in fact, open. Now, go to another of the files in the original page and click on the same link.

Disappointed? I was. Instead of now having 2 windows with different files displayed in them, the new window that was opened the first time I clicked on the link had its content replaced with the 2nd file.

A quick look at the scripts suggests that a window called 'codeViewer' is always used. Can you not just use '_blank'?

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 24 May 2011
3 answers
123 views
Hi,
I cannot seem to figure out how to declaratively format the result of an aggregate function using a GroupByExpression properly.
I have
GroupByExpression="Foo Name, avg(Total) [Average Days {0:0.00}]"

This shows both the formatted and unformatted value in the group header for Average Days.
Sample Result:
Name: Joe Smith; Average Days 30.47: 30.466666666666666666666666667

I can't seem to find anything online with this issue. I'm assuming I've done something wrong here.

Thanks,
ian
Radoslav
Telerik team
 answered on 24 May 2011
2 answers
77 views
Hi,

I have a requirement to set a column as GridDateTimeColumn once the data is bounded.

Which is the event which will enable me to do this. I tried in NeedDataSource[grid gets populated here] and Page_Load, but it throws an error.

Thanks,
Saravanan
saravanan k
Top achievements
Rank 1
 answered on 24 May 2011
1 answer
62 views
hi

i am getting the row index as -1 when i insert a new data i used the following
how to get the correct row or itemindex
int i = e.item.rowindex;
Pavlina
Telerik team
 answered on 24 May 2011
4 answers
753 views
Hi,

I have a site that uses custom skins and also custom base style sheets for (almost) all controls (menu, combobox, grid...) so I added these two settings to the web.config:

<add key="Telerik.EnableEmbeddedSkins" value="false" />
<add key="Telerik.EnableEmbeddedBaseStylesheet" value="false" />

this works perfectly fine... but....

now I created an additional page within the main website that uses many controls (scheduler, combobox, grid...) that should use skins & base style sheets.

so my question:
is there a possibility to override the globally set values (from the web.config) for the whole .aspx page?
so that all controls on that page will use embedded skins & base style sheets?
(btw. I cannot use a separate web.config as the whole project is one application in a cms without physical folders...)

thank you very much!
Georgi Tunev
Telerik team
 answered on 24 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Jesse
Top achievements
Rank 2
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?