Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
66 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
198 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
94 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 ObjectByVal 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 ObjectByVal 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
100 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
1 answer
46 views
Hi,

Will the Roadmap for the next release be published soon?


Richard

Sorry - i see this has been updated.
Ivo
Telerik team
 answered on 21 Sep 2009
2 answers
208 views
I'm creating a grid dynamically in my c# code by adding columns like this:

GridBoundColumn

 

boundColumn = new GridBoundColumn();

 

TargetGrid.MasterTableView.Columns.Add(boundColumn);

After I've added all of the columns I need to set the sort order programmatically. So let's say I add 3 columns: ID, name and address. Now I need to set the grid to sort ascending on Name. How can I do that?

Thanks in advance!
Ben

Nikolay Rusev
Telerik team
 answered on 21 Sep 2009
1 answer
88 views
Hi,

I have grid. Inside grid i have tabstrip with 5 tab. I edit data using radwindow popup. When i edit data and come back to main grid i want goto current tab which i in previous. When i return to grid with rebind() always i am in first tab. How can i come to my current tab?

lakmal
Shinu
Top achievements
Rank 2
 answered on 21 Sep 2009
1 answer
94 views
I have a RadGrid with ClientDataKeyNames="CredentialId"

From the codebehind I call a JavaScript function. This function gets passed in a CredentialId. So I know the CredentialId of the row that I want. Now how do I get the row?

 



Princy
Top achievements
Rank 2
 answered on 21 Sep 2009
3 answers
273 views
    Hi.  I'm in the process of converting a RadGrid using "traditional" columns to CardView, using ItemTemplate.  In the original grid, I had a GridButtonColumn to handle deleting, with a confirmation pop-up.  I want to keep this same behavior in the template.  Is there a way I can embed the original button column's behavior in the new template?

Thanks,
    Andrew

Here's my old grid:
                <telerik:RadGrid ID="ContentsRadGrid" runat="server" 
                    GridLines="None" 
                    OnNeedDataSource="ContentsRadGrid_NeedDataSource"   
                    ondeletecommand="ContentsRadGrid_DeleteCommand">  
                    <MasterTableView AutoGenerateColumns="false">  
                        <RowIndicatorColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </RowIndicatorColumn> 
                        <ExpandCollapseColumn> 
                            <HeaderStyle Width="20px"></HeaderStyle> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridBoundColumn HeaderText="Quantity" DataField="Quantity" /> 
                            <telerik:GridBoundColumn HeaderText="NDC" DataField="TheDrug.Ndc" /> 
                            <telerik:GridBoundColumn HeaderText="Name" DataField="TheDrug.DrugName" /> 
                            <telerik:GridBoundColumn HeaderText="Size" DataField="TheDrug.DrugSize" /> 
                            <telerik:GridBoundColumn HeaderText="Strength" DataField="TheDrug.DrugStrength" /> 
                            <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" 
                                ConfirmText="Delete medication from kit list?" /> 
                        </Columns> 
                    </MasterTableView> 
                </telerik:RadGrid> 
 

And here's the new one, so far:
                <telerik:RadGrid ID="RadGrid1" runat="server" 
                    GridLines="None" 
                    OnNeedDataSource="RadGrid1_NeedDataSource"   
                    ondeletecommand="ContentsRadGrid_DeleteCommand">  
                    <MasterTableView AutoGenerateColumns="false">  
                        <Columns> 
                            <telerik:GridBoundColumn HeaderText="Quantity" DataField="Quantity" Visible="false" /> 
                        </Columns> 
                        <ItemTemplate> 
                            <table style="width:100%;">  
                                <tr> 
                                    <td rowspan="2" style="text-align:center; width:15%">  
                                        Qty:<br /> 
                                        <%# Eval("Quantity") %> 
                                    </td> 
                                    <td colspan="2" style="white-space:nowrap;">  
                                        <%# Eval("TheDrug.Ndc.NdcString") %>&nbsp;  
                                        <span style="font-weight:bold;"><%# Eval("TheDrug.DrugName") %></span>  
                                    </td> 
                                    <td rowspan="2" style="text-align:center; width:10%">  
                                        DELETE LINK GOES HERE  
                                    </td> 
                                </tr> 
                                <tr> 
                                    <td style="white-space:nowrap;">  
                                        Strength:&nbsp;  
                                        <%# Eval("TheDrug.DrugStrength") %> 
                                    </td> 
                                    <td style="white-space:nowrap;">  
                                        Size:&nbsp;  
                                        <%# Eval("TheDrug.DrugSize") %> 
                                    </td> 
                                </tr> 
                            </table> 
                        </ItemTemplate> 
                    </MasterTableView> 
                </telerik:RadGrid> 
 


Andrew
Top achievements
Rank 1
 answered on 21 Sep 2009
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?