Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
87 views
Hi All,
i want to build page with dynamic videos that this videos goes from database.how can i create a box to show a slice of source video like gallery pages.
thx
kv's rhwnd
Top achievements
Rank 1
 asked on 09 Aug 2010
1 answer
136 views
Hi.
I have a grid with a combobox that use OnItemsRequested, to get only the values that is not already in the grid. But the problem is that i can not get a record in edit mode when using OnItemsRequested. If I instead use the combobox datasource, the edit mode works fine but then i get all the values from the database table. In edit-mode the user should not have the possibility to change the value and thee combobox will be disabled. (The OnItemsRequeste methode will not fill the combobox values with the choosen value from insert.) So how can i work it out?

The following code i am using is:

protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
      {
          var users = MtUserAccountBiz.GetMtUserWithNoAccountMapping();
 
          var comboBox = (RadComboBox)sender;
          comboBox.Items.Clear();
          foreach (var user in users)
          {
              var item = new RadComboBoxItem();
              item.Text = user.UserNumber + " " + user.FirstName + " " + user.LastName;
              item.Value = user.UserNumber.ToString();
              comboBox.Items.Add(item);
          }          
      }


<Columns>       
  <telerik:GridTemplateColumn UniqueName="UserNumber" DataField="UserNumber" HeaderText="Bruker"  >
    <ItemTemplate><%#DataBinder.Eval(Container.DataItem,"UserNumber")%></ItemTemplate>
    <EditItemTemplate>
      <telerik:RadComboBox DataTextField="UserNumber" DataValueField="UserNumber" EnableLoadOnDemand="True" ID="RadComboBox1"   HighlightTemplatedItems="true"
            runat="server" Height="160px" Width="220px" SelectedValue='<%#Bind("UserNumber") %>'  
                   OnItemsRequested="RadComboBox1_ItemsRequested" AutoPostBack="true">                   
      </telerik:RadComboBox>
    </EditItemTemplate>
  </telerik:GridTemplateColumn>
  <telerik:GridNumericColumn  DataField="Account" HeaderText="Reskontro"  UniqueName="Account">   </telerik:GridNumericColumn>
  <telerik:GridEditCommandColumn CancelText="Avbryt" EditText="Endre" InsertText="Sett inn" UpdateText="Oppdater"></telerik:GridEditCommandColumn>
                     
    </Columns>
Cecilie Nordbø
Top achievements
Rank 1
 answered on 09 Aug 2010
1 answer
65 views
Hi,

the content of the radSliddingPane is always white or without style.

I set for the radformdecoartor DecoratedControls to "All"
I my RadSliddingPane I have asp Panel, asp Label and Radcombobox.

You can see the screen shoot of my problem in attached file.

What do I do to resolve this problem?

Thanks.

Stéphane.
Svetlina Anati
Telerik team
 answered on 09 Aug 2010
1 answer
272 views
Hi,
I note that the RadSkinManager does not apply "skinID" property to user controls. For example, the included Telerik sample "LoginControl.ascx" does not inherit the skin set using RadSkinManager on the masterpage.
Is there some generic code you could suggest that could be applied to any of the following to program the user controls to inherit the skin of the masterpage?
Page_Load event of either the masterpage or the actual user control
OnPreInit of the BasePage class

...or is there a more efficient way of applying skins to user controls programmatically?
Tsvetina
Telerik team
 answered on 09 Aug 2010
4 answers
174 views
Hi.
I have a grid with a GridTemplateColumn containing a combobox. I want the combobox to only be available when the grid is in insert mode. I use the following code:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
 {     
    if (e.Item.OwnerTableView.IsItemInserted && e.Item is GridDataInsertItem)
    {
        var column =
(GridTemplateColumn)e.Item.OwnerTableView.GetColumnSafe("UserNumber");
         column.ReadOnly = false;
   }
             
   if (!(e.Item is GridDataInsertItem) && e.Item.IsInEditMode)
   {
         var column = (GridTemplateColumn)e.Item.OwnerTableView.GetColumnSafe("UserNumber");
         column.ReadOnly = true;
   }           
}

But the problem is that sometimes the combobox is available in edit mode and othertimes is not, also the same for insert mode. Somebody who knows what i am doing wrong? I assume the if-test maybe is wrong...

The code for the grid only the columns:
<Columns>      
   <telerik:GridTemplateColumn UniqueName="UserNumber" DataField="UserNumber" HeaderText="Bruker" SortExpression="UserNumber">                   
   <ItemTemplate><%#DataBinder.Eval(Container.DataItem,"UserNumber")%></ItemTemplate>
   <EditItemTemplate>
  <telerik:RadComboBox DataTextField="UserNumber" DataValueField="UserNumber" EnableLoadOnDemand="True" ID="RadComboBox1"   HighlightTemplatedItems="true"
                     runat="server" SelectedValue='<%#Bind("UserNumber") %>' DataSourceID="MtUserLinqDataSource">
  <ItemTemplate>                        
    <%# DataBinder.Eval(Container.DataItem, "UserNumber") %> 
    <%# DataBinder.Eval(Container.DataItem, "FirstName") %> 
    <%# DataBinder.Eval(Container.DataItem, "LastName")%>                        
  </ItemTemplate>
 </telerik:RadComboBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>   
<telerik:GridNumericColumn DataField="Account" HeaderText="Reskontro"  UniqueName="Account"></telerik:GridNumericColumn>
<telerik:GridEditCommandColumn CancelText="Avbryt" EditText="Endre" InsertText="Sett inn" UpdateText="Oppdater"></telerik:GridEditCommandColumn>     
</Columns>



Ceci

Cecilie Nordbø
Top achievements
Rank 1
 answered on 09 Aug 2010
2 answers
80 views
Hi,

Is it possible to get the VisibleRangeStart and End from javascript?

Cheers
Jon
Jonathan Levy
Top achievements
Rank 1
 answered on 09 Aug 2010
1 answer
146 views
I'm trying something similar scheduler and datagrid drag and drop example. However I would like know how I can get the resource ID when you drop the data row in to the scheduler, just like the way I can get the time slot index.

Please help.
Peter
Telerik team
 answered on 09 Aug 2010
1 answer
99 views
Hello Sir, I am Using Combobox in RadGrid Edit Tempate.

Code is Given Below.

I want combobox for insert and set value from codebehind.

And SelecetedValue is not woking in edittemplate.

Please Give me proper solution.

---- ASPX Code ---
<telerik:RadGrid ID="gridPostCode" runat="server" Width="96%" GridLines="None" AutoGenerateColumns="False"
        PageSize="10" AllowSorting="True" AllowPaging="True" OnUpdateCommand="gridPostCode_UpdateCommand"
        OnNeedDataSource="gridPostCode_NeedDataSource" ShowStatusBar="true" OnInsertCommand="gridPostCode_InsertCommand"
        OnDeleteCommand="gridPostCode_DeleteCommand"
        onitemcommand="gridPostCode_ItemCommand">
        <MasterTableView DataKeyNames="Id" Width="100%" CommandItemDisplay="Top" EditMode="InPlace">
            <Columns>
                <telerik:GridBoundColumn UniqueName="Id" HeaderText="Id" DataField="Id" ReadOnly="true" />
                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Product Name"
                    SortExpression="Product Name">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem,"ProductId")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox OnItemsRequested="cmbProducts_ItemsRequested" EnableLoadOnDemand="True"
                            ID="cmbProducts" runat="server" Height="140px" Width="150px" >
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>              
                <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="~/Images/edit-icon.png"
                    UpdateImageUrl="~/Images/edit-icon.png" UniqueName="EditCommandColumn" HeaderText="Modify"
                    HeaderStyle-HorizontalAlign="Center" CancelImageUrl="~/Images/delete-icon.png">
                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                </telerik:GridEditCommandColumn>               
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

-- CS Code--
 protected void gridPostCode_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "Edit")
        {
            GridEditableItem item = e.Item as GridEditableItem;
            RadComboBox ddl = (RadComboBox)item.FindControl("cmbProducts");
        }
    }

Thanks.
Kishor Dalwadi
Shinu
Top achievements
Rank 2
 answered on 09 Aug 2010
1 answer
108 views
Hello Sir, I am Using Combobox in RadGrid Edit Tempate.

Code is Given Below.

I want combobox for insert and set value from codebehind.

And SelecetedValue is not woking in edittemplate.

Please Give me proper solution.

---- ASPX Code ---
<telerik:RadGrid ID="gridPostCode" runat="server" Width="96%" GridLines="None" AutoGenerateColumns="False"
        PageSize="10" AllowSorting="True" AllowPaging="True" OnUpdateCommand="gridPostCode_UpdateCommand"
        OnNeedDataSource="gridPostCode_NeedDataSource" ShowStatusBar="true" OnInsertCommand="gridPostCode_InsertCommand"
        OnDeleteCommand="gridPostCode_DeleteCommand"
        onitemcommand="gridPostCode_ItemCommand">
        <MasterTableView DataKeyNames="Id" Width="100%" CommandItemDisplay="Top" EditMode="InPlace">
            <Columns>
                <telerik:GridBoundColumn UniqueName="Id" HeaderText="Id" DataField="Id" ReadOnly="true" />
                <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Product Name"
                    SortExpression="Product Name">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem,"ProductId")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox OnItemsRequested="cmbProducts_ItemsRequested" EnableLoadOnDemand="True"
                            ID="cmbProducts" runat="server" Height="140px" Width="150px" >
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>              
                <telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="~/Images/edit-icon.png"
                    UpdateImageUrl="~/Images/edit-icon.png" UniqueName="EditCommandColumn" HeaderText="Modify"
                    HeaderStyle-HorizontalAlign="Center" CancelImageUrl="~/Images/delete-icon.png">
                    <ItemStyle Width="50px" HorizontalAlign="Center" />
                </telerik:GridEditCommandColumn>               
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

-- CS Code--
 protected void gridPostCode_ItemCommand(object source, GridCommandEventArgs e)
    {
        if (e.CommandName == "Edit")
        {
            GridEditableItem item = e.Item as GridEditableItem;
            RadComboBox ddl = (RadComboBox)item.FindControl("cmbProducts");
        }
    }

Thanks.
Kishor Dalwadi
Shinu
Top achievements
Rank 2
 answered on 09 Aug 2010
3 answers
134 views
Hi,

I am using Self-referencing Hierarchy grid as per your example of employee-ReportsTo.
Now i have to changes expandcollapse column from EmployeeID to LastName.
Plz give me the suggestion ASAP.

Regards,
Parthesh
Mira
Telerik team
 answered on 09 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?