function GridCreated(sender, eventArgs) { |
var gridID = sender.get_id(); |
if (gridID != null) { |
var grid = $('#' + gridID); |
var td = $("td[colSpan=2]", grid); |
$(td).attr("colSpan",1); |
} |
} |
Hi,
I have used InsertCommand when inserting new rows to the radgrid.
protected
void
grvTasks_InsertCommand(
object
sender, GridCommandEventArgs e)
{
var editableItem = ((GridEditableItem)e.Item);
GetTasks();
if
(_taskListMain !=
null
)
{
Task newTask =
new
Task(_taskListMain.DataConnections);
Hashtable values =
new
Hashtable();
editableItem.ExtractValues(values);
if
(values[
"Name"
] !=
null
)
newTask.Name = (
string
)values[
"Name"
];
if
(values[
"Description"
] !=
null
)
newTask.Description = (
string
)values[
"Description"
];
if
(values[
"EstimateInHours"
] !=
null
)
newTask.EstimateInHours =
int
.Parse(values[
"EstimateInHours"
].ToString());
_taskListMain.Tasks.TaskRows.Add(newTask);
_taskListMain.Tasks.Save();
}
}
I copy data from each field from hashtable to the final class properties. This means lot of rows if there are lot of fields, so I wondering is there another way to copy inserted data from GridEditableItem to final custom class? e.g. Similar function what is use in UpdateCommand ( editableItem.UpdateValues(task);)
Regards,
Auvo
Hello...
I have a radgrid1 (the parent) which allows you to insert records with a formtemplate.
inside radgrid1's form template i have another radgrid (radgrid2) which basically is a child of radgrid one.... think of radgrid1 as a cars, and radgrid 2 as carparts.... so i want to insert a honda.... but as part of honda i want to add engine, seats etc.
my problem is i'm not sure how to approach a scenario where i click "add new record" on radgrid1... my formtemplate pops up... but because performinsert hasn't been called yet.... i can't add items to my radgrid2 since the parent doesnt have a datakeyvalue yet as parent record not inserted yet.
How would you go about this? how would i databind the child grid when i'm still trying to add the parent?
I would like to display "Yes" or "No" for a Boolean in RadGridView instead of a checkbox. I would like to implement this changed in xaml. Columns are generating dynamically. This is how it's created now:
<telerik:RadGridView x:Name="Data" Grid.Row="3" Margin="5" AutoGenerateColumns="False" CanUserSortColumns="True" IsFilteringAllowed="True"
grid:RadGridViewColumnsBinding.ColumnsCollection="{Binding Path=Columns}"
IsReadOnly="False" CanUserResizeColumns="True"/>
Hello,
I made an ASP.NET page that uses a RadScheduler with client-side binding.
User access to the application is authenticated by a classical login form based on ASP.NET Membership.
Everything works fine except for an authentication issue that periodically occurs.
The following is an example to illustrate the scenario in which the issue is encountered:
My question is: what can I do in order to make user credentials be accepted by the server?
I already tried with this in web.config:
<system.web.extensions>
<scripting>
<webServices>
<!-- Allows for ajax.net user authentication -->
<authenticationService enabled="true" requireSSL="false" />
</webServices>
</scripting>
</system.web.extensions>
but nothing changed.
Any suggestion would be appreciated.
Thanks in advance
Regards
Mike
Hello,
I'm having a strange problem with stylesheets in tabs and I hope that you can help me.
I have an Upload control and some buttons in a tab in a page and, in IE 9 only it seems (I've tested Firefox, IE 10 & Chrome, this is not an issue there), when first loaded the page does not load the css for these controls.
If a postback occurs in the tab (ie if a file is uploaded) then the css is loaded (see attached files).
Is there any way to ensure that the css is loaded in this instance?
Thank you
Paul Herzberg
Hi,
Telerik Team,
I am using rad grid in batch editing mode ,suppose I have added 15 new records to grid and perform sorting on any column then it will lost data(newly added records in grid). I am facing this issue please help me on same. Is there any built in sorting available for edit mode?
Thanks