Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
89 views
I have a column called state which is a two digit state abbreviation.  The filter box is taking up what seems to be around 100 pixels, which is too long, how can I reduce the width of the filter boxes?

http://www.photoshop.com/users/tehprince/albums/263f22872b8e4870baebd04ec212f76f/view#2ccdab3e252a43ce823b269b30dd63d2

I've tried "columnname.FilterColumnWidth = Unit.Pixel(20);", but that doesn't re-size anything.

Any help would be most appreciated.
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Oct 2011
0 answers
92 views
when using GridTemplateColumn, it wont show french characters like(èèèèèèèèèèèèèèèè) nicely(it will display htmlcode), but if with /telerik:GridBoundColumn, they would be fine.

Is this a bug? Is there a solution to overcome this problem ? Thanks for help

Why I want to use GridTemplateColumn (because I want to have a tool tips(RadToolTip1) which can display èèèèèèè too.)

fyi, normal tooltip will not able to display èèèèèèèèè characters too, it would be converted into htmlcode


 <telerik:GridTemplateColumn DataField="Transcription" HeaderText="Response/Transcription"
                                                                UniqueName="Transcription">
                                        <EditItemTemplate>
                                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.TooltipText") %>' />
                                        </EditItemTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.TooltipText") %>' />
                                            <telerik:RadToolTip ID="RadToolTip1" runat="server" TargetControlID="Label1" Width="150px"
                                                RelativeTo="Element" Position="MiddleRight" ManualClose="true">
                                                <%# DataBinder.Eval(Container, "DataItem.Transcription")%>
                                            </telerik:RadToolTip>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>
kenneth
Top achievements
Rank 1
 asked on 18 Oct 2011
4 answers
73 views
Hi,

I am using telerik version 2011.2.712.35.

My webpage was running smoothly in old version but when i have changed it with this version i got problem in radgrid rebind method

When calling rebind method from any other events then grid get hide.. If i remove it, it work fine but needdatasource did not execute.

Suggest please.

Reyaz
Iana Tsolova
Telerik team
 answered on 18 Oct 2011
1 answer
569 views
Hi,

I am using RadGrid and want to make all rows editable on the initial load. I am setting all rows editable as shown below:

protected

 

void Grid_ItemCreated(object sender, GridItemEventArgs e) {

 

 

if (!IsPostBack && e.Item is GridDataItem) {

 

e.Item.Edit =

true;

 

}

}

But when ItemDataBound even is fired IsInEditMode property is still set to false. But Edit property is correctly set to true. In the RadGrid documentation says "We suggest using IsInEditMode instead of Edit to check whether an Item is in edit more or not.".  But the IsInEditMode property is set to false. Why is IsInEditMode property not set to true? I added my item data bound event handler below.

 

 

 

protected void Grid_ItemDataBound(object sender, GridItemEventArgs e) {

 

if

 

(e.Item is GridEditableItem && e.Item.IsInEditMode) { 
//--------------------------------------never getting to this block

 

 

DropDownList statusDropDown = editedItem.FindControl("StatusDropDown") as DropDownList;
//do something with statusDropDown

 

 

}
}

I tried changing my event handle to use Edit property instead, then the code is not finding control in the EditItemTemplate StatusDropDown DropDownList.

Here is my modified code and grid decleration:

protected void Grid_ItemDataBound(object sender, GridItemEventArgs e) {

 

if

 

(e.Item is GridEditableItem && e.Item.Edit) { 

 

 

  //------------------------------------------------I am geting null for statusDropDown

 

 

DropDownList statusDropDown= editedItem.FindControl("StatusDropDown") as DropDownList
//do something with statusDropDown

}
}

 

 

<telerik:RadGrid ID="Grid" runat="server" GridLines="None" AutoGenerateColumns="false"

                    OnItemDataBound="Grid_ItemDataBound" OnNeedDataSource="Grid_NeedDataSource"

                    OnItemCreated="Grid_ItemCreated" AllowMultiRowEdit="true">

                    <MasterTableView DataKeyNames="ClassId" EditMode="InPlace">

                        <Columns>

                           

                            <telerik:GridBoundColumn UniqueName="ClassName" HeaderText="Class Name" DataField="ClassId"

                                ReadOnly="true">

                            </telerik:GridBoundColumn>

                            <telerik:GridBoundColumn HeaderText="Site" DataField="SiteId" ReadOnly="true">

                            </telerik:GridBoundColumn>

                           

                            <telerik:GridTemplateColumn UniqueName="Status" HeaderText="Status">

                                <ItemTemplate>

                                    <asp:Label ID="statusLabel" runat="server">

                                        <%# DataBinder.Eval(Container.DataItem, "StatusId")%>

                                    </asp:Label>

                                </ItemTemplate>

                                <EditItemTemplate>

                                    <asp:DropDownList ID="StatusDropDown" runat="server" />

                                </EditItemTemplate>

                            </telerik:GridTemplateColumn>                           

                        </Columns>

                    </MasterTableView>

</telerik:RadGrid>

I am trying to avoid using prerenderer becasue of rebind call.

Anyone has any idea what I am missing. Please let me know if you see a better way to do this. I appreciate any help.

Thanks,
Ana


 

 

 

Shinu
Top achievements
Rank 2
 answered on 18 Oct 2011
1 answer
92 views
I'm writing to ask how best to maintain the Empty Message value in a RadComboBox - after the selection of a RadComboBoxItem;



<
telerik:RadComboBox ID="RadComboBox1" runat="server" Skin="Black"
                    AutoPostBack="True"
                    onselectedindexchanged="RadComboBox1_SelectedIndexChanged"
                    Font-Names="Microsoft Sans Serif" Width="160px"
                    EmptyMessage="Maines Paper" MarkFirstMatch="True">
                    <Items>                        
                        <telerik:RadComboBoxItem runat="server" Text="Sign out" Value="Sign out" />
                        <telerik:RadComboBoxItem runat="server" Text="Change Password" Value="Change Password" />
                    </Items>
                </telerik:RadComboBox>
Princy
Top achievements
Rank 2
 answered on 18 Oct 2011
8 answers
379 views
I'm not sure if i can accomplish this is a radconfirm or radalert. But this my scenario;

You can make an enquiry on an item. But to do so you must be logged in. So what i'm doing at the moment is using javascripts alert to popup a message saying, "You need to be registered click 'ok' here to register, or 'cancel' to cancel...".

However i'd like to have 'Click here to register, or click here to login, or click here to cancel'. Is this possible with either of these or will i have to use an actual radwindow ?

Alan
Stuart Hemming
Top achievements
Rank 2
 answered on 17 Oct 2011
9 answers
317 views
I'm trying to use the RadUpload control inside of a JQuery dialog in a ASP.Net page.  I'm having a problem with the RadUpload complaining that it's not inside of a form.  The message I get is "RadUpload requires to be in a form tag to operate properly!".

The behavior of JQuery is to take any html component it wraps in a dialog and to move it out to just before the end of the body element (this is done because some browsers have trouble rendering items in absolute coordinates, when they are in other html containers).  This causes that part of the html to go outside of the ASP.Net form.  So now the RadUpload is outside of the form...

In the dialog's ok button, I move the dialog contents back inside the form, just before submitting the form.  This moves all the items back to the form and submits them correctly.  This all works except for that annoying message I get from the RadUpload every time the page runs.  Is there a way to turn off this message, and tell the RadUpload that I know what I'm doing, and it should stop complaining?

Thanks

Andy
Mario
Top achievements
Rank 1
 answered on 17 Oct 2011
2 answers
299 views
I followed the example in "RadComboBox in RadGrid", the ItemsRequested event is not firing. attached the code. Please help me, is there any mistake in the code.  
Thanks,
<telerik:RadGrid ID="RadGrid2" GridLines="None" AutoGenerateColumns="false" PageSize="7" AllowPaging="true" AllowSorting="true"
                runat="server" OnItemDataBound="OnItemDataBoundHandler" DataSourceID="ProductsDataSource" AllowAutomaticUpdates="true"
                AllowAutomaticInserts="True" ShowStatusBar="true" Skin="Office2010Blue">
                <MasterTableView ShowFooter="false" DataKeyNames="inventoryid" EditMode="InPlace" CommandItemDisplay="TopAndBottom">
                <Columns>
 
                     
                    <telerik:GridTemplateColumn UniqueName="conditioncode" HeaderText="<%$ Resources:locStrings, GV_COL_PO_ConditionCode %>" SortExpression="conditioncode" ItemStyle-Width="150px">
                    <FooterTemplate> Template footer</FooterTemplate>
                    <FooterStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "conditioncode")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox runat="server" ID="RadComboBox1" EnableLoadOnDemand="True" DataTextField="code" DataValueField="conditionid"
                                AutoPostBack="true" HighlightTemplatedItems="true" Height="140px" Width="150px" DropDownWidth="200px"
                                OnItemsRequested="RadComboBox1_ItemsRequested"
                                OnSelectedIndexChanged="OnSelectedIndexChangedHandler" >
                                <HeaderTemplate>
                                    <ul>
                                    <li class="col1">Code</li>
                                    <li class="col2">Condition</li>
                                    </ul>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <ul>
                                    <li class="col1">
                                        <%# DataBinder.Eval(Container,"Text")%>
                                    </li>
                                    <li class="col2">
                                        <%# DataBinder.Eval(Container,"Attributes['code']")%></li>
                                    </ul>
                                </ItemTemplate>
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    </telerik:GridTemplateColumn>
 
 
                    <telerik:GridEditCommandColumn FooterText="EditCommand footer" UniqueName="EditCommandColumn" HeaderText="Edit" UpdateText="Update"
                                                    HeaderStyle-Width="100px">
                    </telerik:GridEditCommandColumn>
 
                </Columns>
                </MasterTableView>
            </telerik:RadGrid>
 
            <asp:SqlDataSource ID="ProductsDataSource" runat="server" ConnectionString="Data Source=VSSCLOUDAPP1;Initial Catalog=iqrtest_20113108;User ID=sa; Password=admin!23"
                SelectCommand="SELECT ptid, inventoryid, unitcost, conditioncode, status, receivestatus, mfgr
                                FROM inventory WHERE ptid=501">
 
            </asp:SqlDataSource>
 
C#:
 
protected void OnItemDataBoundHandler(object sender, GridItemEventArgs e)
        {
            if (e.Item.IsInEditMode)
            {
                GridEditableItem item = (GridEditableItem)e.Item;
                if (!(e.Item is IGridInsertItem))
                {
                    RadComboBox combo = (RadComboBox)item.FindControl("RadComboBox1");
                    RadComboBoxItem selectedItem = new RadComboBoxItem();
                    selectedItem.Value = ((DataRowView)e.Item.DataItem)["conditionid"].ToString();
                    selectedItem.Text = ((DataRowView)e.Item.DataItem)["code"].ToString();
                    selectedItem.Attributes.Add("condition", ((DataRowView)e.Item.DataItem)["condition"].ToString());
                    combo.Items.Add(selectedItem);
                    selectedItem.DataBind();
                    Session["conditionid"] = selectedItem.Value;
                }
            }
        }
 
        protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
 
            DataTable dt = new DataTable();
            dt = IQR.Generic.cGeneric.GetData(cStoredProcedureConstants.SP_POItem_GetConditionCodes, true);
 
            RadComboBox rcbConditionCode = (RadComboBox)sender;    // Clear the default Item that has been re-created from ViewState at this point.    comboBox.Items.Clear();
            foreach (DataRow row in dt.Rows)
            {
                RadComboBoxItem item = new RadComboBoxItem();
                item.Value = row["conditionid"].ToString();
                item.Text = row["code"].ToString();
                item.Attributes.Add("condition", row["condition"].ToString());
                rcbConditionCode.Items.Add(item);
                item.DataBind();
            }
 
        }
 
        protected void OnSelectedIndexChangedHandler(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            Session["conditionid"] = e.Value;
        }

Muthu

Elliott
Top achievements
Rank 2
 answered on 17 Oct 2011
3 answers
126 views
     Hello.
I`m using RadGrid with SqlDataSource. Filter in RadGrid work fine except using such words as "AND", "OR" in filter expression (for example "mike and smith"). In this situation filter is reseting and grid not filtered.
I didn`t find any post with this question.
Any ideas?
Elliott
Top achievements
Rank 2
 answered on 17 Oct 2011
5 answers
136 views
Hello,

is it possible top open the calender on pressing function key F4 when cursor is in DateInput field of the RadDatePicker control?
I've tried to catch the key pres with ClientEvent OnKeyPress but this doesn't catch pressig F4.

Can someone help me?

Regards,
  Jos Meerkerk
RvdGrint
Top achievements
Rank 1
 answered on 17 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?