Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
117 views
I have a Master Page.
IN Master I got a RadSlidingPane. I put RadSkinManager in RadSlidingPane and oesnt work.
I put out RadSlidingPane and works perfectly.

Why?

   RadSkinManager radSkinManager = new RadSkinManager();
     radSkinManager.ID="RadSkinManagerpane";
    radSkinManager.ShowChooser = true;
       radSkinManager.Skin ="Vista";
         searchPane.Controls.Add(radSkinManager);
Tsvetina
Telerik team
 answered on 22 Aug 2011
3 answers
106 views
Hi,

i'm binding my radgrid1 to an onneeddatasource. All of the columns work fine except for the GridDropDownColumn. This column fail to populate with data in regular mode.

 

 

<telerik:GridDropDownColumn DataField="_UnloadTypeName"  

DataSourceID="RadGrid1_NeedDataSource"  

FilterControlAltText="Filter UnloadTypeColumn column"  

HeaderText="Unloading Type" ListTextField="_UnloadTypeName"  

ListValueField="_UnloadTypeName" UniqueName="UnloadTypeColumn">  

 

<HeaderStyle Width="100px" />  

 

<ItemStyle Width="100px" />  

 

</telerik:GridDropDownColumn>

please help.

thanks,
Minh Bui

 

Shinu
Top achievements
Rank 2
 answered on 22 Aug 2011
1 answer
106 views
Hey,
I need to change the color of the rows in the grId how can I do that?
Princy
Top achievements
Rank 2
 answered on 22 Aug 2011
1 answer
221 views
Hi All,
I am working on this task for past 2 days and could not solve this problem. I have a radgrid with a column of linkbutons inside it. when a user clicks on any link button, I pop up a javascript message based on some conditions.
ScriptManager.RegisterStartupScript(Page, this.GetType(), "message", string.Format("confirm_select('{0}','{1}');", RadGrid_IDPicker.ClientID,row.RowIndex + 1), true);

inside the function confirm_select, I have to make one row bold, the row that user clicked on and make the previous bolded row as normal/unbolded.
To achieve this, I am looping though the radgrid and unbolding all the rows and bolding the currenlty selected row if the user presses ok, but if the user pressed cancel, I would leave the previous row as bolded. below is my code
<script type="text/javascript"
var selectedRowIndex = -1;
    function confirm_select(gridViewID, rowIndex) {
        debugger;
  
  
        var gridview = document.getElementById(gridViewID);
        var master = gridViewID.get_masterTableView();
          
        if (confirm("You are leaving the parent level of the currently selected ID, are you sure?") == true) {
  
            for (var i = 1; i < gridview.rows.length; i++) {
                //not the selected row
                if (i != rowIndex)
                    gridview.rows[i].style.fontWeight = 'normal';
                //selected row
                else {
                    gridview.rows[i].style.fontWeight = 'bold';
                    selectedRowIndex = rowIndex;
                }
            }
  
        }
        else {
            if (selectedRowIndex != -1)
                gridview.rows[selectedRowIndex].style.fontWeight = 'bold';
  
        }
    }
  
</script>

I am getting an error right here

 

 

var master = gridViewID.get_masterTableView();

 


I would not have done the get get_masterTableView(), but I could not loop thorugh the gridview rows to make them bolded or unbolded. Below is the code for my gridview.
I also tried

var master = gridview.get_masterTableView();
but above line of code didn't work either.

<telerik:RadGrid ID="RadGrid_IDPicker" AllowSorting="True" PageSize="100" AllowPaging="True"
                                        runat="server" GridLines="None" OnPageIndexChanged="RadGrid_IDPicker_PageIndexChanged"
                                       OnPageSizeChanged="RadGrid_IDPicker_PageSizeChanged" Width="1500px" Visible="false" OnItemDataBound="RadGrid_IDPicker_DataBound"  >
                                        
                                       <MasterTableView RetrieveAllDataFields="true" AutoGenerateColumns="false" DataKeyNames="ID" >
                                           <Columns>
                                               <telerik:GridTemplateColumn UniqueName="TemplateLinkColumn"  AllowFiltering="false" HeaderText="ID">
                                                
                                                   <ItemTemplate>
                                                       <asp:LinkButton ID="ID_Link" runat="server" OnClick="MCLID_Link_Click" Text='<%#Bind("ID") %>' CommandName="Bold"></asp:LinkButton>
                                                     
                                                   </ItemTemplate>
                                                     
                                               </telerik:GridTemplateColumn>
                                                  <telerik:GridTemplateColumn    HeaderText="TAG">
                                                   <ItemTemplate>
                                                      <asp:Label ID="lbltag" runat="server" Text='<%#Bind("TAG") %>'></asp:Label>
                                                     
                                                   </ItemTemplate>
                                           </Columns>
                                       </MasterTableView>
                                       <PagerStyle Mode="NextPrevAndNumeric" />
                                   </telerik:RadGrid>

I don't have anything else defined. this gridview is inside the radPanelbar so the whole gridview is enclosed in this

<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="1500px" BackColor="#E6E6E6" ExpandMode="MultipleExpandedItems">
    <Items>
        <telerik:RadPanelItem runat="server" Text="ID Picker" Expanded="true" >
            <Items>
                <telerik:RadPanelItem Text="" Expanded="true">
                    <ItemTemplate>
                              //radgrid is right here

i am not sure what am I doing wrong, but I spend lot of hours on it and this is not working.

Any help will be highly appreciated.
Iana Tsolova
Telerik team
 answered on 22 Aug 2011
1 answer
162 views
Hi,

I have relatively simple scenerio where I have to check some conditions before updating data. To manage data I'm using RadGrid with autoupdate. I would like to check some conditions before update (i.e. if the name already exists, if an issue date is greater then other max issue date in database etc.). What is the best practice to make such check and how to stop update if some conditions are not met?
I thought about SqlDataSource updating event but I don't know how to read values from controls in edit form of RadGrid. Maybe other event is much more efficient in this case. I appreciate your support in this case as well as snippet of example code is welcome.

Best Regards,

Darek
Iana Tsolova
Telerik team
 answered on 22 Aug 2011
5 answers
187 views
i have a RadGrid in a usercontrol.
i have an aspx page that contains the usercontrol and a RadFilter.
how can i assign the FilterContainerID of the RadFilter to the RadGrid?

i already tried to directly giving it the ID as such:

 

<telerik:RadFilter 

ID="rfCustomFilter" runat="server"FilterContainerID="RadGrid1"/>

and i have also tried to assign filterContainerID in code behind as such:
rfCustomFilter.FilterContainerID = "RadGrid1";

both did not work, and i get an error when Adding an expression:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Devman
Top achievements
Rank 1
 answered on 21 Aug 2011
4 answers
97 views
At RadGrid.ItemCreated() event, that button is already created.

At which event, the CommandItem (export to excel button) is created and added to the MasterTableView?

I'd need to add a custom button to the CommandItem.

Thanks,


Daniel
Telerik team
 answered on 21 Aug 2011
2 answers
124 views
 

Hi

How could I export the TreeList data to an excel sheet?

Regards
Kannan
Daniel
Telerik team
 answered on 21 Aug 2011
3 answers
195 views
I have the following table
<table>
    <tr>
        <td>First Row, Cell 1</td>
        <td>First Row, Cell 2</td>
    </tr>
    <tr>
        <td colspan="2">Second Row, Cell 1</td>
    </tr>
</table>

Can some suggest a RadGrid equivalent that allows me to keep the second row but the cells in the first row become GridBoundColumns?  I think it has to be GridBoundColumn, because this allows sorting by column.

J
Daniel
Telerik team
 answered on 21 Aug 2011
1 answer
86 views
I've got another RadGrid problem. One column in my grid is a DropDown that is getting its values from a SqlDataSource. The cell is defined as:
<telerik:GridDropDownColumn DataField="store" HeaderText="Store" UniqueName="store" DataSourceID="SqlDataSource2"
       ListTextField="store" ListValueField="store">
</telerik:GridDropDownColumn>

The drop down list is getting populated fine. I am using edit in place for the editing and can select a value from the list okay. On the back end for the update, I've got (in part):
protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {           
        string store = (editedItem["store"].Controls[0] as DropDownList).SelectedValue.ToString();
    }

I'm getting an error at run time after editing a row when I include that code. If I remove the code that adds the store drop down from the update, it works fine (but of course doesn't update that field.) I've tried other variations such as "string store = (editedItem["store"].Controls[0] as DropDownList).SelectedItem.Value" with no luck.

The error is "Message: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.
Line: 6
Char: 62099
Code: 0"

Any ideas? Thanks!
Susan
Top achievements
Rank 1
 answered on 20 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?