Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
124 views
i have values e.g. <some text> which i want to display in radgrid cell, i don't know why text started with < end ended with > does not appear in cell?
Milosz
Top achievements
Rank 1
 answered on 21 Sep 2009
2 answers
81 views

Posted 9 hours ago (permalink)

i have this on the front-end
<telerik:RadGrid AutoGenerateColumns="true" ID="RadGrid1" Visible="false" MasterTableView-EnableNoRecordsTemplate="true" 
                            Width="100%" AllowFilteringByColumn="True" AllowSorting="True" OnSortCommand="RadGrid1_SortCommand" 
                            PageSize="15" ShowStatusBar="true" AllowPaging="True" OnPageIndexChanged="RadGrid1_PageIndexChanged"   
                            runat="server" GridLines="None" OnExcelMLExportStylesCreated="RadGrid1_ExcelMLExportStylesCreated" 
                            OnExcelMLExportRowCreated="RadGrid1_ExcelMLExportRowCreated">  
                        <PagerStyle Mode="NextPrevAndNumeric" />  
                        <MasterTableView Summary="testing" ></MasterTableView>  
                    </telerik:RadGrid> 
and on the back-end i have
Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource  
        Select Case tmp_comp_report_ID  
            Case 19  
                GetSectionReport(19, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 0, "")  
            Case 24  
                GetSectionReport(24, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 1, "")  
        End Select 
    End Sub 
 
    Protected Sub RadGrid1_PageIndexChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageChangedEventArgs) Handles RadGrid1.PageIndexChanged  
        Select Case tmp_comp_report_ID  
            Case 19  
                GetSectionReport(19, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 0, "")  
            Case 24  
                GetSectionReport(24, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 1, "")  
        End Select 
    End Sub 
 
    Protected Sub RadGrid1_SortCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridSortCommandEventArgs) Handles RadGrid1.SortCommand  
        Select Case tmp_comp_report_ID  
            Case 19  
                GetSectionReport(19, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 0, "")  
            Case 24  
                GetSectionReport(24, CInt(Request.QueryString.Item("reportid")), CInt(ddl_Stores.SelectedValue.ToString), ddl_Departments.SelectedItem.Text.ToString, 1, "")  
        End Select 
    End Sub 
 
    Protected Sub RadGrid1_ColumnCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridColumnCreatedEventArgs) Handles RadGrid1.ColumnCreated  
        e.Column.HeaderText = Replace(e.Column.HeaderText.ToString, "_", " ")  
        e.Column.AutoPostBackOnFilter = True 
    End Sub 
everything works fine except for paging and sorting. when i click on paging it has javascript error saying object required and sorting also has that. Can you help me please. thank you very much for your time.
appdev
Top achievements
Rank 1
 answered on 21 Sep 2009
1 answer
61 views
Hi,

How can i do number validation inside grid editform textbox?

lakmal
Princy
Top achievements
Rank 2
 answered on 21 Sep 2009
1 answer
90 views
Hi,

I am using the default skin in a grid. The image-buttons in this skin are all in black/white. Is it possible to get them in color without using another skin?

Usually when I disable a button I change the image to black/white but all buttons are already black/white and I cant see if a button is disabled or not...
Shinu
Top achievements
Rank 2
 answered on 21 Sep 2009
2 answers
92 views
Hi,

I have 2 instances of RAD Menu on a page: one main navigation horizontal line and one submenu on left hand side of a page (vertical). Both are fed from the same SiteMapProvider. Is it possible to set the .rmFocused style for 1st level item from the submenu clicked item?

Regards,
Marc
Fit2Page
Top achievements
Rank 3
Bronze
Bronze
Iron
 answered on 21 Sep 2009
3 answers
76 views
Hello,

Could we benefit fro some instructions to use CDN with radcontrols ?
http://weblogs.asp.net/scottgu/archive/2009/09/15/announcing-the-microsoft-ajax-cdn.aspx

Thanks
CS
Ivo
Telerik team
 answered on 21 Sep 2009
1 answer
66 views
I added a grid on page. However when i open the smart tag for it, the Skins drop down list is empty. Anything that i could set?
Pavlina
Telerik team
 answered on 21 Sep 2009
1 answer
201 views
Hi ,
i am stuck with a problem in radgrid.

i have a radgrid -- which has an edittemplate column and selectcolumn...
we are using a webusercontrol, in the edit template column and we are binding the data using the eval method.

the problem i am facing is, i am not able to find any events by which i can close the edit template, for this action, either i need to do a post back and then refresh the whole grid.

also when some one checks the row ( as we are using a check box for select column of the grid) the values in that particular row disappear, when we check the check box while the edit control is still visible.

<telerik:RadGrid ID="rgCampaignList" EnableViewState="true" Height="100%" GridLines = "none"
                    runat="server" AllowSorting="true" AllowMultiRowSelection="True" AllowAutomaticDeletes="true"
                    CssClass="GridMedium" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"
                    AllowPaging="True"
                    AllowFilteringByColumn="true" AutoGenerateColumns="false">
                    <HeaderContextMenu BackColor="White">
                    </HeaderContextMenu>
                    <HeaderStyle Font-Bold = "true" Wrap = "true" />
                    <PagerStyle AlwaysVisible = "true" Visible = "true" Position = "topAndBottom" />
                    <MasterTableView GridLines = "none" EnableViewState="true" Height="100%" EditMode="EditForms"
                        runat="server">
                      <PagerStyle AlwaysVisible = "true" Visible = "true" Position = "topAndBottom" />
                        <Columns>
                            <telerik:GridClientSelectColumn UniqueName="campapignsSelectColumn" HeaderText="Actions"
                                HeaderStyle-Width="20" Reorderable="false" />
                            <telerik:GridEditCommandColumn HeaderText="Edit" ButtonType="LinkButton" UniqueName="EditCommandColumn"
                                EditFormHeaderTextFormat="Edit Campaign" Reorderable="false">
                            </telerik:GridEditCommandColumn>
                            <telerik:GridTemplateColumn DataType="System.String" DataField="CampaignName" UniqueName="CampaignName"
                                SortExpression="CampaignName" HeaderText="Campaign" >
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnCampaignName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CampaignName") %>'
                                        CommandName="SelectCampaign" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            ............................................................................................................................................
                           ..............................................................................................................................................
                           </Columns>
                        <EditFormSettings FormMainTableStyle-BackColor="#FFFFE0" FormStyle-Height="100%"
                            FormStyle-Width="100%" FormCaptionStyle-Height="100%" EditColumn-Resizable="true"
                            UserControlName="../usercontrols/Campaigns_Edit.ascx" EditFormType="WebUserControl">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="reorder">
                        <DataBinding FilterParameterName="campaignname" FilterParameterType="String">
                        </DataBinding>
                        <ClientEvents />
                        <Selecting EnableDragToSelectRows="true" AllowRowSelect="True"></Selecting>
                    </ClientSettings>
                    <AlternatingItemStyle CssClass="GridMediumAlternate" />
                    <SelectedItemStyle CssClass="GridMediumSelected" />
                </telerik:RadGrid>


 please help me out on this one as i am stuck with this one and my deadline is approaching.

thank you very much for your help.








Pavlina
Telerik team
 answered on 21 Sep 2009
1 answer
101 views
Hi,

I'm trying to do something that I thought should be very simple...but I just can't get past one little issue.  After spending several hours checking out old postings and demo, I'm still at a lost.  Here's the description:

1. I have a simple grid with 4 columns:  Article ID, article Name, Supplier ID and Supplier.  The grid columns are auto-generated based on a dataset retrieved at run time.  The Article ID and Supplier ID column are made invisible and readonly during the ItemCreated event.  The grid displays correctly.

2. I'm using an edit form, which is automatically generated. AutoGenerateEditColumn = "true"

3. When the edit form opens, it displays 2 textboxes: one for Article Name and one for Supplier. 

4. What I'd like to do is simply change the Supplier textbox to a radComboBox.  The combobox will display a number of suppliers so user can choose one. 

5. I'm able to at itemDataBound time make the Supplier textbox invisible and add a radComboBox control to the edit form.  The radComboBox is bound to a dataset at the same time.

6. The edit form displays correctly with the Article Name textbox and a Supplier radcombobox.  I can make changes as needed.

7. However, when I click the Update button, which fires off the UpdateCommand, I'm not able to access the Supplier RadComboBox in the Edit Form to extract the new value selected by the user.  The control is no where to be found.

Attached are some code snippets...it has got to be something simple I overlooked.  I would appreciate it very much if someone can offer some advise...as this is putting a screeching halt on the project.

Thanks.

Barry

Code to add RadComboBox to Edit Form at ItemDataBound event:
 
    Protected Sub fabricGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles fabricGrid.ItemDataBound  
 
 
 
        If (TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode) Then 
 
          Dim editedItem As GridEditFormItem = CType(e.Item, GridEditFormItem)  
 
            ' Add supplier combobox  
 
            Dim supplierCombo As New RadComboBox  
            supplierCombo.ID = "supplierCombo" 
            Dim objPlan As New lucyPlanBizObject.plan _  
                    (Application("ConnectString"))  
            Dim dsResult As DataSet  
 
            dsResult = objPlan.getFabricSupplier("active")  
            supplierCombo.DataSource = dsResult.Tables(0)  
            supplierCombo.DataValueField = "fabricSupplierID" 
            supplierCombo.DataTextField = "supplier" 
            supplierCombo.DataBind()  
 
            supplierCombo.SelectedValue = 2  
            editedItem("supplier").Controls.Add(supplierCombo)  
 
            Dim textbox As TextBox  
             
            textbox = CType(editedItem("supplier").Controls(0), TextBox)  
            textbox.Visible = False 
            textbox.CssClass = "smalltext" 
             
 
        End If 
    End Sub 
 
Code to extract the RadComboBox control from the Edit Form; but finds nothing!!!
  Protected Sub fabricGrid_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles fabricGrid.UpdateCommand  
          
        Dim i As Integer 
 
 
       If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then 
            Dim editedItem As GridEditFormItem = CType(e.Item, GridEditFormItem)  
 
            Dim textbox As TextBox  
            Dim supplierCombo As RadComboBox  
 
            Dim fabricID As String 
            Dim planStyleColorFabricID As Integer 
            Dim fabricSupplierID As Integer 
 
            planStyleColorFabricID = CInt(e.Item.OwnerTableView.Items(e.Item.ItemIndex).Cells(3).Text)  
            fabricID = e.Item.OwnerTableView.Items(e.Item.ItemIndex).Cells(4).Text  
            fabricSupplierID = CInt(e.Item.OwnerTableView.Items(e.Item.ItemIndex).Cells(6).Text)  
 
           
 
 
            textbox = CType(editedItem("fabricID").Controls(0), TextBox)  
 
            supplierCombo = CType(editedItem("supplier").Controls(1), RadComboBox)   'supplierCombo = nothing because RadComboBox control is nowhere to be found!!!  
 
 
 
        End If 
 
    End Sub 

Shinu
Top achievements
Rank 2
 answered on 21 Sep 2009
1 answer
102 views
Hi

My functionality is like this...

Inside RAD Grid, one column is View Details.... On Click of View Details, I have to show Popup window...

Question...
1. How to pass the parameter (Row_ID) from my RAD grid to the Javascript which opens the popup window?
2. Also currently the window is keeping the View of my last window click.... I mean.. say I click on View Details of item No#1 and closed that window. And second time I clicked on Item No# 2 then window opens but it is showing old data only.

How can I get the newly click item data on page load it self?


<

 

script type="text/javascript">

 

function openRadWin() {

 

radopen("ViewSiteGroupSites_Popup.aspx,

"RadWindow1");

 

}

 

</script>

 


<

 

telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" >

 

 

<Windows>

 

 

<telerik:RadWindow

 

 

id="RadWindow1"

 

 

runat="server"

 

 

showcontentduringload="false"

 

 

width="500px"

 

 

height="500px"

 

 

 

VisibleTitlebar="false"

 

 

VisibleStatusbar="false"

 

 

>

 

 

</telerik:RadWindow>

 

 

</Windows>

 

 

</telerik:RadWindowManager>

 


 

 

 

Shinu
Top achievements
Rank 2
 answered on 21 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?