Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
135 views
Is there a way to have the TreeMapItems auto resize on browser window resize? Currently if the user shrinks the browser window, it shrinks the RadTreeMap but not the TreeMapItems so they get covered up. And in reverse, it expands the size of the RadTreeMap but the TreeMapItems stay the same so it leaves a blank area to the right of the TreeMapItems.

Is there a way to fix this?
Nencho
Telerik team
 answered on 17 Nov 2014
3 answers
155 views
I currently have a combo box with a custom item template. Is there a way to cause the drop down menu to be offset left by X number of pixels. I basically don't want the combo box to open directly underneath, but instead off to the left. Wasn't sure if there was a way to do this?

Thanks,
Levi
Görkem
Top achievements
Rank 1
 answered on 16 Nov 2014
2 answers
148 views
Hi all,

How can i shift the dropdown position to left? i dont want the dropdown exactly below the combo textbox. please help me.
Görkem
Top achievements
Rank 1
 answered on 16 Nov 2014
4 answers
368 views

Hi,

Perhaps someone can help me out. I am trying to do something that should be extremely easy with OpenAccess. Complex DataBinding to a textbox. I have not been able to accomplish this with OpenAccess. I have been trying this unsuccessfully for 3-4 weeks. Does anyone know how to do this? If so, could you please post some example code. I am using SQL Server Compact 3.5 and WinForms.

I can successfully add, update, and delete records from one table in a grid. Nothing else works.

Also, Telerik support has been terrible. They take many days to give an ambiguous answer. So far they are the worst support I have encountered. I regularly deal with <admin>company name removed</admin> and <admin>company name removed</admin>. Also, I have had great success with <admin>product name removed</admin> as an ORM. This product works very well however crud is painful (lots of code). This is why I was interested in OpenAccess. Telerik advertises it as great for CRUD. I'm hoping someone can help me before I throw this product in the garbage.

Rene

Olivier
Top achievements
Rank 2
 answered on 16 Nov 2014
4 answers
537 views
I've 10 dropdownlist in one page. I want to bind this dropdownlists from client side. In jquery I just pass the dropdownlists id using ajax from client side to server side then I bind the data using jquery. But in telerik how can I do that. I am new here. So I don't know how to do that. Can any one help me please.
Jahangir
Top achievements
Rank 2
 answered on 16 Nov 2014
1 answer
561 views
Hi,

i have an issue with maintaining state of template column textbox on paging in radgrid.
I am storing the data in session and then on need datasource event trying to get the data again from session.
But this does not help.
Please help me its urgent issue.please refer code below-






<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadGrid ID="grChecklist1" runat="server"  AutoGenerateColumns="false"
            onneeddatasource="grChecklist1_NeedDataSource" 
        onpageindexchanged="grChecklist1_PageIndexChanged" >
   <MasterTableView  AllowPaging="true" AutoGenerateColumns="false"  PageSize="5"> 
    <Columns>
    <telerik:GridTemplateColumn DataField="Number" HeaderText="Number" Visible="true">
    <ItemTemplate>
         <asp:TextBox ID="txtNumber" runat="server" Text='<%#Bind("Number")%>'/>
    </ItemTemplate>
   </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn DataField="TaskDescription" HeaderText="TaskDescription" Visible="true">
    <ItemTemplate>
         <asp:TextBox ID="txtTaskDescription" runat="server" Text='<%#Bind("TaskDescription")%>' />
    </ItemTemplate>
   </telerik:GridTemplateColumn>
   </Columns>

</MasterTableView>
</telerik:RadGrid>
   

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadDetails();
            }
        }

        private void LoadDetails()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Number",typeof(string));
            dt.Columns.Add("TaskDescription", typeof(string));
            dt.Rows.Add("1", "task1");
            dt.Rows.Add("2", "task2");
            dt.Rows.Add("3", "task3");
            dt.Rows.Add("4", "task4");
            dt.Rows.Add("5", "task5");
            dt.Rows.Add("6", "task6");
            dt.Rows.Add("7", "task7");
            //grChecklist.DataSource = dt;
           // grChecklist.DataBind();
            Session["dt"] = dt;

        }

        private void RefreshSessionState()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Number", typeof(string));
            dt.Columns.Add("TaskDescription", typeof(string));
            
            foreach (GridDataItem item in grChecklist1.Items)
            {
              string number=(item.FindControl("txtNumber") as TextBox).Text;
              string task = (item.FindControl("txtTaskDescription") as TextBox).Text;
              dt.Rows.Add(number,task);
            }
            if (Session["dt"] != null)
                Session.Remove("dt");
            Session["dt"] = dt;
        }

       

        protected void grChecklist1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
           // RefreshSessionState();
            grChecklist1.DataSource = (DataTable)Session["dt"];

        }

        protected void grChecklist1_PageIndexChanged(object sender, GridPageChangedEventArgs e)
        {
            grChecklist1.AllowPaging = false;
            grChecklist1.Rebind();
           // RefreshSessionState();
           
            grChecklist1.CurrentPageIndex = e.NewPageIndex;
            grChecklist1.AllowPaging = true;
            grChecklist1.Rebind();
        }
    }
Jayesh Goyani
Top achievements
Rank 2
 answered on 15 Nov 2014
9 answers
331 views
Hi,
How to Maintain the state(userid) of checked records  during paging in rad grid?
below is my code for reference.
<telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="True" AllowPaging="True"
           PageSize="5" AllowSorting="True"
           OnNeedDataSource="RadGrid1_NeedDataSource" CellSpacing="0"
           GridLines="None" ShowGroupPanel="True">
           <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
           <ClientSettings Selecting-AllowRowSelect="true" AllowDragToGroup="True">
               <Selecting AllowRowSelect="True"></Selecting>
           </ClientSettings>
           <MasterTableView DataKeyNames="UserId">
               <Columns>
                   <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" />
               </Columns>
               <PagerStyle AlwaysVisible="True"></PagerStyle>
           </MasterTableView>
       </telerik:RadGrid>
       <br />
       <asp:Button ID="Button1" runat="server" Text="Save" OnClick="Button1_Click" Width="130px"
           Height="25px" ValidationGroup="val" />
       <br />
and
public partial class GroupUserCreation : System.Web.UI.Page
{
    Globas obj = new Globas();
    CheckBox chkbox = new CheckBox();
    string GroupId="";
  
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
 
            DataTable dt1 = obj.GroupDetails();
            cmbgroupname.DataSource = dt1;
            cmbgroupname.DataTextField = "GroupName";
            cmbgroupname.DataValueField = "GroupId";
            cmbgroupname.DataBind();
        }
      
        
    }
 
    protected void Button1_Click(object sender, EventArgs e)
    {
        
        try
        {
            GroupId = cmbgroupname.SelectedItem.Value.ToString();
            foreach (GridItem item in RadGrid1.MasterTableView.Items)
            {
 
                GridDataItem dataitem = (GridDataItem)item;
                TableCell cell = dataitem["ClientSelectColumn"];
                CheckBox checkBox = (CheckBox)cell.Controls[0];
                if (checkBox.Checked)
                {
                    int userid = Convert.ToInt32(dataitem.GetDataKeyValue("UserId").ToString());
                    if (GroupId != null)
                    {
                        obj.InsertGroupUserCreation(Convert.ToInt32(GroupId), userid);
                    }
                }
 
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
     
    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable dt = obj.UserDetails();
        RadGrid1.DataSource = dt;
      
    }
 
 
     
}
Help needed,
Thanks
S
Top achievements
Rank 1
 answered on 15 Nov 2014
1 answer
139 views
I posted this question on StackOverflow: http://stackoverflow.com/questions/26935565/cannot-read-property-length-of-null-using-sender-set-selectedtogglestateinde

It would appear that this telerik thread holds some relevance: http://www.telerik.com/forums/radbutton-javascript-error

Note this issue is in the same project as the RadCombo thread I made: http://www.telerik.com/forums/client-side-eventargs-are-mutable 

Where 'navigating' the client state (control state or view state) using either sender or the event argument is not an issue.



If you could answer this question on SO, I would be greatful, but I do have a general question for this thread post. What is the underline mechanics of how telerik uses the client functions 'get_selectedToggleStateIndex()' or 'get_toggleStates()'.. what is '_functionality' and why is it null in my implementation (i.e. nested function as a promptcallback function)?
Brett
Top achievements
Rank 1
 answered on 14 Nov 2014
1 answer
128 views
Hi,

I'm using a GridTemplateColumn with an Image control in ItemTemplate. I'm using the ItemDataBound event to set the Image background, this all works fine. However when I click on a column to sort all the text columns are sorted correctly but the images do not move.

Here is my code:

ASPX:
<telerik:RadGrid ID="radGrid1" runat="server" AllowSorting="true" OnNeedDataSource="radGrid1_NeedDataSource" OnItemDataBound="radGrid1_ItemDataBound">
  <MasterTableView EditMode="Batch" AllowSorting="true">
    <Columns>
      <telerik:GridClientDeleteColumn ConfirmText="Are you sure?" ImageUrl="~/Images/icoDelete.png" />
      <telerik:GridTemplateColumn HeaderText="Color" UniqueName="RangeColor" DataField="RangeColor" ItemStyle-HorizontalAlign="Center">
          <ItemTemplate>
            <asp:Image ID="imgRangeColor" Height="15" Width="100%" runat="server" />
          </ItemTemplate>
          <EditItemTemplate>
            <telerik:RadColorPicker ID="colorPickerTemplate" runat="server" OnClientLoad="PickerLoad" ShowIcon="true" ShowEmptyColor="false" />
          </EditItemTemplate>
      </telerik:GridTemplateColumn>
    </Columns>
  </MasterTableView>
  <ClientSettings>
    <ClientEvents OnBatchEditGetCellValue="OnBatchEditGetCellValue" OnBatchEditSetCellValue="OnBatchEditSetCellValue" OnBatchEditGetEditorValue="OnBatchEditGetEditorValue" OnBatchEditSetEditorValue="OnBatchEditSetEditorValue" />
  </ClientSettings>
</telerik:RadGrid>

NeedDataSource and ItemDataBound events:
protected void radGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
  myTable = new DataTable();
 
  myTable.Columns.Add("RangeMin");
  myTable.Columns.Add("RangeMax");
  myTable.Columns.Add("ColorAux");
 
  if (ViewState["Table"] != null)
    myTable = (DataTable)ViewState["Table"];
 
  radGrid1.DataSource = myTable;
  ViewState["Table"] = myTable;
}
 
protected void radGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
  if (e.Item is GridDataItem & e.Item.IsDataBound)
  {
    GridDataItem item = (GridDataItem)e.Item;
 
    string color = ((DataTable)ViewState["Table"]).Rows[item.ItemIndex][2].ToString(); //Get ColorAux value
 
    (item["RangeColor"].FindControl("imgRangeColor") as System.Web.UI.WebControls.Image).BackColor = System.Drawing.ColorTranslator.FromHtml(color);
  }
}


Any sugest how I can fix that problem?

Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 14 Nov 2014
8 answers
533 views
I do not want the selected row in a grid to turn dark. How do I turn that off?
Pavlina
Telerik team
 answered on 14 Nov 2014
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?