<
telerik:RadGrid
runat
=
"server"
ID
=
"RadGrid_Combo"
... >
<
ClientSettings
EnableRowHoverStyle
=
"true"
>
<
ClientEvents
OnGridCreated
=
"OP_RadGrid_GridCreated"
OnRowSelected
=
"OP_RadGrid_RowSelected"
OnRowDeselected
=
"OP_RadGrid_RowDeselected"
/>
<
MasterTableView
TableLayout
=
"Fixed"
>
<
Columns
>
<
telerik:GridImageColumn
UniqueName
=
"ImageUrl"
DataAlternateTextField
=
"ObjectType"
DataAlternateTextFormatString
=
"{0} Object"
DataImageUrlFields
=
"ImageUrl"
DataType
=
"System.String"
HeaderText
=
"Type"
ImageAlign
=
"Middle"
ImageHeight
=
"16px"
ImageWidth
=
"16px"
>
<
HeaderStyle
Width
=
"25px"
Wrap
=
"false"
/>
</
telerik:GridImageColumn
>
...
</
telerik:RadGrid
>
<
script
type
=
"text/javascript"
>
function OP_RadGrid_RowSelected(sender, args)
{
// do some stuff
...
}
</
script
>
I have this weird problem. Maybe is that I don't understand how a fixed position Menu works. Anyway, here are some simple code I used:
<style>
.fixmenu {
Hi,
How to Edit Selected Rows of a Grid using Client Side Scripts? I am able show the value from a List in the Grid and then when i select the rows and click on Edit Button i should be able to edit only one column value of the selected rows.
How can i achieve this requirement? Please let me know any way to get this done.
Below is my code:
<telerik:GridTemplateColumn DataField="ResourceCapacity" ColumnEditorID="clmResCap" UniqueName="ResourceCapacityTemplateColumn" HeaderText="ResourceCapacity">
<ClientItemTemplate >
#=ResourceCapacity#
</ClientItemTemplate>
<EditItemTemplate >
<telerik:RadNumericTextBox runat="server" DataField="ResourceCapacity" ID="txtResourceCapacity" HeaderText="ResourceCapacity"></telerik:RadNumericTextBox>
</EditItemTemplate>
</telerik:GridTemplateColumn>
Regards
Agasthya
I'm attempting to set a given row to Edit Mode when an item in a row has a specific value. I've tried setting using GridEditableItem editableItem.Edit = true, but it seems like this only works for edit mode EditForms.
How do I set row to editmode for InPlace editing?
I have to create RadComboBoxes dynamically in a Repeater. I'm trying to find a way to set the WebServiceSettings in the code behind. I found this code that uses JQuery:
function clientLoad(sender) {
sender.set_webServiceSettings('{"path":"Products.asmx","method":"GetCompanyNames"}');
}
But the service does not return Json so I receive an error. I create the control in the code behind like this:
List <ModuleView.JobBO> list = new List<ModuleView.JobBO>();
switch (moduledatakey)
{
case "JOB":
list = JobDA.Job_GetList_ByJobNumberContains(DB_Context, mfilter, top, companyId);
RadComboBox ddl = new RadComboBox();
ddl.ID = "ddlJob";
ddl.ItemDataBound += new RadComboBoxItemEventHandler(ddlJob_ItemDataBound);
ddl.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(ddlJob_ItemsRequested);
ddl.EmptyMessage = "Type to Select...";
ddl.EnableLoadOnDemand = true;
ddl.EnableTextSelection = true;
ddl.DataSource = list;
ddl.Text = "";
ddl.DataValueField = "JobId";
ddl.DataBind();
ddl.OnClientLoad = "clientLoad";
ddl.DropDownAutoWidth = Telerik.Web.UI.RadComboBoxDropDownAutoWidth.Enabled;
ddl.AutoPostBack = true;
ddl.EnableViewState = false;
ddl.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(qfTicket_cmbJob_SelectedIndexChanged);
plc2.Controls.Add(ddl);
break;
}
and use the following to implement the "LoadOnDemand":
protected void ddlJob_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
string mfilter = e.Text;
int top = 50;
Guid? companyId = null;
List<ModuleView.JobBO> list = new List<ModuleView.JobBO>();
list = JobDA.Job_GetList_ByJobNumberContains(DB_Context, mfilter, top, companyId);
((RadComboBox)sender).DataSource = list;
((RadComboBox)sender).DataBind();
}
This works fine accept the LoadOnDemand is EXTREMELY slow. I want to use the following web method which we are using on other comboboxes that are NOT created dynamically.
[WebMethod(EnableSession = true)]
public RadComboBoxData GetJobs(RadComboBoxContext context)
{
//get data
List<ModuleView.JobBO> lComps = new List<ModuleView.JobBO>();
COG_ContextDB db_context = UtilityBA.GetAspNetDataContext();
//company id?
App_Code_COGS.UI.UIUtilities.GridState oState = App_Code_COGS.UI.UIUtilities.GetGridStateFromSession();
Guid? gCustomerId = (UtilityBA.IsValidGuid(oState.CustomerId) ? (Guid?)Guid.Parse(oState.CustomerId) : null);
//get data
lComps = JobBA.Job_GetList_ByJobNumberContains(db_context, context.Text, 50, gCustomerId);
if (lComps == null)
{
lComps = new List<ModuleView.JobBO>();
}
//prep data controls
RadComboBoxData comboData = new RadComboBoxData();
List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(context.NumberOfItems);
//get top N
try
{
int itemsPerRequest = 10;
int itemOffset = context.NumberOfItems;
int endOffset = itemOffset + itemsPerRequest;
if (endOffset > lComps.Count)
{
endOffset = lComps.Count;
}
if (endOffset == lComps.Count)
{
comboData.EndOfItems = true;
}
else
{
comboData.EndOfItems = false;
}
result = new List<RadComboBoxItemData>(endOffset - itemOffset);
for (int i = itemOffset; i < endOffset; i++)
{
RadComboBoxItemData itemData = new RadComboBoxItemData();
itemData.Text = ((ModuleView.JobBO)lComps[i]).JobNumber.ToString() + " - " + ((ModuleView.JobBO)lComps[i]).JobName.ToString();
itemData.Value = ((ModuleView.JobBO)lComps[i]).JobId.ToString();
result.Add(itemData);
}
if (lComps.Count > 0)
{
comboData.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), lComps.Count.ToString());
}
else
{
comboData.Message = "No matches";
}
}
catch (Exception e)
{
comboData.Message = e.Message;
}
var json = JsonConvert.SerializeObject(result);
comboData.Items = result.ToArray();
return comboData;
}
Is there any way to assign the WebServiceSettings in the codebehind?
Hi,
In a web application, I use your RadTreeList to display some hierarchical data. Because the amount of data can be large, I set the AllowLoadOnDemand to true and created an OnChildItemsDataBind event handler. The load on demand mechanism works perfectly.
The RadTreeList contains a various number of column which are dynamically created but the first column is a TreeListSelectColumn which statically created. This allows user to check/unckeck some items in the TreeList and the result (checked items) must be saved in a database. Obviously, when the user reach the TreeList later, the state of the checkboxes must be restored.
Because TreeList items check state must be restored at the TreeList initialisation and the amount of TreeList data can be huge, I am looking for a way to expand all parent items of these checked items.
As an example let's consider this simple TreeList structure :
- Item1
|_ Item11
|_ Item111
|_ Item112
|_ Item12
|_ Item121
|_ Item13
- Item2
|_ Item21
|_ Item211
|_ Item22
If user checked "Item211" and saved his changes, I'd like the TreeList to be initialised like this :
- Item1 (collapsed because no child item are checked)
- Item2 (expanded because a child item is checked)
|_ Item21 (same here)
|_ Item211
|_ Item22
I cannot find a way to achieve this with load on demand feature. The reason is quite simple: the load on demand pattern requires to load only the root elements on TreeList_NeedDataSource event and then gradually child element on TreeList_ChildItemsDataBind event. In my previous example, this means that at page load the TreeList contains only 2 items (Item1 and Item2) so their child cannot be expanded because they does not exists.
However that feature, for me, seems to be very important. When a tree contains a lot of data, user must have a way to access easily to his previous selection without expanding manually all the parent nodes. Also, this feature seems to be necessary if I want to implement a seach feature.
Could you help me ?
Thanks,
Is it possibile to hide columns pressing a button ??
I would like to hide an aggregate column field but not his grand total ..
thanks
this._RadAsyncUpload.FileUploaded += RequiredFileUploaded("EXCEL");
private void RequiredFileUploaded(object sender, FileUploadedEventArgs e, string param)
{
}
Hi Guys,
Template, and Document manager previews are not working + I cannot see the word 'preview' at the bottom of the dialogs, right side.
I can click the items and they will load the content into the editor OK; but not preview.
Sometimes on clicking the items, the function icons top left will disappear - please see attached.
<
telerik:radeditor
runat
=
"server"
ID
=
"reuTemplates"
Height
=
"400"
Width
=
"984px"
Skin
=
"Bootstrap"
EditModes
=
"All"
ImageManager-SearchPatterns
=
"*.gif, *.jpg, *.jpeg, *.png"
OnClientLoad
=
"OnClientLoad"
DialogHandlerUrl
=
"~/Telerik.Web.UI.DialogHandler.axd"
TemplateManager-SearchPatterns
=
"*.htm"
ContentAreaCssFile
=
"~/_admin/css/EditorContentArea.css"
ToolsFile
=
"~/_admin/xml/templateTools.xml"
>
</
telerik:radeditor
>
I've changed skins, browser, and just about everything else I can think of but wondered if you know what could possibly be wrong
URLs ar rewritten, so using axd.
Thanks in advance,
Jack