unnikkannan m
Top achievements
Rank 1
unnikkannan m
asked on 06 Aug 2009, 07:25 AM
Hello Sir,
I'm using radgrid and filtering is done in the grid.
But the filtering is not working properly for the date field
and one more thing, if there is no date value in a row
its also creating error.
Give me a solution for this.
thanks in advance
I'm using radgrid and filtering is done in the grid.
But the filtering is not working properly for the date field
and one more thing, if there is no date value in a row
its also creating error.
Give me a solution for this.
thanks in advance
8 Answers, 1 is accepted
0
Hello,
I tried to replicate the issue with the filtering you depicted in a sample project based on this demo but unfortunately to no avail. Can you please outline the differences between your grid configuration and the one used in the live example? They can help us determine the reason for the erroneous behavior and how to address it.
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I tried to replicate the issue with the filtering you depicted in a sample project based on this demo but unfortunately to no avail. Can you please outline the differences between your grid configuration and the one used in the live example? They can help us determine the reason for the erroneous behavior and how to address it.
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
unnikkannan m
Top achievements
Rank 1
answered on 06 Aug 2009, 01:08 PM
Hello sir,
First of all i'm thanking you for the attention that you have
made to my problem.
It works fine in the demo but unfortunately it doesn't
work as expected in the demo in my code.
Here's the code
<telerik:RadGrid ID="gvDiseaseGrid" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" GridLines="None"
ondeletecommand="gvDiseaseGrid_DeleteCommand"
onitemdatabound="gvDiseaseGrid_ItemDataBound"
onpageindexchanged="gvDiseaseGrid_PageIndexChanged"
onpagesizechanged="gvDiseaseGrid_PageSizeChanged"
onselectedindexchanged="gvDiseaseGrid_SelectedIndexChanged"
onsortcommand="gvDiseaseGrid_SortCommand" style="margin-bottom: 0px"
AllowFilteringByColumn="True" onitemcommand="gvDiseaseGrid_ItemCommand" Height="170px">
<MasterTableView DataKeyNames="DisPKey" PageSize="5">
<Columns>
<telerik:GridBoundColumn DataField="disease" HeaderText="Disease"
UniqueName="disease" AllowFiltering="true">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="startdate" HeaderText="Start Date"
UniqueName="startdate" DataFormatString="{0:dd-MMM-yyyy}" AllowFiltering="true">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="enddate" HeaderText="End date"
UniqueName="enddate" DataFormatString="{0:dd-MMM-yyyy}" AllowFiltering="true"
PickerType="DatePicker" SortExpression="enddate" >
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="medNote" HeaderText="Medical Notes"
UniqueName="medNote">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="Sel" AllowFiltering="false">
<ItemTemplate>
<mm:mmImageButton ID="imgbtnSel" runat="server" CommandName="select"
ImageUrl="~/Images/deselect.GIF" Text="mmImageButton" ToolTip="Select" />
</ItemTemplate>
<ItemStyle Height="5px" Width="5px" />
</telerik:GridTemplateColumn>
<telerik:GridButtonColumn ButtonType="ImageButton" CommandArgument="Delete"
CommandName="Delete" HeaderTooltip="Delete" ImageUrl="~/Images/delete.gif"
Text="Delete" UniqueName="imgbtnDel">
<ItemStyle Height="5px" Width="5px" />
</telerik:GridButtonColumn>
</Columns>
</MasterTableView>
<ClientSettings Scrolling-AllowScroll="true"></ClientSettings>
</telerik:RadGrid>
I tried with the eg provided in the demo but no result.
Thanks in advance
Unni
First of all i'm thanking you for the attention that you have
made to my problem.
It works fine in the demo but unfortunately it doesn't
work as expected in the demo in my code.
Here's the code
<telerik:RadGrid ID="gvDiseaseGrid" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" GridLines="None"
ondeletecommand="gvDiseaseGrid_DeleteCommand"
onitemdatabound="gvDiseaseGrid_ItemDataBound"
onpageindexchanged="gvDiseaseGrid_PageIndexChanged"
onpagesizechanged="gvDiseaseGrid_PageSizeChanged"
onselectedindexchanged="gvDiseaseGrid_SelectedIndexChanged"
onsortcommand="gvDiseaseGrid_SortCommand" style="margin-bottom: 0px"
AllowFilteringByColumn="True" onitemcommand="gvDiseaseGrid_ItemCommand" Height="170px">
<MasterTableView DataKeyNames="DisPKey" PageSize="5">
<Columns>
<telerik:GridBoundColumn DataField="disease" HeaderText="Disease"
UniqueName="disease" AllowFiltering="true">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="startdate" HeaderText="Start Date"
UniqueName="startdate" DataFormatString="{0:dd-MMM-yyyy}" AllowFiltering="true">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="enddate" HeaderText="End date"
UniqueName="enddate" DataFormatString="{0:dd-MMM-yyyy}" AllowFiltering="true"
PickerType="DatePicker" SortExpression="enddate" >
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="medNote" HeaderText="Medical Notes"
UniqueName="medNote">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="Sel" AllowFiltering="false">
<ItemTemplate>
<mm:mmImageButton ID="imgbtnSel" runat="server" CommandName="select"
ImageUrl="~/Images/deselect.GIF" Text="mmImageButton" ToolTip="Select" />
</ItemTemplate>
<ItemStyle Height="5px" Width="5px" />
</telerik:GridTemplateColumn>
<telerik:GridButtonColumn ButtonType="ImageButton" CommandArgument="Delete"
CommandName="Delete" HeaderTooltip="Delete" ImageUrl="~/Images/delete.gif"
Text="Delete" UniqueName="imgbtnDel">
<ItemStyle Height="5px" Width="5px" />
</telerik:GridButtonColumn>
</Columns>
</MasterTableView>
<ClientSettings Scrolling-AllowScroll="true"></ClientSettings>
</telerik:RadGrid>
I tried with the eg provided in the demo but no result.
Thanks in advance
Unni
0
Hi,
I followed your scenario in order to replicate the issue, but to no avail.
Please find attached a simple working project that demonstrates the needed approach. Give it a try and let me know if it works for you.
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I followed your scenario in order to replicate the issue, but to no avail.
Please find attached a simple working project that demonstrates the needed approach. Give it a try and let me know if it works for you.
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
unnikkannan m
Top achievements
Rank 1
answered on 07 Aug 2009, 06:39 AM
Hello Sir,
the attached working project did run with the required feature.
i had done the same thing with only one difference is that
I'm binding the datasource of the grid in the server side that
was the only difference i had seen and here's the function
for databinding
protected void radGrid_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.FilterCommandName)
{
DataTable dtGrid = this.oFdrDiseaseChart.FillDiseaseGrid();
this.radGrid.DataSource = dtGrid;
this.radGrid.DataBind();
}
}
Is there any problem with this type of binding .
but all other filtering except the date column works
fine.
give me the steps for solving the pblm.
Thanks in advance
Unni
the attached working project did run with the required feature.
i had done the same thing with only one difference is that
I'm binding the datasource of the grid in the server side that
was the only difference i had seen and here's the function
for databinding
protected void radGrid_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.FilterCommandName)
{
DataTable dtGrid = this.oFdrDiseaseChart.FillDiseaseGrid();
this.radGrid.DataSource = dtGrid;
this.radGrid.DataBind();
}
}
Is there any problem with this type of binding .
but all other filtering except the date column works
fine.
give me the steps for solving the pblm.
Thanks in advance
Unni
0
Hello,
Please have in mind that simple data-binding through the DataBind() method can be used in simple scenarios which do not require the grid to perform complex operations such as filtering. I suggest you switch to advanced binding with NeedDataSource event handling and let me know if you need additional assistance.
All the best,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please have in mind that simple data-binding through the DataBind() method can be used in simple scenarios which do not require the grid to perform complex operations such as filtering. I suggest you switch to advanced binding with NeedDataSource event handling and let me know if you need additional assistance.
All the best,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
unnikkannan m
Top achievements
Rank 1
answered on 10 Aug 2009, 08:56 AM
Hello Sir,
As per your advice I tried to bind grid with NeedDataSource event handling
but the date filtering problem still exists.
Please help me. I don't know what's wrong.
Thanks in advance
Unni
As per your advice I tried to bind grid with NeedDataSource event handling
but the date filtering problem still exists.
Please help me. I don't know what's wrong.
Thanks in advance
Unni
0
Hi,
Please try to follow the example I sent you before in order to achieve the desired functionality.
If you continue to experience difficulties, please open a formal support ticket and send us a simple runnable project for additional testing and debugging.
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please try to follow the example I sent you before in order to achieve the desired functionality.
If you continue to experience difficulties, please open a formal support ticket and send us a simple runnable project for additional testing and debugging.
Greetings,
Pavlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
unnikkannan m
Top achievements
Rank 1
answered on 12 Aug 2009, 05:26 AM
Hello ,
Thanks for the timely helpful support
I will open an formal support ticket
Thanks
Unni
Thanks for the timely helpful support
I will open an formal support ticket
Thanks
Unni