Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
652 views

I am trying to have a combo box that stays fixed at at the bottom of the screen.
The drop down itself stays fixed when I put the combobox inside a div tag with a position:fixed, but the items of the drop down do not stay in a fixed position when I scoll the page.

I also tried to put the combobox inside a pinned RadDock, and I get the same effect. The drop down stays pinned, but the list items move when I scroll the page.
<telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"
        <telerik:RadDock ID="RadDock1" runat="server"  
                    Width="300px" height="150px"  
                    Pinned="true" > 
        <ContentTemplate> 
            <telerik:RadComboBox ID="comboEmployees" runat="server"  
                Width="300"  
                Height="350" 
                AutoPostBack="True" 
                OnSelectedIndexChanged="comboEmployees_SelectedIndexChanged" 
                >  
            </telerik:RadComboBox> 
        </ContentTemplate> 
        </telerik:RadDock> 
    </telerik:RadDockZone> 

Is there some way to make the items stay fixed or pinned?

Thanks,

Kolbjørn


Plamen
Telerik team
 answered on 07 Aug 2012
3 answers
265 views

Hello,
This may have been answered many times, but after hours of googling I'm still in the dark.
I have a details table within a MasterRadGrid.MasterTableView - the details table databinds with the main grid ondetailtabledatabind and the detail table[s] display data just fine.

I need to read values from any or all of these detail tableviews, and in codebehind I have:

foreach (GridDataItem mRow in rGrd_recentAlbums.Items)  
    {  
    GridTableView licDet = (GridTableView)mRow.ChildItem.NestedTableViews[0];  
            foreach (GridDataItem dRow in licDet.Items)  
              { 
                ...code...
              }
    }

Now, what has me completely confused: I see the detailtableview databound/ the correct data when expanding any of the master grid rows. Debugging, looking at the GridTableView licDet, I see the expected name of it, I see the expected datakey values from both tableviews - yet, when I try to iterate the 
        foreach (GridDataItem dRow in licDet.Items)  
licDet has 0 items!?

Can someone please help me get past this?
Thanks,
knutb
suman
Top achievements
Rank 1
 answered on 07 Aug 2012
1 answer
81 views
Hi,
I have a Radgrid inside userControl.
I have a select column, and a "delete selected" link.
When user click on "delete selected" --> delete all items selected.

But I have a problem, the items seleted are null.. I tried use AjaxPanel but does not work
thi. is my ascx code

 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
            <telerik:RadGrid runat="server" ID="MyGrid" AutoGenerateColumns="false" Skin="Vista"
                RegisterWithScriptManager="false"  AllowMultiRowSelection="True" >
                <MasterTableView DataKeyNames="Id" CommandItemDisplay="Top" EditMode="InPlace">
                    <Columns>
                     <telerik:GridClientSelectColumn CommandName="Select" UniqueName="Select" HeaderStyle-Width="30px"
                        Resizable="false"  >
                               
                            </telerik:GridClientSelectColumn>
                        <telerik:GridEditCommandColumn HeaderStyle-Width="25px" UniqueName="EditCommandColumn"
                            ButtonType="ImageButton" EditImageUrl="/UI/Images/grid_edit.png" Resizable="false">
                        </telerik:GridEditCommandColumn>
                        <telerik:GridButtonColumn UniqueName="btnDelete" ConfirmDialogType="RadWindow" ButtonType="ImageButton"
                            CommandName="Delete" ConfirmDialogHeight="100px" ConfirmDialogWidth="300px" HeaderStyle-Width="25px"
                            Resizable="false" />
                        <telerik:GridTemplateColumn DataField="Id" HeaderText="Id" UniqueName="Id" Visible="false" ConvertEmptyStringToNull="true">
                            <InsertItemTemplate>
                                <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Id") %> '
                                    Width="150px" ReadOnly="true" Enabled="false" CssClass="labelGrid" />
                            </InsertItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Id") %> '
                                    Width="150px" CssClass="labelGrid" ReadOnly="true" />
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Value" DataField="Value">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtValue" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Value") %>'
                                    CssClass="textBoxInline"></asp:TextBox>
                                <br />
                                <asp:RequiredFieldValidator ID="rfvValue" runat="server" ErrorMessage="*" Display="Dynamic"
                                    ControlToValidate="txtValue" CssClass="validator"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="reValue" ControlToValidate="txtValue" runat="server"
                                    ValidationExpression="^[0-9a-zA-Z]{1,125}$" CssClass="validator" Display="Dynamic"
                                    SetFocusOnError="true"></asp:RegularExpressionValidator>
                                <asp:CustomValidator ID="cvValue" runat="server" SetFocusOnError="true" CssClass="validator"
                                    OnServerValidate="cvValue_ServerValidate"></asp:CustomValidator>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblValue" runat="server" Width="200px" CssClass="labelGrid" Text='<%# DataBinder.Eval(Container.DataItem, "Value") %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                    <CommandItemTemplate>
                        <div class="quickAdd">
                            <asp:LinkButton ID="lnkqQuitInsert" runat="server" CommandName="InitInsert">
                                <asp:ImageButton ID="imgQuickAdd" runat="server" ImageUrl="/UI/Images/add.png" />
                                <asp:Label ID="lblQuickAdd" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkImport" runat="server" CommandName="Import">
                                <asp:ImageButton ID="imgImportFromtxt" runat="server" ImageUrl="/UI/Images/import_to_grid.png" />
                                <asp:Label ID="lblImportFromFile" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkDeleteSelected" runat="server" CommandName="DeleteSelected">
                                <asp:ImageButton ID="imgDeleteSelected" runat="server" ImageUrl="/UI/Images/delete_selected.png" />
                                <asp:Label ID="lblDeleteSelected" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                            <asp:LinkButton ID="lnkDeleteAllValues" runat="server" CommandName="DeleteAllValues">
                                <asp:ImageButton ID="imgDeleteAllValues" runat="server" ImageUrl="/UI/Images/delete_all.png" />
                                <asp:Label ID="lblDeleteAllValues" runat="server" /></asp:LinkButton>&nbsp;&nbsp;
                        </div>
                    </CommandItemTemplate>
                </MasterTableView>
                 <ClientSettings>
                        <Selecting AllowRowSelect="true" />
                        </ClientSettings>
            </telerik:RadGrid>
            </telerik:RadAjaxPanel>


 ascx.cs

  protected void MyGrid_ItemCommand(object source, GridCommandEventArgs e)
        {

   case "DeleteSelected":
                    List<int> listValuesId= new List<int>();
                    List<smListValues> listValues = (List<smListValues>)Session["Data"];


                    foreach (GridDataItem item in MyGrid.MasterTableView.GetSelectedItems())
                    {
// this generate an error --> values is Null
                        // Hashtable values = new Hashtable();
                        //item.ExtractValues(values);



                         
                      
                        string strTxt = item["Id"].Text;  --> tthis return &nbsp 



                        //if (values["Id"].ToString() == "&nbsp;" || string.IsNullOrEmpty(values["Id"].ToString()))
                        //{
                        //     LogConfig.SaveInFile(Level.Debug, "Item does not exist in db", null, "ListMask.ascx.cs", "ItemCommand");
                        //     string valueKey = values["Value"].ToString();
                        //     listValues.Remove(listValues.Find(x => x.Value ==valueKey));  
                        //}else
                        //{
                        //    listValuesId.Add(Convert.ToInt32(values["Id"].ToString()));


                        //    listValues.Remove(listValues.Find(x => x.Id == Convert.ToInt32(values["Id"].ToString())));   
                        //}


                     
                    }
                    new smListValues().DeleteValues(listValuesId, Convert.ToInt64(Session["ListId"]));
                    Session["Data"] = listValues;
                    MyGrid.Rebind();
                    break;
          }


What I do wrong??
Shinu
Top achievements
Rank 2
 answered on 07 Aug 2012
6 answers
356 views
I have a radcombobox and values are populated in the OnItemsRequested event.
In this event ,Iam setting item.text as 'text to be displayed' and item.value as the Id of the field,which I can get using Radcombobox1.SelectedValue.Split(new char[] { ':' })[1].

1)if the user types a value in the combo box,then how can I get the Id of that field in the Textchanged event?
2)If the user types  something and no match is found,how can I make the loading table invisible?

Thanks,
Soumya.
Soumya
Top achievements
Rank 1
 answered on 07 Aug 2012
1 answer
241 views
Hi, My grid will contain check boxes as the only editable items. Is there a way for a user to just check the check boxes and automatically update the record? (Without an edit / update button)

Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Aug 2012
2 answers
91 views
Hello,

I have a ridgrid for which i'm having paging.
Is it possible to modify data on this range of rows (the active paging range) on serverside?
For example the grid contains 270 rows, but only the first 10 are displayed with paging.
When the next range (10 to 20) is displayed, then I want to change the data for this range.

I already tried the PreRender serverside event, it gives the correct displayed rows with radGridProducts.Items.
I can loop them and change some values, but the datasource of the grid isn't refreshed. It displays the same old values.

Maybe another approach/event of the grid?

Thanks.
Bieters Bieters
Top achievements
Rank 1
 answered on 07 Aug 2012
11 answers
192 views
I am trying to implement multicolumn combobox as filter for one column in the grid.
I have done filter with combobox as below. I am taking the filter value in the item command event and grid is bind in Needdatasource event.  


<telerik:GridBoundColumn HeaderText="Company" UniqueName="ComId" DataField="ComId" >
                    <FilterTemplate>
                    <telerik:RadComboBox ID="CBCompany" runat="server" DataSourceID="SQL_Company" DataTextField="CDName" DataValueField="ComId" Height="200px"
                     AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ComId").CurrentFilterValue %>' OnClientSelectedIndexChanged="CompanyIndexChanged"  >
                     <Items>
                     <telerik:RadComboBoxItem Text="All" />
                     </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
 
                                <script type="text/javascript">
                                    function CompanyIndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("ComId", args.get_item().get_value(), "EqualTo");
 
                                    }
                                </script>
 
                            </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridBoundColumn>


But confused how to use it for a multicolumn combobox.Please provide an example for the same.
Thanks,
Soumya
Soumya
Top achievements
Rank 1
 answered on 07 Aug 2012
2 answers
207 views

I am using Tabstrip control in my aspx page with multipage view as given below.I am moving to next tab on click of a button.But while giving the RadTabStrip1 & RadMultiPage1 in the AjaxUpdatedControl,I am getting the blow error: "Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined".

aspx:Included only the relevant parts of my markup as it is lengthy.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
              
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1"
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
             <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
 
          <telerik:AjaxSetting AjaxControlID="RbNextP">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RbNextP" />
                    <telerik:AjaxUpdatedControl ControlID="lbltitle" />
                    <telerik:AjaxUpdatedControl ControlID="lblname" />
                    <telerik:AjaxUpdatedControl ControlID="lbldob" />
                    <telerik:AjaxUpdatedControl ControlID="lblAge" />
                    <telerik:AjaxUpdatedControl ControlID="lblfile" />
                    <telerik:AjaxUpdatedControl ControlID="lblnation" />
                     <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                     <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
     
       <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                <UpdatedControls
                    <telerik:AjaxUpdatedControl ControlID="RCNationality" /> 
               
                </UpdatedControls
            </telerik:AjaxSetting
            <telerik:AjaxSetting AjaxControlID="BirthDate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lbldob" />
                    <telerik:AjaxUpdatedControl ControlID="RTYear" />
                    <telerik:AjaxUpdatedControl ControlID="RTMonths" />
                    <telerik:AjaxUpdatedControl ControlID="RTDays" />
                    <telerik:AjaxUpdatedControl ControlID="lblAge" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RTYear">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="BirthDate" />
                    <telerik:AjaxUpdatedControl ControlID="lbldob" />
                    <telerik:AjaxUpdatedControl ControlID="RTYear" />
                    <telerik:AjaxUpdatedControl ControlID="lblAge" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rbSave">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rbSave" />
                    <telerik:AjaxUpdatedControl ControlID="Message" />
                    <telerik:AjaxUpdatedControl ControlID="lblRegnumber" />
                    <telerik:AjaxUpdatedControl ControlID="LblRegnNo" />
                    <telerik:AjaxUpdatedControl ControlID="lbltitle" />
                    <telerik:AjaxUpdatedControl ControlID="lblname" />
                    <telerik:AjaxUpdatedControl ControlID="lbldob" />
                    <telerik:AjaxUpdatedControl ControlID="lblAge" />
                    <telerik:AjaxUpdatedControl ControlID="lblfile" />
                    <telerik:AjaxUpdatedControl ControlID="lblnation" />
                    <telerik:AjaxUpdatedControl ControlID="lblmobile" />
                    <%--<telerik:AjaxUpdatedControl ControlID="lblAFTime" />--%>
                    <telerik:AjaxUpdatedControl ControlID="lblATTime" />
                    <telerik:AjaxUpdatedControl ControlID="lblTimeComp" />
                </UpdatedControls>
            </telerik:AjaxSetting>                  
            </AjaxSettings>
</telerik:RadAjaxManager>
 
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Black" MultiPageID="RadMultiPage1" Align="Center" Width="800px"
                SelectedIndex="0" AutoPostBack="true"  >
                <Tabs>
                    <telerik:RadTab Text="Personal Details" runat="server" PageViewID="PageView1" Selected="true">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Contact Details" runat="server" PageViewID="PageView2" >
                    </telerik:RadTab>
                    <telerik:RadTab Text="Doctor Details" runat="server" PageViewID="PageView3" >
                    </telerik:RadTab>
                    <telerik:RadTab Text="Health Info" runat="server" PageViewID="PageView4" >
                    </telerik:RadTab>
                    <telerik:RadTab Text="Kin Details" runat="server" PageViewID="PageView5" >
                    </telerik:RadTab>
                    <telerik:RadTab Text="Insurance Details" runat="server" PageViewID="PageView6" >
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
            <telerik:RadMultiPage id="RadMultiPage1" runat="server" SelectedIndex="0" Width="800px" BackColor="BurlyWood" BorderStyle="Ridge" RenderSelectedPageOnly="true"  >
                  <telerik:RadPageView id="PageView1" runat="server">
                  //rest of the code
 
<telerik:RadButton ID="RbNextP" runat="server" Text="Next" Skin="WebBlue" OnClick="P_nextButton_Click" >
                            <Icon SecondaryIconCssClass="rbNext" SecondaryIconRight="4" SecondaryIconTop="6" />
                        </telerik:RadButton>
 
             
           
Code behind:
protected void P_nextButton_Click(object sender, EventArgs e)
       {
RadTabStrip1.SelectedIndex = 1;
           RadMultiPage1.SelectedIndex = 1; 
 
       }

Found same issues discussed in the forum earlier.but couldnt get an answer from it.
Please help me on it.
Thanks,
Soumya






Soumya
Top achievements
Rank 1
 answered on 07 Aug 2012
10 answers
193 views
I have a master table with detail tables below.

In the <DetailTables>
        <Columns>

I have a gridbound column which is also the key to the relation beween parent and child.
The problem is that I I set it to readonly="true" so that it does not appear when inserting a record when I press insert
I get an error telling me that the program cannot insert a null value into the database.
Any ideas?
Thank you!

Shinu
Top achievements
Rank 2
 answered on 07 Aug 2012
0 answers
98 views
I've got a radgrid that has several levels of calculations - as the user drills down through groupings, calculations become more specific.  Inside the toplevel radgrid, I've got another radgrid inside of a nestedviewtemplate such as this:

<telerik:RadGrid>
<MasterTableView DataKeyNames="id" HierarchyLoadMode="ServerOnDemand" HierarchyDefaultExpanded="false">
<Columns>
</Columns>
<NestedViewTemplate>
<telerik:RadGrid>
</telerik:RadGrid>
</NestedViewTemplate>
</MasterTableView>
</telerik:RadGrid>

For every ExpandCollapse column or grid level, there is a padding that is introduced somehow (so that the nestedtemplate ui-wise appears as a child).  Is there anyway to override that in the css?  I can see that rgExpandCol is the class used to display the image, but I can see that my nested row contains a table cell with class rgExpandCol but no image is actually visible.  Basically, I need my nested templates to expand to 100% of the width if at all possible.  Any suggestions?
debbie f
Top achievements
Rank 1
 asked on 07 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?