# Prefiltering

**URL:** <https://forum.radzen.com/t/prefiltering/995>\
**Category:** Uncategorized\
**Created:** [March 15, 2019, 8:31pm UTC](https://forum.radzen.com/t/prefiltering/995 "2019-03-15T20:31:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dwight\_Rutledge](https://forum.radzen.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@Dwight\_Rutledge](https://forum.radzen.com/u/Dwight_Rutledge)\
**Post date:** [March 15, 2019, 8:31pm UTC](https://forum.radzen.com/t/prefiltering/995/1 "2019-03-15T20:31:13Z")

</div>

I am have built a simple address book application on a single sql table. I will be calling this application from another application. The application will pass a "user" or a value to this and I want it to return records only for this parameter. I am replacing an application that . I can't seem to figure out how to open the application with the data grid pre-filtered. based on a url parameter?

By the way, we are not using the ASPNet. Security Model. Don't ask! 🙂

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [March 16, 2019, 6:15am UTC](https://forum.radzen.com/t/prefiltering/995/2 "2019-03-16T06:15:38Z")

</div>

Hi @Dwight_Rutledge,

You can use query string to pass a parameter to some of the pages and later read this query string and use it with $filter for the data source method to filter your data. Here is how to get a query string value:

```auto
${(new URL(window.location.href)).searchParams.get("CustomerID")}

```

and here is how to use it in Radzen page to invoke and filter data source data:

 ![image](https://forum.radzen.com/uploads/default/original/1X/30f9d3596bd85ac7546305ab6b7b0a95ded139c9.png)

 ![image](https://forum.radzen.com/uploads/default/original/1X/cd22fa913e0be640533edf30ba2926f1310d253a.png)

 ![image](https://forum.radzen.com/uploads/default/original/1X/dd6eacf024442e8efc2ea695d5eba16b10da23da.png)

 ![image](https://forum.radzen.com/uploads/default/original/1X/98ec4aca153f8fd608f613152bfafb9be325a4a0.png)

Best Regards,  
Vladimir

---

<div class="post-metadata">

**Author:** ![Dwight\_Rutledge](https://forum.radzen.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@Dwight\_Rutledge](https://forum.radzen.com/u/Dwight_Rutledge)\
**Post date:** [March 19, 2019, 6:30pm UTC](https://forum.radzen.com/t/prefiltering/995/3 "2019-03-19T18:30:44Z")

</div>

> [@enchev](#):
>
> ${(new URL(window.location.href)).searchParams.get("CustomerID")}

Thank you for this, but I am having an issue following this because I let the program update to the latest and my screens look different. For example, setting the step 1.1 looks different

 ![image](https://forum.radzen.com/uploads/default/original/2X/a/a58dc2a07f338cdbcd46cb058f9f00df05bb41b4.png)

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [March 19, 2019, 7:56pm UTC](https://forum.radzen.com/t/prefiltering/995/4 "2019-03-19T19:56:49Z")

</div>

Setters are generated from new Data wizard of DataGrid Data property and are not touched by Radzen updates. Are you trying to define your event handler manually?

---

<div class="post-metadata">

**Author:** ![Dwight\_Rutledge](https://forum.radzen.com/letter_avatar_proxy/v4/letter/d/7993a0/32.png) [@Dwight\_Rutledge](https://forum.radzen.com/u/Dwight_Rutledge)\
**Post date:** [March 20, 2019, 12:34am UTC](https://forum.radzen.com/t/prefiltering/995/5 "2019-03-20T00:34:43Z")

</div>

No, I'm just following the screenshots on this page. I appreciate your help.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [March 20, 2019, 6:41am UTC](https://forum.radzen.com/t/prefiltering/995/6 "2019-03-20T06:41:48Z")

</div>

You can get the same setters as in my example if you follow DataGrid new Data wizard:

 ![image](https://forum.radzen.com/uploads/default/original/2X/4/4eb74baff7cba39ce9b93eb4733fa0903355a0b6.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/7/75244df54dfd7665713713f930ba8a23bfe0a988.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/7/734984c551b2a5a273763c251c26b65d485464ff.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/3/3dddeebe9a38d1bbdb2f353a374523da0dd46d48.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/0/04797ff5e47d73323d3bf52f6f0ac4f6557dc17c.png)

 ![image](https://forum.radzen.com/uploads/default/original/2X/2/20f8515b609ab69f541d22c0930bd87c939c3dcf.png)
